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