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