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