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/intel/io/vmm \ 35 -I$(SRC)/uts/intel 36LDLIBS += -lvmmapi 37 38# Force c99 for everything 39CSTD= $(CSTD_GNU99) 40 41CERRWARN += -_gcc=-Wno-uninitialized 42 43# main() is too hairy for smatch 44bhyvectl.o := SMATCH=off 45 46all: $(PROG) 47 48$(PROG): $(OBJS) 49 $(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) 50 $(POST_PROCESS) 51 52install: all $(ROOTUSRSBINPROG) 53 54clean: 55 $(RM) $(OBJS) $(CLEANFILES) 56 57include ../Makefile.targ 58 59%.o: $(CONTRIB)/bhyve/lib/libutil/%.c 60 $(COMPILE.c) -o $@ $< 61 $(POST_PROCESS_O) 62