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 2022 Oxide Computer Company 13 14include $(SRC)/cmd/Makefile.cmd 15include $(SRC)/cmd/Makefile.cmd.64 16include $(SRC)/test/Makefile.com 17 18PROG = mem_partial \ 19 mem_seg_map 20 21COMMON_OBJS = common.o 22CLEAN_OBJS = $(PROG:%=%.o) 23 24ROOTOPTPKG = $(ROOT)/opt/bhyve-tests 25TESTDIR = $(ROOTOPTPKG)/tests/vmm 26 27CMDS = $(PROG:%=$(TESTDIR)/%) 28$(CMDS) := FILEMODE = 0555 29 30CSTD= $(CSTD_GNU99) 31CPPFLAGS = -I$(COMPAT)/bhyve -I$(CONTRIB)/bhyve \ 32 -I$(COMPAT)/bhyve/amd64 -I$(CONTRIB)/bhyve/amd64 \ 33 $(CPPFLAGS.master) \ 34 -I$(SRC)/uts/i86pc/io/vmm \ 35 -I$(SRC)/uts/i86pc 36$(PROG) := LDLIBS += -lvmmapi 37 38all: $(PROG) 39 40install: all $(CMDS) 41 42clean: 43 -$(RM) $(CLEAN_OBJS) $(COMMON_OBJS) 44clobber: clean 45 -$(RM) $(PROG) 46 47$(PROG): $(COMMON_OBJS) 48 49$(CMDS): $(TESTDIR) $(PROG) 50 51$(TESTDIR): 52 $(INS.dir) 53 54$(TESTDIR)/%: % 55 $(INS.file) 56 57%: %.o 58 $(LINK.c) -o $@ $< $(COMMON_OBJS) $(LDLIBS) 59 $(POST_PROCESS) 60