xref: /illumos-gate/usr/src/test/os-tests/tests/ilstr/Makefile (revision bb9475a199514dcace79d04d02c1eff05d65b94f)
1b210e777SJoshua M. Clulow#
2b210e777SJoshua M. Clulow# This file and its contents are supplied under the terms of the
3b210e777SJoshua M. Clulow# Common Development and Distribution License ("CDDL"), version 1.0.
4b210e777SJoshua M. Clulow# You may only use this file in accordance with the terms of version
5b210e777SJoshua M. Clulow# 1.0 of the CDDL.
6b210e777SJoshua M. Clulow#
7b210e777SJoshua M. Clulow# A full copy of the text of the CDDL should have accompanied this
8b210e777SJoshua M. Clulow# source.  A copy of the CDDL is also available via the Internet at
9b210e777SJoshua M. Clulow# http://www.illumos.org/license/CDDL.
10b210e777SJoshua M. Clulow#
11b210e777SJoshua M. Clulow
12b210e777SJoshua M. Clulow#
13*bb9475a1SRobert Mustacchi# Copyright 2025 Oxide Computer Company
14b210e777SJoshua M. Clulow#
15b210e777SJoshua M. Clulow
16b210e777SJoshua M. ClulowPROGS = \
17b210e777SJoshua M. Clulow	ilstr_basic
18b210e777SJoshua M. Clulow
19b210e777SJoshua M. ClulowPROGS32 = $(PROGS:%=%.32)
20b210e777SJoshua M. ClulowPROGS64 = $(PROGS:%=%.64)
21b210e777SJoshua M. Clulow
22b210e777SJoshua M. ClulowCOMOBJS = ilstr.o
23b210e777SJoshua M. ClulowCOMOBJS32 = $(COMOBJS:.o=.32.o)
24b210e777SJoshua M. ClulowCOMOBJS64 = $(COMOBJS:.o=.64.o)
25b210e777SJoshua M. Clulow
26b210e777SJoshua M. ClulowROOTOPTDIR = $(ROOT)/opt/os-tests/tests
27b210e777SJoshua M. ClulowROOTOPTILSTR = $(ROOTOPTDIR)/ilstr
28b210e777SJoshua M. ClulowROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTILSTR)/%) $(PROGS64:%=$(ROOTOPTILSTR)/%)
29b210e777SJoshua M. Clulow
30b210e777SJoshua M. Clulowinclude $(SRC)/cmd/Makefile.cmd
31b210e777SJoshua M. Clulowinclude $(SRC)/cmd/Makefile.ctf
32b210e777SJoshua M. Clulow
33b210e777SJoshua M. ClulowLDLIBS += -lumem
34b210e777SJoshua M. ClulowLDLIBS64 += -lumem
35b210e777SJoshua M. Clulow
36b210e777SJoshua M. ClulowCTF_MODE = link
37b210e777SJoshua M. Clulow
38*bb9475a1SRobert MustacchiCSTD = $(CSTD_GNU17)
39b210e777SJoshua M. Clulow
40b210e777SJoshua M. Clulow.KEEP_STATE:
41b210e777SJoshua M. Clulow
42b210e777SJoshua M. Clulowall: $(PROGS32) $(PROGS64)
43b210e777SJoshua M. Clulow
44b210e777SJoshua M. Clulowinstall: $(ROOTOPTPROGS)
45b210e777SJoshua M. Clulow
46b210e777SJoshua M. Clulowclean:
47b210e777SJoshua M. Clulow	$(RM) $(COMOBJS32) $(COMOBJS64)
48b210e777SJoshua M. Clulow
49b210e777SJoshua M. Clulow$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTILSTR)
50b210e777SJoshua M. Clulow
51b210e777SJoshua M. Clulow$(ROOTOPTDIR):
52b210e777SJoshua M. Clulow	$(INS.dir)
53b210e777SJoshua M. Clulow
54b210e777SJoshua M. Clulow$(ROOTOPTILSTR): $(ROOTOPTDIR)
55b210e777SJoshua M. Clulow	$(INS.dir)
56b210e777SJoshua M. Clulow
57b210e777SJoshua M. Clulow$(ROOTOPTILSTR)/%: %
58b210e777SJoshua M. Clulow	$(INS.file)
59b210e777SJoshua M. Clulow
60b210e777SJoshua M. Clulow%.32: %.c $(COMOBJS32)
61b210e777SJoshua M. Clulow	$(LINK.c) -o $@ $^ $(LDLIBS)
62b210e777SJoshua M. Clulow	$(POST_PROCESS)
63b210e777SJoshua M. Clulow
64b210e777SJoshua M. Clulow%.64: %.c $(COMOBJS64)
65b210e777SJoshua M. Clulow	$(LINK64.c) -o $@ $^ $(LDLIBS64)
66b210e777SJoshua M. Clulow	$(POST_PROCESS)
67b210e777SJoshua M. Clulow
68b210e777SJoshua M. Clulow%.32.o: $(SRC)/common/ilstr/%.c
69b210e777SJoshua M. Clulow	$(COMPILE.c) $< -o $@
70b210e777SJoshua M. Clulow	$(POST_PROCESS_O)
71b210e777SJoshua M. Clulow
72b210e777SJoshua M. Clulow%.64.o: $(SRC)/common/ilstr/%.c
73b210e777SJoshua M. Clulow	$(COMPILE64.c) $< -o $@
74b210e777SJoshua M. Clulow	$(POST_PROCESS_O)
75b210e777SJoshua M. Clulow
76b210e777SJoshua M. Clulowclobber: clean
77b210e777SJoshua M. Clulow	$(RM) $(PROGS32) $(PROGS64)
78b210e777SJoshua M. Clulow
79b210e777SJoshua M. ClulowFRC:
80