xref: /illumos-gate/usr/src/test/os-tests/tests/imc/Makefile (revision 8226594fdd4479be135127f43632f1f995074654)
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 2019 Joyent, Inc.
14#
15
16ROOTOPTPKG = $(ROOT)/opt/os-tests
17TESTDIR = $(ROOTOPTPKG)/tests
18
19#
20# Test objects
21#
22OBJS =	imc_test.o \
23	imc_test_basic.o \
24	imc_test_badaddr.o \
25	imc_test_fail.o \
26	imc_test_rir.o \
27	imc_test_sad.o \
28	imc_test_skx_loop.o \
29	imc_test_tad.o
30
31#
32# Common objects that we need.
33#
34OBJS += imc_decode.o
35
36PROG = imc_test
37
38include $(SRC)/cmd/Makefile.cmd
39include $(SRC)/test/Makefile.com
40include $(SRC)/cmd/Makefile.ctf
41
42CPPFLAGS += -I$(SRC)/uts/intel/io/imc
43
44CMDS = $(PROG:%=$(TESTDIR)/%)
45$(CMDS) := FILEMODE = 0555
46
47all: $(PROG)
48
49install: all $(CMDS)
50
51clobber: clean
52	-$(RM) $(PROG)
53
54clean:
55	-$(RM) *.o
56
57$(CMDS): $(TESTDIR) $(PROG)
58
59$(TESTDIR):
60	$(INS.dir)
61
62$(TESTDIR)/%: %
63	$(INS.file)
64
65$(PROG): $(OBJS)
66	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
67	$(POST_PROCESS)
68
69%.o: %.c
70	$(COMPILE.c) $<
71	$(POST_PROCESS_O)
72
73%.o: $(SRC)/common/mc/imc/%.c
74	$(COMPILE.c) $<
75	$(POST_PROCESS_O)
76