xref: /illumos-gate/usr/src/test/bhyve-tests/tests/Makefile (revision 5aaf65b1581c191cf1ecb7151a3ad599f33f45f9)
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 =	memmap
19
20ROOTOPTPKG = $(ROOT)/opt/bhyve-tests
21TESTDIR = $(ROOTOPTPKG)/tests
22
23CMDS = $(PROG:%=$(TESTDIR)/%)
24$(CMDS) := FILEMODE = 0555
25
26CSTD=		$(CSTD_GNU99)
27CPPFLAGS =	-I$(COMPAT)/bhyve -I$(CONTRIB)/bhyve \
28		-I$(COMPAT)/bhyve/amd64 -I$(CONTRIB)/bhyve/amd64 \
29		$(CPPFLAGS.master) \
30		-I$(SRC)/uts/i86pc/io/vmm \
31		-I$(SRC)/uts/i86pc
32$(PROG) := LDLIBS += \
33	-lvmmapi
34
35all: $(PROG)
36
37install: all $(CMDS)
38
39clobber: clean
40	-$(RM) $(PROG)
41
42$(CMDS): $(TESTDIR) $(PROG)
43
44$(TESTDIR):
45	$(INS.dir)
46
47$(TESTDIR)/%: %
48	$(INS.file)
49