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 memlist \ 45 minttl \ 46 oclo \ 47 pf_key \ 48 poll \ 49 portfs \ 50 regression \ 51 sdevfs \ 52 secflags \ 53 secure_getenv \ 54 signalfd \ 55 sigqueue \ 56 sockfs \ 57 sockopt \ 58 spawn \ 59 spoof-ras \ 60 stackalign \ 61 stress \ 62 syscall \ 63 tcpsig \ 64 timer \ 65 uccid \ 66 vfs \ 67 $(SUBDIRS_$(MACH)) 68 69PROGS = \ 70 clock_gettime \ 71 eventfd \ 72 fifo-tvnsec \ 73 odirectory \ 74 ucontext \ 75 getcontext_extd \ 76 writev 77 78CPPFLAGS += -D_REENTRANT 79PROGS32 = $(PROGS:%=%.32) 80PROGS64 = $(PROGS:%=%.64) 81 82ROOTOPTDIR = $(ROOT)/opt/os-tests/tests 83ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \ 84 $(PROGS64:%=$(ROOTOPTDIR)/%) \ 85 $(SCRIPTS:%=$(ROOTOPTDIR)/%) 86 87odirectory.32 := LDLIBS += -lsocket 88odirectory.64 := LDLIBS64 += -lsocket 89 90clock_gettime.32 := LDLIBS += -lproc 91clock_gettime.32 := CSTD = $(CSTD_GNU99) 92clock_gettime.64 := LDLIBS64 += -lproc 93clock_gettime.64 := CSTD = $(CSTD_GNU99) 94 95fifo-tvnsec.32 := CSTD = $(CSTD_GNU99) 96fifo-tvnsec.64 := CSTD = $(CSTD_GNU99) 97 98ucontext.32 := SMOFF += unreachable 99ucontext.64 := SMOFF += unreachable 100 101writev.32 := CPPFLAGS += -D_FILE_OFFSET_BITS=64 102writev.32 := CSTD = $(CSTD_GNU99) 103writev.64 := CSTD = $(CSTD_GNU99) 104 105include $(SRC)/cmd/Makefile.cmd 106 107all := TARGET = all 108install := TARGET = install 109clean := TARGET = clean 110clobber := TARGET = clobber 111 112.KEEP_STATE: 113 114install: $(SUBDIRS) $(ROOTOPTPROGS) 115 116all: $(SUBDIRS) $(PROGS32) $(PROGS64) 117 118clean: $(SUBDIRS) 119 120$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR) 121 122$(ROOTOPTDIR): 123 $(INS.dir) 124 125$(ROOTOPTDIR)/%: % 126 $(INS.file) 127 128$(ROOTOPTDIR)/%: %.ksh 129 $(INS.rename) 130 131%.64: %.c 132 $(LINK64.c) -o $@ $< $(LDLIBS64) 133 $(POST_PROCESS) 134 135%.32: %.c 136 $(LINK.c) -o $@ $< $(LDLIBS) 137 $(POST_PROCESS) 138 139clobber: $(SUBDIRS) 140 $(RM) $(PROGS32) $(PROGS64) 141 142$(SUBDIRS): FRC 143 @cd $@; pwd; $(MAKE) $(TARGET) 144 145FRC: 146