xref: /illumos-gate/usr/src/test/bhyve-tests/tests/viona/Makefile (revision 533affcbc7fc4d0c8132976ea454aaa715fe2307)
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 =	interface_version
19
20CLEAN_OBJS =	$(PROG:%=%.o)
21
22ROOTOPTPKG = $(ROOT)/opt/bhyve-tests
23TESTDIR = $(ROOTOPTPKG)/tests/viona
24
25CMDS = $(PROG:%=$(TESTDIR)/%)
26$(CMDS) := FILEMODE = 0555
27
28CSTD=		$(CSTD_GNU99)
29CPPFLAGS =	$(CPPFLAGS.master) \
30		-I$(SRC)/uts/intel
31
32all: $(PROG)
33
34install: all $(CMDS)
35
36clean:
37	-$(RM) $(CLEAN_OBJS)
38clobber: clean
39	-$(RM) $(PROG)
40
41$(CMDS): $(TESTDIR) $(PROG)
42
43$(TESTDIR):
44	$(INS.dir)
45
46$(TESTDIR)/%: %
47	$(INS.file)
48
49%: %.o
50	$(LINK.c) -o $@ $< $(LDLIBS)
51	$(POST_PROCESS)
52