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