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
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.
13 # Copyright 2014 Pluribus Networks Inc.
14 # Copyright 2020 Joyent, Inc.
15 # Copyright 2020 Oxide Computer Company
16 # Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
21 include ..
/Makefile.cmd
22 include ..
/Makefile.cmd
.64
23 include ..
/Makefile.ctf
28 install := TARGET
= install
29 clean := TARGET
= clean
30 clobber := TARGET
= clobber
63 pci_virtio_console.c \
90 # We are not yet performing instruction emulation in userspace, so going to the
91 # trouble of fixing the header tangle for this is not worth the complexity.
94 # The virtio-scsi driver appears to include a slew of materials from FreeBSD's
95 # native SCSI implementation. We will omit that complexity for now.
100 # The audio backend in FreeBSD is different than the one found in audio_oss.h
105 # The virtio input device expects to link to a FreeBSD /dev/input/eventX device
106 #pci_virtio_input.c \
110 MEVENT_TEST_PROG
= mevent_test
111 MEVENT_TEST_SRCS
= mevent.c mevent_test.c
112 MEVENT_TEST_OBJS
= $(MEVENT_TEST_SRCS
:.c
=.o
)
114 CLEANFILES
= $(OBJS
) $(MEVENT_TEST_OBJS
)
115 CLOBBERFILES
= $(PROG
) $(MEVENT_TEST_PROG
)
117 CFLAGS
+= $(CCVERBOSE
)
118 CFLAGS
+= -_gcc
=-Wimplicit-function-declaration
119 CPPFLAGS
= -I
$(COMPAT
)/bhyve
-I
$(CONTRIB
)/bhyve \
120 -I
$(COMPAT
)/bhyve
/amd64
-I
$(CONTRIB
)/bhyve
/amd64 \
121 -I
$(CONTRIB
)/bhyve
/dev
/usb
/controller \
122 -I
$(CONTRIB
)/bhyve
/dev
/mii \
123 -I
$(SRC
)/lib
/lib9p
/common \
124 -I
$(SRC
)/uts
/common
/io
/e1000api \
126 -I
$(SRC
)/uts
/intel
/io
/vmm \
127 -I
$(SRC
)/uts
/common \
131 SMOFF
+= all_func_returns
134 # Force c99 for everything
137 $(PROG
) := LDLIBS
+= \
152 NATIVE_LIBS
+= libz.so libcrypto.so
153 $(MEVENT_TEST_PROG
) := LDLIBS
+= -lsocket
154 $(PROG
) := LDFLAGS
+= $(ZASLR
)
158 all: $(PROG
) $(MEVENT_TEST_PROG
) $(SUBDIRS
)
161 $(LINK.c
) -o
$@
$(OBJS
) $(LDFLAGS
) $(LDLIBS
)
164 $(MEVENT_TEST_PROG
): $(MEVENT_TEST_OBJS
)
165 $(LINK.c
) -o
$@
$(MEVENT_TEST_OBJS
) $(LDFLAGS
) $(LDLIBS
)
167 install: all $(ROOTUSRSBINPROG
) $(SUBDIRS
)
172 clobber: clean $(SUBDIRS
)
173 $(RM
) $(CLOBBERFILES
)
176 @cd
$@
; pwd
; $(MAKE
) $(TARGET
)