Makefile (bf21cd9318e0a3a51b7f02c14a7c1b1aef2dc861) Makefile (4c87aefe8930bd07275b8dd2e96ea5f24d93a52e)
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.
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.
14#
15
16PROG = bhyvectl
17
18include ../Makefile.cmd
15#
16
17PROG = bhyvectl
18
19include ../Makefile.cmd
20include ../Makefile.cmd.64
19
21
20$(BUILD64)SUBDIRS += $(MACH64)
22SRCS = bhyvectl.c
23OBJS = $(SRCS:.c=.o) humanize_number.o
21
24
22all := TARGET = all
23install := TARGET = install
24clean := TARGET = clean
25clobber := TARGET = clobber
26lint := TARGET = lint
25CLEANFILES = $(PROG)
26CLOBBERFILES += $(ROOTUSRSBINPROG)
27
28.KEEP_STATE:
29
27
28.KEEP_STATE:
29
30all clean clobber lint: $(SUBDIRS)
30CFLAGS += $(CCVERBOSE)
31CPPFLAGS = -I$(COMPAT)/freebsd -I$(CONTRIB)/freebsd \
32 -I$(COMPAT)/freebsd/amd64 -I$(CONTRIB)/freebsd/amd64 \
33 $(CPPFLAGS.master) \
34 -I$(SRC)/uts/i86pc/io/vmm \
35 -I$(SRC)/uts/i86pc
36LDLIBS += -lvmmapi
31
37
32install: $(SUBDIRS)
33 -$(RM) $(ROOTUSRSBINPROG)
34 -$(LN) $(ISAEXEC) $(ROOTUSRSBINPROG)
38CERRWARN += -_gcc=-Wno-uninitialized
35
39
36$(SUBDIRS): FRC
37 @cd $@; pwd; $(MAKE) CW_NO_SHADOW=true __GNUC= $(TARGET)
40# main() is too hairy for smatch
41bhyvectl.o := SMATCH=off
38
42
39FRC:
43all: $(PROG)
40
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
54lint: lint_SRCS
55
41include ../Makefile.targ
56include ../Makefile.targ
57
58%.o: $(CONTRIB)/freebsd/lib/libutil/%.c
59 $(COMPILE.c) -o $@ $<
60 $(POST_PROCESS_O)