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