xref: /illumos-gate/usr/src/test/os-tests/tests/definit/Makefile (revision a28480febf31f0e61debac062a55216a98a05a92)
1*a28480feSAndy Fiddaman#
2*a28480feSAndy Fiddaman# This file and its contents are supplied under the terms of the
3*a28480feSAndy Fiddaman# Common Development and Distribution License ("CDDL"), version 1.0.
4*a28480feSAndy Fiddaman# You may only use this file in accordance with the terms of version
5*a28480feSAndy Fiddaman# 1.0 of the CDDL.
6*a28480feSAndy Fiddaman#
7*a28480feSAndy Fiddaman# A full copy of the text of the CDDL should have accompanied this
8*a28480feSAndy Fiddaman# source.  A copy of the CDDL is also available via the Internet at
9*a28480feSAndy Fiddaman# http://www.illumos.org/license/CDDL.
10*a28480feSAndy Fiddaman#
11*a28480feSAndy Fiddaman
12*a28480feSAndy Fiddaman#
13*a28480feSAndy Fiddaman# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
14*a28480feSAndy Fiddaman#
15*a28480feSAndy Fiddaman
16*a28480feSAndy Fiddamaninclude $(SRC)/cmd/Makefile.cmd
17*a28480feSAndy Fiddamaninclude $(SRC)/test/Makefile.com
18*a28480feSAndy Fiddaman
19*a28480feSAndy FiddamanPROG = definit_test.32 definit_test.64
20*a28480feSAndy Fiddaman
21*a28480feSAndy FiddamanOBJS = definit.o definit_test.o
22*a28480feSAndy FiddamanOBJS32 = $(OBJS:.o=.32.o)
23*a28480feSAndy FiddamanOBJS64 = $(OBJS:.o=.64.o)
24*a28480feSAndy Fiddaman
25*a28480feSAndy FiddamanDATAFILES = init.data init.expected
26*a28480feSAndy Fiddaman
27*a28480feSAndy FiddamanCSTD = $(CSTD_GNU99)
28*a28480feSAndy FiddamanCPPFLAGS += -I$(SRC)/common/definit
29*a28480feSAndy Fiddaman
30*a28480feSAndy FiddamanROOTOPTPKG = $(ROOT)/opt/os-tests
31*a28480feSAndy FiddamanTESTDIR = $(ROOTOPTPKG)/tests/definit
32*a28480feSAndy Fiddaman
33*a28480feSAndy FiddamanCMDS = $(PROG:%=$(TESTDIR)/%) $(TESTDIR)/definit
34*a28480feSAndy Fiddaman$(CMDS) := FILEMODE = 0555
35*a28480feSAndy FiddamanDATA = $(DATAFILES:%=$(TESTDIR)/%)
36*a28480feSAndy Fiddaman$(DATA) := FILEMODE = 0444
37*a28480feSAndy Fiddaman
38*a28480feSAndy FiddamanLDLIBS += -lc
39*a28480feSAndy FiddamanLDLIBS64 += -lc
40*a28480feSAndy Fiddaman
41*a28480feSAndy Fiddamanall: $(PROG)
42*a28480feSAndy Fiddaman
43*a28480feSAndy Fiddamaninstall: $(CMDS) $(DATA)
44*a28480feSAndy Fiddaman
45*a28480feSAndy Fiddamanclobber: clean
46*a28480feSAndy Fiddaman	-$(RM) $(PROG)
47*a28480feSAndy Fiddaman
48*a28480feSAndy Fiddamanclean:
49*a28480feSAndy Fiddaman	-$(RM) $(OBJS32) $(OBJS64)
50*a28480feSAndy Fiddaman
51*a28480feSAndy Fiddaman$(CMDS): $(TESTDIR) $(PROG)
52*a28480feSAndy Fiddaman
53*a28480feSAndy Fiddaman$(TESTDIR):
54*a28480feSAndy Fiddaman	$(INS.dir)
55*a28480feSAndy Fiddaman
56*a28480feSAndy Fiddaman$(TESTDIR)/%: %
57*a28480feSAndy Fiddaman	$(INS.file)
58*a28480feSAndy Fiddaman
59*a28480feSAndy Fiddaman$(TESTDIR)/%: %.ksh
60*a28480feSAndy Fiddaman	$(INS.rename)
61*a28480feSAndy Fiddaman
62*a28480feSAndy Fiddaman%.32.o: %.c
63*a28480feSAndy Fiddaman	$(COMPILE.c) $< -o $@
64*a28480feSAndy Fiddaman
65*a28480feSAndy Fiddaman%.64.o: %.c
66*a28480feSAndy Fiddaman	$(COMPILE64.c) $< -o $@
67*a28480feSAndy Fiddaman
68*a28480feSAndy Fiddaman%.32.o: $(SRC)/common/definit/%.c
69*a28480feSAndy Fiddaman	$(COMPILE.c) $< -o $@
70*a28480feSAndy Fiddaman
71*a28480feSAndy Fiddaman%.64.o: $(SRC)/common/definit/%.c
72*a28480feSAndy Fiddaman	$(COMPILE64.c) $< -o $@
73*a28480feSAndy Fiddaman
74*a28480feSAndy Fiddamandefinit_test.64: $(OBJS64)
75*a28480feSAndy Fiddaman	$(LINK64.c) -o $@ $(OBJS64) $(LDLIBS64)
76*a28480feSAndy Fiddaman	$(POST_PROCESS)
77*a28480feSAndy Fiddaman
78*a28480feSAndy Fiddamandefinit_test.32: $(OBJS32)
79*a28480feSAndy Fiddaman	$(LINK.c) -o $@ $(OBJS32) $(LDLIBS)
80*a28480feSAndy Fiddaman	$(POST_PROCESS)
81*a28480feSAndy Fiddaman
82*a28480feSAndy Fiddaman
83