xref: /illumos-gate/usr/src/cmd/bhyve/Makefile.com (revision 4f82e07802416dd88f61770ddd96e9c040095895)
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 2015 Pluribus Networks Inc.
14#
15
16PROG= bhyve
17
18SRCS =	atkbdc.c		\
19	bhyvegc.c		\
20	bhyverun.c		\
21	block_if.c		\
22	console.c		\
23	consport.c		\
24	inout.c			\
25	ioapic.c		\
26	mem.c			\
27	mptbl.c			\
28	pci_ahci.c		\
29	pci_emul.c		\
30	pci_hostbridge.c	\
31	pci_irq.c		\
32	pci_lpc.c		\
33	pci_virtio_block.c	\
34	pci_virtio_net.c	\
35	pci_virtio_viona.c	\
36	pm.c			\
37	pmtmr.c			\
38	post.c			\
39	ps2kbd.c		\
40	ps2mouse.c		\
41	rfb.c			\
42	rtc.c			\
43	smbiostbl.c		\
44	uart_emul.c		\
45	vga.c			\
46	virtio.c		\
47	vmm_instruction_emul.c	\
48	xmsr.c			\
49	spinup_ap.c		\
50	bhyve_sol_glue.c
51
52OBJS = $(SRCS:.c=.o)
53
54include ../../Makefile.cmd
55
56.KEEP_STATE:
57
58CFLAGS +=	$(CCVERBOSE) -_gcc=-Wimplicit-function-declaration
59CFLAGS64 +=	$(CCVERBOSE) -_gcc=-Wimplicit-function-declaration
60CPPFLAGS =	-I$(COMPAT)/freebsd -I$(CONTRIB)/freebsd $(CPPFLAGS.master) \
61		-I$(ROOT)/usr/platform/i86pc/include \
62		-I$(SRC)/uts/i86pc/io/vmm \
63		-I$(SRC)/uts/common \
64		-I$(SRC)/uts/i86pc \
65		-I$(SRC)/lib/libdladm/common
66LDLIBS +=	-lsocket -lnsl -ldlpi -ldladm -lkstat -lmd -luuid -lvmmapi
67
68POST_PROCESS += ; $(GENSETDEFS) $@
69
70all: $(PROG)
71
72$(PROG): $(OBJS)
73	$(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
74	$(POST_PROCESS)
75
76install: all $(ROOTUSRSBINPROG)
77
78clean:
79	$(RM) $(OBJS)
80
81lint:	lint_SRCS
82
83include ../../Makefile.targ
84
85%.o: ../%.c
86	$(COMPILE.c) $<
87	$(POST_PROCESS_O)
88
89%.o: $(SRC)/uts/i86pc/io/vmm/%.c
90	$(COMPILE.c) $<
91	$(POST_PROCESS_O)
92
93%.o: ../%.s
94	$(COMPILE.s) $<
95