xref: /illumos-gate/usr/src/cmd/bhyvectl/Makefile (revision d0b3c59b)
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 2013 Pluribus Networks Inc.
14# Copyright 2019 Joyent, Inc.
15#
16
17PROG =		bhyvectl
18
19include ../Makefile.cmd
20include ../Makefile.cmd.64
21
22SRCS =		bhyvectl.c
23OBJS =		$(SRCS:.c=.o) humanize_number.o
24
25CLEANFILES =	$(PROG)
26CLOBBERFILES +=	$(ROOTUSRSBINPROG)
27
28.KEEP_STATE:
29
30CFLAGS +=	$(CCVERBOSE)
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
36LDLIBS +=	-lvmmapi
37
38CERRWARN +=	-_gcc=-Wno-uninitialized
39
40# main() is too hairy for smatch
41bhyvectl.o := SMATCH=off
42
43all: $(PROG)
44
45$(PROG): $(OBJS)
46	$(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
47	$(POST_PROCESS)
48
49install: all $(ROOTUSRSBINPROG)
50
51clean:
52	$(RM) $(OBJS) $(CLEANFILES)
53
54include ../Makefile.targ
55
56%.o: $(CONTRIB)/bhyve/lib/libutil/%.c
57	$(COMPILE.c) -o $@ $<
58	$(POST_PROCESS_O)
59