xref: /illumos-gate/usr/src/test/libc-tests/tests/Makefile (revision 566b4223c74de6cad48ddbedf35a12d6a511c8c5)
1#
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.
6#
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.
10#
11
12#
13# Copyright (c) 2012 by Delphix. All rights reserved.
14# Copyright 2015 Garrett D'Amore <garrett@damore.org>
15# Copyright 2016 Joyent, Inc.
16#
17
18SUBDIRS = \
19	catopen \
20	fpround \
21	newlocale \
22	nl_langinfo \
23	priv_gettext \
24	random \
25	regex \
26	select \
27	strerror \
28	symbols \
29	threads \
30	wcsrtombs \
31	wctype
32
33PROGS = \
34	aligned_alloc \
35	c11_threads \
36	c11_tss \
37	call_once \
38	endian \
39	env-7076 \
40	fnmatch \
41	printf-9511 \
42	psignal-5097 \
43	quick_exit_order \
44	quick_exit_status \
45	strcoll-strxfrm-6907 \
46	timespec_get \
47	wcsncasecmp \
48	wcsncasecmp-7344 \
49	wcsncasecmp-7350
50
51SCRIPTS = \
52	quick_exit \
53	psignal
54
55CPPFLAGS += -D_REENTRANT
56
57PROGS32 = $(PROGS:%=%.32)
58PROGS64 = \
59	$(PROGS:%=%.64) \
60	printf-6961.64
61
62aligned_alloc.32 :=	LDLIBS += -lproc
63aligned_alloc.64 :=	LDLIBS64 += -lproc
64
65ROOTOPTDIR = $(ROOT)/opt/libc-tests/tests
66ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \
67	$(PROGS64:%=$(ROOTOPTDIR)/%) \
68	$(SCRIPTS:%=$(ROOTOPTDIR)/%)
69
70include $(SRC)/cmd/Makefile.cmd
71
72all     :=      TARGET = all
73install :=      TARGET = install
74clean   :=      TARGET = clean
75clobber :=      TARGET = clobber
76lint    :=      TARGET = lint
77
78.KEEP_STATE:
79
80install: $(SUBDIRS) $(ROOTOPTPROGS)
81
82all: $(SUBDIRS) $(PROGS32) $(PROGS64)
83
84clean lint: $(SUBDIRS)
85
86$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR)
87
88$(ROOTOPTDIR):
89	$(INS.dir)
90
91$(ROOTOPTDIR)/%: %
92	$(INS.file)
93
94$(ROOTOPTDIR)/%: %.ksh
95	$(INS.rename)
96
97%.64: %.c
98	$(LINK64.c) -o $@ $< $(LDLIBS64)
99	$(POST_PROCESS)
100
101%.32: %.c
102	$(LINK.c) -o $@ $< $(LDLIBS)
103	$(POST_PROCESS)
104
105clobber: $(SUBDIRS)
106	$(RM) $(PROGS32) $(PROGS64)
107
108$(SUBDIRS): FRC
109	@cd $@; pwd; $(MAKE) $(TARGET)
110
111FRC:
112