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