xref: /illumos-gate/usr/src/cmd/bhyvectl/Makefile (revision d0b3c59ba652f183eeec1414dd9fbdc56bf05cc8)
1bf21cd93STycho Nightingale#
2bf21cd93STycho Nightingale# This file and its contents are supplied under the terms of the
3bf21cd93STycho Nightingale# Common Development and Distribution License ("CDDL"), version 1.0.
4bf21cd93STycho Nightingale# You may only use this file in accordance with the terms of version
5bf21cd93STycho Nightingale# 1.0 of the CDDL.
6bf21cd93STycho Nightingale#
7bf21cd93STycho Nightingale# A full copy of the text of the CDDL should have accompanied this
8bf21cd93STycho Nightingale# source.  A copy of the CDDL is also available via the Internet at
9bf21cd93STycho Nightingale# http://www.illumos.org/license/CDDL.
10bf21cd93STycho Nightingale#
11bf21cd93STycho Nightingale
12bf21cd93STycho Nightingale#
13bf21cd93STycho Nightingale# Copyright 2013 Pluribus Networks Inc.
144c87aefeSPatrick Mooney# Copyright 2019 Joyent, Inc.
15bf21cd93STycho Nightingale#
16bf21cd93STycho Nightingale
17bf21cd93STycho NightingalePROG =		bhyvectl
18bf21cd93STycho Nightingale
19bf21cd93STycho Nightingaleinclude ../Makefile.cmd
204c87aefeSPatrick Mooneyinclude ../Makefile.cmd.64
21bf21cd93STycho Nightingale
224c87aefeSPatrick MooneySRCS =		bhyvectl.c
234c87aefeSPatrick MooneyOBJS =		$(SRCS:.c=.o) humanize_number.o
24bf21cd93STycho Nightingale
254c87aefeSPatrick MooneyCLEANFILES =	$(PROG)
264c87aefeSPatrick MooneyCLOBBERFILES +=	$(ROOTUSRSBINPROG)
27bf21cd93STycho Nightingale
28bf21cd93STycho Nightingale.KEEP_STATE:
29bf21cd93STycho Nightingale
304c87aefeSPatrick MooneyCFLAGS +=	$(CCVERBOSE)
31*d0b3c59bSPatrick MooneyCPPFLAGS =	-I$(COMPAT)/bhyve -I$(CONTRIB)/bhyve \
32*d0b3c59bSPatrick Mooney		-I$(COMPAT)/bhyve/amd64 -I$(CONTRIB)/bhyve/amd64 \
334c87aefeSPatrick Mooney		$(CPPFLAGS.master) \
344c87aefeSPatrick Mooney		-I$(SRC)/uts/i86pc/io/vmm \
354c87aefeSPatrick Mooney		-I$(SRC)/uts/i86pc
364c87aefeSPatrick MooneyLDLIBS +=	-lvmmapi
37bf21cd93STycho Nightingale
384c87aefeSPatrick MooneyCERRWARN +=	-_gcc=-Wno-uninitialized
39bf21cd93STycho Nightingale
404c87aefeSPatrick Mooney# main() is too hairy for smatch
414c87aefeSPatrick Mooneybhyvectl.o := SMATCH=off
42bf21cd93STycho Nightingale
434c87aefeSPatrick Mooneyall: $(PROG)
444c87aefeSPatrick Mooney
454c87aefeSPatrick Mooney$(PROG): $(OBJS)
464c87aefeSPatrick Mooney	$(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
474c87aefeSPatrick Mooney	$(POST_PROCESS)
484c87aefeSPatrick Mooney
494c87aefeSPatrick Mooneyinstall: all $(ROOTUSRSBINPROG)
504c87aefeSPatrick Mooney
514c87aefeSPatrick Mooneyclean:
524c87aefeSPatrick Mooney	$(RM) $(OBJS) $(CLEANFILES)
534c87aefeSPatrick Mooney
54bf21cd93STycho Nightingaleinclude ../Makefile.targ
554c87aefeSPatrick Mooney
56*d0b3c59bSPatrick Mooney%.o: $(CONTRIB)/bhyve/lib/libutil/%.c
574c87aefeSPatrick Mooney	$(COMPILE.c) -o $@ $<
584c87aefeSPatrick Mooney	$(POST_PROCESS_O)
59