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 odirectory \ 55 ucontext \ 56 getcontext_extd \ 57 writev 58 59CPPFLAGS += -D_REENTRANT 60PROGS32 = $(PROGS:%=%.32) 61PROGS64 = $(PROGS:%=%.64) 62 63ROOTOPTDIR = $(ROOT)/opt/os-tests/tests 64ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \ 65 $(PROGS64:%=$(ROOTOPTDIR)/%) \ 66 $(SCRIPTS:%=$(ROOTOPTDIR)/%) 67 68odirectory.32 := LDLIBS += -lsocket 69odirectory.64 := LDLIBS64 += -lsocket 70 71clock_gettime.32 := LDLIBS += -lproc 72clock_gettime.32 := CSTD = $(CSTD_GNU99) 73clock_gettime.64 := LDLIBS64 += -lproc 74clock_gettime.64 := CSTD = $(CSTD_GNU99) 75 76ucontext.32 := SMOFF += unreachable 77ucontext.64 := SMOFF += unreachable 78 79writev.32 := CPPFLAGS += -D_FILE_OFFSET_BITS=64 80writev.32 := CSTD = $(CSTD_GNU99) 81writev.64 := CSTD = $(CSTD_GNU99) 82 83include $(SRC)/cmd/Makefile.cmd 84 85all := TARGET = all 86install := TARGET = install 87clean := TARGET = clean 88clobber := TARGET = clobber 89 90.KEEP_STATE: 91 92install: $(SUBDIRS) $(ROOTOPTPROGS) 93 94all: $(SUBDIRS) $(PROGS32) $(PROGS64) 95 96clean: $(SUBDIRS) 97 98$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR) 99 100$(ROOTOPTDIR): 101 $(INS.dir) 102 103$(ROOTOPTDIR)/%: % 104 $(INS.file) 105 106$(ROOTOPTDIR)/%: %.ksh 107 $(INS.rename) 108 109%.64: %.c 110 $(LINK64.c) -o $@ $< $(LDLIBS64) 111 $(POST_PROCESS) 112 113%.32: %.c 114 $(LINK.c) -o $@ $< $(LDLIBS) 115 $(POST_PROCESS) 116 117clobber: $(SUBDIRS) 118 $(RM) $(PROGS32) $(PROGS64) 119 120$(SUBDIRS): FRC 121 @cd $@; pwd; $(MAKE) $(TARGET) 122 123FRC: 124