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