12d08521bSGarrett D'Amore# 22d08521bSGarrett D'Amore# This file and its contents are supplied under the terms of the 32d08521bSGarrett D'Amore# Common Development and Distribution License ("CDDL"), version 1.0. 42d08521bSGarrett D'Amore# You may only use this file in accordance with the terms of version 52d08521bSGarrett D'Amore# 1.0 of the CDDL. 62d08521bSGarrett D'Amore# 72d08521bSGarrett D'Amore# A full copy of the text of the CDDL should have accompanied this 82d08521bSGarrett D'Amore# source. A copy of the CDDL is also available via the Internet at 92d08521bSGarrett D'Amore# http://www.illumos.org/license/CDDL. 102d08521bSGarrett D'Amore# 112d08521bSGarrett D'Amore 122d08521bSGarrett D'Amore# 132d08521bSGarrett D'Amore# Copyright (c) 2012 by Delphix. All rights reserved. 14de572d98SGarrett D'Amore# Copyright 2015 Garrett D'Amore <garrett@damore.org> 15dcdfe824SRobert Mustacchi# Copyright 2016 Joyent, Inc. 162d08521bSGarrett D'Amore# 172d08521bSGarrett D'Amore 18b599bd93SRobert MustacchiSUBDIRS = \ 19b599bd93SRobert Mustacchi catopen \ 20b599bd93SRobert Mustacchi fpround \ 21b599bd93SRobert Mustacchi newlocale \ 22b599bd93SRobert Mustacchi nl_langinfo \ 23b599bd93SRobert Mustacchi priv_gettext \ 24b599bd93SRobert Mustacchi random \ 25b599bd93SRobert Mustacchi strerror \ 26b599bd93SRobert Mustacchi symbols \ 27b599bd93SRobert Mustacchi wcsrtombs \ 28b599bd93SRobert Mustacchi wctype 292d08521bSGarrett D'Amore 30dcdfe824SRobert MustacchiPROGS = \ 31dcdfe824SRobert Mustacchi aligned_alloc \ 32dcdfe824SRobert Mustacchi c11_threads \ 33dcdfe824SRobert Mustacchi c11_tss \ 34dcdfe824SRobert Mustacchi call_once \ 35dcdfe824SRobert Mustacchi quick_exit_order \ 36dcdfe824SRobert Mustacchi quick_exit_status \ 37*9a4a12bdSRobert Mustacchi timespec_get \ 38*9a4a12bdSRobert Mustacchi uchar 39dcdfe824SRobert Mustacchi 40dcdfe824SRobert MustacchiSCRIPTS = \ 41dcdfe824SRobert Mustacchi quick_exit 42dcdfe824SRobert Mustacchi 43dcdfe824SRobert MustacchiCPPFLAGS += -D_REENTRANT 44dcdfe824SRobert Mustacchi 45dcdfe824SRobert MustacchiPROGS32 = $(PROGS:%=%.32) 46dcdfe824SRobert MustacchiPROGS64 = $(PROGS:%=%.64) 47dcdfe824SRobert Mustacchi 48dcdfe824SRobert Mustacchialigned_alloc.32 := LDLIBS += -lproc 49dcdfe824SRobert Mustacchialigned_alloc.64 := LDLIBS64 += -lproc 50dcdfe824SRobert Mustacchi 51dcdfe824SRobert MustacchiROOTOPTDIR = $(ROOT)/opt/libc-tests/tests 52dcdfe824SRobert MustacchiROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \ 53dcdfe824SRobert Mustacchi $(PROGS64:%=$(ROOTOPTDIR)/%) \ 54dcdfe824SRobert Mustacchi $(SCRIPTS:%=$(ROOTOPTDIR)/%) 55dcdfe824SRobert Mustacchi 56dcdfe824SRobert Mustacchiinclude $(SRC)/cmd/Makefile.cmd 57dcdfe824SRobert Mustacchi 58dcdfe824SRobert Mustacchiall := TARGET = all 59dcdfe824SRobert Mustacchiinstall := TARGET = install 60dcdfe824SRobert Mustacchiclean := TARGET = clean 61dcdfe824SRobert Mustacchiclobber := TARGET = clobber 62dcdfe824SRobert Mustacchilint := TARGET = lint 63dcdfe824SRobert Mustacchi 64dcdfe824SRobert Mustacchi.KEEP_STATE: 65dcdfe824SRobert Mustacchi 66dcdfe824SRobert Mustacchiinstall: $(SUBDIRS) $(ROOTOPTPROGS) 67dcdfe824SRobert Mustacchi 68dcdfe824SRobert Mustacchiall: $(SUBDIRS) $(PROGS32) $(PROGS64) 69dcdfe824SRobert Mustacchi 70dcdfe824SRobert Mustacchiclean lint: $(SUBDIRS) 71dcdfe824SRobert Mustacchi 72dcdfe824SRobert Mustacchi$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR) 73dcdfe824SRobert Mustacchi 74dcdfe824SRobert Mustacchi$(ROOTOPTDIR): 75dcdfe824SRobert Mustacchi $(INS.dir) 76dcdfe824SRobert Mustacchi 77dcdfe824SRobert Mustacchi$(ROOTOPTDIR)/%: % 78dcdfe824SRobert Mustacchi $(INS.file) 79dcdfe824SRobert Mustacchi 80dcdfe824SRobert Mustacchi$(ROOTOPTDIR)/%: %.ksh 81dcdfe824SRobert Mustacchi $(INS.rename) 82dcdfe824SRobert Mustacchi 83dcdfe824SRobert Mustacchi%.64: %.c 84dcdfe824SRobert Mustacchi $(LINK.c) -m64 -o $@ $< $(LDLIBS64) 85dcdfe824SRobert Mustacchi $(POST_PROCESS) 86dcdfe824SRobert Mustacchi 87dcdfe824SRobert Mustacchi%.32: %.c 88dcdfe824SRobert Mustacchi $(LINK.c) -m32 -o $@ $< $(LDLIBS) 89dcdfe824SRobert Mustacchi $(POST_PROCESS) 90dcdfe824SRobert Mustacchi 91dcdfe824SRobert Mustacchiclobber: $(SUBDIRS) 92dcdfe824SRobert Mustacchi $(RM) $(PROGS32) $(PROGS64) 93dcdfe824SRobert Mustacchi 94dcdfe824SRobert Mustacchi$(SUBDIRS): FRC 95dcdfe824SRobert Mustacchi @cd $@; pwd; $(MAKE) $(TARGET) 96dcdfe824SRobert Mustacchi 97dcdfe824SRobert MustacchiFRC: 98