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 18 SUBDIRS = \ 19 catopen \ 20 fpround \ 21 newlocale \ 22 nl_langinfo \ 23 priv_gettext \ 24 random \ 25 strerror \ 26 symbols \ 27 threads \ 28 wcsrtombs \ 29 wctype 30 31 PROGS = \ 32 aligned_alloc \ 33 c11_threads \ 34 c11_tss \ 35 call_once \ 36 endian \ 37 quick_exit_order \ 38 quick_exit_status \ 39 timespec_get 40 41 SCRIPTS = \ 42 quick_exit 43 44 CPPFLAGS += -D_REENTRANT 45 46 PROGS32 = $(PROGS:%=%.32) 47 PROGS64 = $(PROGS:%=%.64) 48 49 aligned_alloc.32 := LDLIBS += -lproc 50 aligned_alloc.64 := LDLIBS64 += -lproc 51 52 ROOTOPTDIR = $(ROOT)/opt/libc-tests/tests 53 ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \ 54 $(PROGS64:%=$(ROOTOPTDIR)/%) \ 55 $(SCRIPTS:%=$(ROOTOPTDIR)/%) 56 57 include $(SRC)/cmd/Makefile.cmd 58 59 all := TARGET = all 60 install := TARGET = install 61 clean := TARGET = clean 62 clobber := TARGET = clobber 63 lint := TARGET = lint 64 65 .KEEP_STATE: 66 67 install: $(SUBDIRS) $(ROOTOPTPROGS) 68 69 all: $(SUBDIRS) $(PROGS32) $(PROGS64) 70 71 clean lint: $(SUBDIRS) 72 73 $(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR) 74 75 $(ROOTOPTDIR): 76 $(INS.dir) 77 78 $(ROOTOPTDIR)/%: % 79 $(INS.file) 80 81 $(ROOTOPTDIR)/%: %.ksh 82 $(INS.rename) 83 84 %.64: %.c 85 $(LINK64.c) -o $@ $< $(LDLIBS64) 86 $(POST_PROCESS) 87 88 %.32: %.c 89 $(LINK.c) -m32 -o $@ $< $(LDLIBS) 90 $(POST_PROCESS) 91 92 clobber: $(SUBDIRS) 93 $(RM) $(PROGS32) $(PROGS64) 94 95 $(SUBDIRS): FRC 96 @cd $@; pwd; $(MAKE) $(TARGET) 97 98 FRC: