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.file) 61 62$(PROG): $(OBJS) 63 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 64 $(POST_PROCESS) 65 66%.o: %.c 67 $(COMPILE.c) $< 68 $(POST_PROCESS_O) 69 70%.o: $(SRC)/common/mc/imc/%.c 71 $(COMPILE.c) $< 72 $(POST_PROCESS_O) 73