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