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> 15*dcdfe824SRobert 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 30*dcdfe824SRobert MustacchiPROGS = \ 31*dcdfe824SRobert Mustacchi aligned_alloc \ 32*dcdfe824SRobert Mustacchi c11_threads \ 33*dcdfe824SRobert Mustacchi c11_tss \ 34*dcdfe824SRobert Mustacchi call_once \ 35*dcdfe824SRobert Mustacchi quick_exit_order \ 36*dcdfe824SRobert Mustacchi quick_exit_status \ 37*dcdfe824SRobert Mustacchi timespec_get 38*dcdfe824SRobert Mustacchi 39*dcdfe824SRobert MustacchiSCRIPTS = \ 40*dcdfe824SRobert Mustacchi quick_exit 41*dcdfe824SRobert Mustacchi 42*dcdfe824SRobert MustacchiCPPFLAGS += -D_REENTRANT 43*dcdfe824SRobert Mustacchi 44*dcdfe824SRobert MustacchiPROGS32 = $(PROGS:%=%.32) 45*dcdfe824SRobert MustacchiPROGS64 = $(PROGS:%=%.64) 46*dcdfe824SRobert Mustacchi 47*dcdfe824SRobert Mustacchialigned_alloc.32 := LDLIBS += -lproc 48*dcdfe824SRobert Mustacchialigned_alloc.64 := LDLIBS64 += -lproc 49*dcdfe824SRobert Mustacchi 50*dcdfe824SRobert MustacchiROOTOPTDIR = $(ROOT)/opt/libc-tests/tests 51*dcdfe824SRobert MustacchiROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \ 52*dcdfe824SRobert Mustacchi $(PROGS64:%=$(ROOTOPTDIR)/%) \ 53*dcdfe824SRobert Mustacchi $(SCRIPTS:%=$(ROOTOPTDIR)/%) 54*dcdfe824SRobert Mustacchi 55*dcdfe824SRobert Mustacchiinclude $(SRC)/cmd/Makefile.cmd 56*dcdfe824SRobert Mustacchi 57*dcdfe824SRobert Mustacchiall := TARGET = all 58*dcdfe824SRobert Mustacchiinstall := TARGET = install 59*dcdfe824SRobert Mustacchiclean := TARGET = clean 60*dcdfe824SRobert Mustacchiclobber := TARGET = clobber 61*dcdfe824SRobert Mustacchilint := TARGET = lint 62*dcdfe824SRobert Mustacchi 63*dcdfe824SRobert Mustacchi.KEEP_STATE: 64*dcdfe824SRobert Mustacchi 65*dcdfe824SRobert Mustacchiinstall: $(SUBDIRS) $(ROOTOPTPROGS) 66*dcdfe824SRobert Mustacchi 67*dcdfe824SRobert Mustacchiall: $(SUBDIRS) $(PROGS32) $(PROGS64) 68*dcdfe824SRobert Mustacchi 69*dcdfe824SRobert Mustacchiclean lint: $(SUBDIRS) 70*dcdfe824SRobert Mustacchi 71*dcdfe824SRobert Mustacchi$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR) 72*dcdfe824SRobert Mustacchi 73*dcdfe824SRobert Mustacchi$(ROOTOPTDIR): 74*dcdfe824SRobert Mustacchi $(INS.dir) 75*dcdfe824SRobert Mustacchi 76*dcdfe824SRobert Mustacchi$(ROOTOPTDIR)/%: % 77*dcdfe824SRobert Mustacchi $(INS.file) 78*dcdfe824SRobert Mustacchi 79*dcdfe824SRobert Mustacchi$(ROOTOPTDIR)/%: %.ksh 80*dcdfe824SRobert Mustacchi $(INS.rename) 81*dcdfe824SRobert Mustacchi 82*dcdfe824SRobert Mustacchi%.64: %.c 83*dcdfe824SRobert Mustacchi $(LINK.c) -m64 -o $@ $< $(LDLIBS64) 84*dcdfe824SRobert Mustacchi $(POST_PROCESS) 85*dcdfe824SRobert Mustacchi 86*dcdfe824SRobert Mustacchi%.32: %.c 87*dcdfe824SRobert Mustacchi $(LINK.c) -m32 -o $@ $< $(LDLIBS) 88*dcdfe824SRobert Mustacchi $(POST_PROCESS) 89*dcdfe824SRobert Mustacchi 90*dcdfe824SRobert Mustacchiclobber: $(SUBDIRS) 91*dcdfe824SRobert Mustacchi $(RM) $(PROGS32) $(PROGS64) 92*dcdfe824SRobert Mustacchi 93*dcdfe824SRobert Mustacchi$(SUBDIRS): FRC 94*dcdfe824SRobert Mustacchi @cd $@; pwd; $(MAKE) $(TARGET) 95*dcdfe824SRobert Mustacchi 96*dcdfe824SRobert MustacchiFRC: 97