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 2026 Oxide Computer Company 14# 15 16PROGS = \ 17 spawn-syscall 18 19PROGS32 = $(PROGS:%=%.32) 20PROGS64 = $(PROGS:%=%.64) 21 22ROOTOPTDIR = $(ROOT)/opt/os-tests/tests 23ROOTOPTSPAWN = $(ROOTOPTDIR)/spawn 24ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTSPAWN)/%) \ 25 $(PROGS64:%=$(ROOTOPTSPAWN)/%) 26 27include $(SRC)/cmd/Makefile.cmd 28 29CSTD = $(CSTD_GNU17) 30.KEEP_STATE: 31 32all: $(PROGS32) $(PROGS64) 33 34install: $(ROOTOPTPROGS) 35 36clean: 37 $(RM) $(OBJS32) $(OBJS64) 38 39$(PROGS32): $(OBJS32) 40$(PROGS64): $(OBJS64) 41 42$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTSPAWN) 43 44$(ROOTOPTDIR): 45 $(INS.dir) 46 47$(ROOTOPTSPAWN): $(ROOTOPTDIR) 48 $(INS.dir) 49 50$(ROOTOPTSPAWN)/%: % 51 $(INS.file) 52 53%.32.o: %.c 54 $(COMPILE.c) -o $@ $< 55 $(POST_PROCESS_O) 56 57%.64.o: %.c 58 $(COMPILE64.c) -o $@ $< 59 $(POST_PROCESS_O) 60 61%.64: %.64.o 62 $(LINK64.c) -o $@ $< $(LDLIBS64) 63 $(POST_PROCESS) 64 65%.32: %.32.o 66 $(LINK.c) -o $@ $< $(LDLIBS) 67 $(POST_PROCESS) 68 69clobber: clean 70 $(RM) $(PROGS32) $(PROGS64) 71 72FRC: 73