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# Copyright 2024 Oxide Computer Company 13 14include $(SRC)/cmd/Makefile.cmd 15include $(SRC)/cmd/Makefile.cmd.64 16include $(SRC)/test/Makefile.com 17 18PROGS = interface_version create_delete link_params 19 20SCRIPTS = setup cleanup 21 22COMMON_OBJS = in_guest.o common.o viona_suite.o null_payload.o 23 24CLEAN_OBJS = $(PROGS:%=%.o) $(COMMON_OBJS) 25 26ROOTOPTPKG = $(ROOT)/opt/bhyve-tests 27TESTDIR = $(ROOTOPTPKG)/tests/viona 28 29CMDS = \ 30 $(PROGS:%=$(TESTDIR)/%) \ 31 $(SCRIPTS:%=$(TESTDIR)/%) 32 33$(CMDS) := FILEMODE = 0555 34 35CSTD= $(CSTD_GNU99) 36CPPFLAGS = -I$(COMPAT)/bhyve -I$(CONTRIB)/bhyve \ 37 -I$(COMPAT)/bhyve/amd64 -I$(CONTRIB)/bhyve/amd64 \ 38 $(CPPFLAGS.master) \ 39 -I$(SRC)/uts/intel/io/vmm \ 40 -I$(SRC)/uts/intel \ 41 -I../common 42 43$(PROGS) := LDLIBS += -lvmmapi -ldladm 44link_params := LDLIBS += -lnvpair 45 46all: $(PROGS) 47 48install: all $(CMDS) 49 50clean: 51 -$(RM) $(CLEAN_OBJS) 52clobber: clean 53 -$(RM) $(PROGS) 54 55$(CMDS): $(TESTDIR) 56 57$(TESTDIR): 58 $(INS.dir) 59 60$(TESTDIR)/%: % 61 $(INS.file) 62 63$(TESTDIR)/%: %.ksh 64 $(INS.rename) 65 66%.o: ../common/%.c 67 $(COMPILE.c) -o $@ $^ 68 $(POST_PROCESS) 69 70%: %.o $(COMMON_OBJS) 71 $(LINK.c) -o $@ $^ $(LDLIBS) 72 $(POST_PROCESS) 73