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