Merge remote-tracking branch 'origin/master'
[unleashed/lotheac.git] / usr / src / test / libc-tests / tests / Makefile
blob7fd356a2309e159f8b72db72473a7342c7f127f4
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright (c) 2012 by Delphix. All rights reserved.
14 # Copyright 2015 Garrett D'Amore <garrett@damore.org>
15 # Copyright (c) 2018, Joyent, Inc.
18 SUBDIRS = \
19 catopen \
20 fpround \
21 newlocale \
22 nl_langinfo \
23 priv_gettext \
24 random \
25 regex \
26 select \
27 strerror \
28 strxfrm \
29 symbols \
30 threads \
31 wcscoll \
32 wcsrtombs \
33 wctype
35 PROGS = \
36 aligned_alloc \
37 c11_threads \
38 c11_tss \
39 call_once \
40 endian \
41 env-7076 \
42 fnmatch \
43 memset_s \
44 printf-9511 \
45 psignal-5097 \
46 quick_exit_order \
47 quick_exit_status \
48 set_constraint_handler_s \
49 strcoll-strxfrm-6907 \
50 timespec_get \
51 wcsncasecmp \
52 wcsncasecmp-7344 \
53 wcsncasecmp-7350
55 SCRIPTS = \
56 quick_exit \
57 psignal
60 # needs work
61 SMOFF += all_func_returns,snprintf_overflow
63 PROGS32 = $(PROGS:%=%.32)
64 PROGS64 = \
65 $(PROGS:%=%.64) \
66 printf-6961.64
68 aligned_alloc.32 := LDLIBS += -lproc
69 aligned_alloc.64 := LDLIBS64 += -lproc
71 memset_s.32 := CPPFLAGS += -D__STDC_WANT_LIB_EXT1__=1
72 memset_s.64 := CPPFLAGS += -D__STDC_WANT_LIB_EXT1__=1
73 set_constraint_handler_s.32 := CPPFLAGS += -D__STDC_WANT_LIB_EXT1__=1
74 set_constraint_handler_s.64 := CPPFLAGS += -D__STDC_WANT_LIB_EXT1__=1
76 ROOTOPTDIR = $(ROOT)/opt/libc-tests/tests
77 ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \
78 $(PROGS64:%=$(ROOTOPTDIR)/%) \
79 $(SCRIPTS:%=$(ROOTOPTDIR)/%)
81 include $(SRC)/cmd/Makefile.cmd
83 all := TARGET = all
84 install := TARGET = install
85 clean := TARGET = clean
86 clobber := TARGET = clobber
88 .KEEP_STATE:
90 install: $(SUBDIRS) $(ROOTOPTPROGS)
92 all: $(SUBDIRS) $(PROGS32) $(PROGS64)
94 clean: $(SUBDIRS)
96 $(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR)
98 $(ROOTOPTDIR):
99 $(INS.dir)
101 $(ROOTOPTDIR)/%: %
102 $(INS.file)
104 $(ROOTOPTDIR)/%: %.ksh
105 $(INS.rename)
107 %.64: %.c
108 $(LINK64.c) -o $@ $< $(LDLIBS64)
109 $(POST_PROCESS)
111 %.32: %.c
112 $(LINK.c) -o $@ $< $(LDLIBS)
113 $(POST_PROCESS)
115 clobber: $(SUBDIRS)
116 $(RM) $(PROGS32) $(PROGS64)
118 $(SUBDIRS): FRC
119 @cd $@; pwd; $(MAKE) $(TARGET)
121 FRC: