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, 2016 by Delphix. All rights reserved. 14# Copyright 2020 Joyent, Inc. 15# Copyright 2021 Tintri by DDN, Inc. All rights reserved. 16# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. 17# Copyright 2024 Oxide Computer Company 18# 19 20SUBDIRS_i386 = \ 21 i386 \ 22 imc \ 23 saveargs \ 24 xsave \ 25 zen_umc 26 27SUBDIRS = \ 28 cores \ 29 ddi_ufm \ 30 definit \ 31 execvpe \ 32 file-locking \ 33 hexdump \ 34 ilstr \ 35 ksensor \ 36 ksid \ 37 libtopo \ 38 minttl \ 39 oclo \ 40 pf_key \ 41 poll \ 42 portfs \ 43 regression \ 44 sdevfs \ 45 secflags \ 46 signalfd \ 47 sigqueue \ 48 sockfs \ 49 spoof-ras \ 50 stackalign \ 51 stress \ 52 syscall \ 53 tcpsig \ 54 timer \ 55 uccid \ 56 vfs \ 57 $(SUBDIRS_$(MACH)) 58 59PROGS = \ 60 clock_gettime \ 61 eventfd \ 62 fifo-tvnsec \ 63 odirectory \ 64 ucontext \ 65 getcontext_extd \ 66 writev 67 68CPPFLAGS += -D_REENTRANT 69PROGS32 = $(PROGS:%=%.32) 70PROGS64 = $(PROGS:%=%.64) 71 72ROOTOPTDIR = $(ROOT)/opt/os-tests/tests 73ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \ 74 $(PROGS64:%=$(ROOTOPTDIR)/%) \ 75 $(SCRIPTS:%=$(ROOTOPTDIR)/%) 76 77odirectory.32 := LDLIBS += -lsocket 78odirectory.64 := LDLIBS64 += -lsocket 79 80clock_gettime.32 := LDLIBS += -lproc 81clock_gettime.32 := CSTD = $(CSTD_GNU99) 82clock_gettime.64 := LDLIBS64 += -lproc 83clock_gettime.64 := CSTD = $(CSTD_GNU99) 84 85fifo-tvnsec.32 := CSTD = $(CSTD_GNU99) 86fifo-tvnsec.64 := CSTD = $(CSTD_GNU99) 87 88ucontext.32 := SMOFF += unreachable 89ucontext.64 := SMOFF += unreachable 90 91writev.32 := CPPFLAGS += -D_FILE_OFFSET_BITS=64 92writev.32 := CSTD = $(CSTD_GNU99) 93writev.64 := CSTD = $(CSTD_GNU99) 94 95include $(SRC)/cmd/Makefile.cmd 96 97all := TARGET = all 98install := TARGET = install 99clean := TARGET = clean 100clobber := TARGET = clobber 101 102.KEEP_STATE: 103 104install: $(SUBDIRS) $(ROOTOPTPROGS) 105 106all: $(SUBDIRS) $(PROGS32) $(PROGS64) 107 108clean: $(SUBDIRS) 109 110$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR) 111 112$(ROOTOPTDIR): 113 $(INS.dir) 114 115$(ROOTOPTDIR)/%: % 116 $(INS.file) 117 118$(ROOTOPTDIR)/%: %.ksh 119 $(INS.rename) 120 121%.64: %.c 122 $(LINK64.c) -o $@ $< $(LDLIBS64) 123 $(POST_PROCESS) 124 125%.32: %.c 126 $(LINK.c) -o $@ $< $(LDLIBS) 127 $(POST_PROCESS) 128 129clobber: $(SUBDIRS) 130 $(RM) $(PROGS32) $(PROGS64) 131 132$(SUBDIRS): FRC 133 @cd $@; pwd; $(MAKE) $(TARGET) 134 135FRC: 136