xref: /illumos-gate/usr/src/cmd/bhyvectl/Makefile (revision 957246c9e6c47389c40079995d73eebcc659fb29)
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)
31d0b3c59bSPatrick MooneyCPPFLAGS =	-I$(COMPAT)/bhyve -I$(CONTRIB)/bhyve \
32d0b3c59bSPatrick 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
38*957246c9SPatrick Mooney# Force c99 for everything
39*957246c9SPatrick MooneyCSTD=		$(CSTD_GNU99)
40*957246c9SPatrick Mooney
414c87aefeSPatrick MooneyCERRWARN +=	-_gcc=-Wno-uninitialized
42bf21cd93STycho Nightingale
434c87aefeSPatrick Mooney# main() is too hairy for smatch
444c87aefeSPatrick Mooneybhyvectl.o := SMATCH=off
45bf21cd93STycho Nightingale
464c87aefeSPatrick Mooneyall: $(PROG)
474c87aefeSPatrick Mooney
484c87aefeSPatrick Mooney$(PROG): $(OBJS)
494c87aefeSPatrick Mooney	$(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
504c87aefeSPatrick Mooney	$(POST_PROCESS)
514c87aefeSPatrick Mooney
524c87aefeSPatrick Mooneyinstall: all $(ROOTUSRSBINPROG)
534c87aefeSPatrick Mooney
544c87aefeSPatrick Mooneyclean:
554c87aefeSPatrick Mooney	$(RM) $(OBJS) $(CLEANFILES)
564c87aefeSPatrick Mooney
57bf21cd93STycho Nightingaleinclude ../Makefile.targ
584c87aefeSPatrick Mooney
59d0b3c59bSPatrick Mooney%.o: $(CONTRIB)/bhyve/lib/libutil/%.c
604c87aefeSPatrick Mooney	$(COMPILE.c) -o $@ $<
614c87aefeSPatrick Mooney	$(POST_PROCESS_O)
62