1 | # $Id: Makefile 98103 2023-01-17 14:15:46Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the VirtualBox FreeBSD Host Driver.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # The contents of this file may alternatively be used under the terms
|
---|
26 | # of the Common Development and Distribution License Version 1.0
|
---|
27 | # (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
|
---|
28 | # in the VirtualBox distribution, in which case the provisions of the
|
---|
29 | # CDDL are applicable instead of those of the GPL.
|
---|
30 | #
|
---|
31 | # You may elect to license modified versions of this file under the
|
---|
32 | # terms and conditions of either the GPL or the CDDL or both.
|
---|
33 | #
|
---|
34 | # SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
|
---|
35 | #
|
---|
36 |
|
---|
37 | KMOD = vboxdrv
|
---|
38 |
|
---|
39 | CFLAGS += -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DSUPDRV_WITH_RELEASE_LOGGER -DVBOX -DRT_WITH_VBOX -Iinclude -I. -Ir0drv -w -DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS
|
---|
40 |
|
---|
41 | .if (${MACHINE_ARCH} == "i386")
|
---|
42 | CFLAGS += -DRT_ARCH_X86
|
---|
43 | .elif (${MACHINE_ARCH} == "amd64")
|
---|
44 | CFLAGS += -DRT_ARCH_AMD64
|
---|
45 | .endif
|
---|
46 |
|
---|
47 | SRCS = \
|
---|
48 | SUPDrv.c \
|
---|
49 | SUPDrvGip.c \
|
---|
50 | SUPDrvSem.c \
|
---|
51 | SUPDrvTracer.c \
|
---|
52 | SUPLibAll.c \
|
---|
53 |
|
---|
54 | # Include needed interface headers so they are created during build
|
---|
55 | SRCS += \
|
---|
56 | device_if.h \
|
---|
57 | bus_if.h
|
---|
58 |
|
---|
59 | .PATH: ${.CURDIR}/freebsd
|
---|
60 | SRCS += \
|
---|
61 | SUPDrv-freebsd.c
|
---|
62 |
|
---|
63 | .PATH: ${.CURDIR}/alloc
|
---|
64 | SRCS += \
|
---|
65 | heapsimple.c \
|
---|
66 | alloc.c
|
---|
67 |
|
---|
68 | .PATH: ${.CURDIR}/common/err
|
---|
69 | SRCS += \
|
---|
70 | RTErrConvertFromErrno.c \
|
---|
71 | RTErrConvertToErrno.c \
|
---|
72 | errinfo.c
|
---|
73 |
|
---|
74 | .PATH: ${.CURDIR}/common/log
|
---|
75 | SRCS += \
|
---|
76 | log.c \
|
---|
77 | logellipsis.c \
|
---|
78 | logrel.c \
|
---|
79 | logrelellipsis.c \
|
---|
80 | logcom.c \
|
---|
81 | logformat.c \
|
---|
82 | RTLogCreateEx.c
|
---|
83 |
|
---|
84 | .PATH: ${.CURDIR}/common/misc
|
---|
85 | SRCS += \
|
---|
86 | RTAssertMsg1Weak.c \
|
---|
87 | RTAssertMsg2.c \
|
---|
88 | RTAssertMsg2Add.c \
|
---|
89 | RTAssertMsg2AddWeak.c \
|
---|
90 | RTAssertMsg2AddWeakV.c \
|
---|
91 | RTAssertMsg2Weak.c \
|
---|
92 | RTAssertMsg2WeakV.c \
|
---|
93 | assert.c \
|
---|
94 | handletable.c \
|
---|
95 | handletablectx.c \
|
---|
96 | once.c \
|
---|
97 | term.c \
|
---|
98 | thread.c
|
---|
99 |
|
---|
100 | .PATH: ${.CURDIR}/common/string
|
---|
101 | SRCS += \
|
---|
102 | RTStrCat.c \
|
---|
103 | RTStrNCmp.c \
|
---|
104 | RTStrNLen.c \
|
---|
105 | RTStrCopy.c \
|
---|
106 | RTStrCopyEx.c \
|
---|
107 | RTStrCopyP.c \
|
---|
108 | RTStrEnd.c \
|
---|
109 | strformat.c \
|
---|
110 | RTStrFormat.c \
|
---|
111 | strformatnum.c \
|
---|
112 | strformatrt.c \
|
---|
113 | strformattype.c \
|
---|
114 | strprintf.c \
|
---|
115 | strprintf-ellipsis.c \
|
---|
116 | strprintf2.c \
|
---|
117 | strprintf2-ellipsis.c \
|
---|
118 | strtonum.c \
|
---|
119 | memchr.c \
|
---|
120 | stringalloc.c
|
---|
121 |
|
---|
122 | .PATH: ${.CURDIR}/common/rand
|
---|
123 | SRCS += \
|
---|
124 | rand.c \
|
---|
125 | randadv.c \
|
---|
126 | randparkmiller.c
|
---|
127 |
|
---|
128 | .PATH: ${.CURDIR}/common/path
|
---|
129 | SRCS += \
|
---|
130 | RTPathStripFilename.c
|
---|
131 |
|
---|
132 | .PATH: ${.CURDIR}/common/checksum
|
---|
133 | SRCS += \
|
---|
134 | crc32.c \
|
---|
135 | ipv4.c \
|
---|
136 | ipv6.c
|
---|
137 |
|
---|
138 | .PATH: ${.CURDIR}/common/table
|
---|
139 | SRCS += \
|
---|
140 | avlpv.c
|
---|
141 |
|
---|
142 | .PATH: ${.CURDIR}/common/time
|
---|
143 | SRCS += \
|
---|
144 | time.c
|
---|
145 |
|
---|
146 | .PATH: ${.CURDIR}/generic
|
---|
147 | SRCS += \
|
---|
148 | uuid-generic.c \
|
---|
149 | RTAssertShouldPanic-generic.c \
|
---|
150 | RTLogWriteDebugger-generic.c \
|
---|
151 | RTLogWriteStdOut-stub-generic.c \
|
---|
152 | RTLogWriteStdErr-stub-generic.c \
|
---|
153 | RTLogWriteUser-generic.c \
|
---|
154 | RTMpGetArraySize-generic.c \
|
---|
155 | RTMpOnPair-generic.c \
|
---|
156 | RTRandAdvCreateSystemFaster-generic.c \
|
---|
157 | RTRandAdvCreateSystemTruer-generic.c \
|
---|
158 | RTSemEventWait-2-ex-generic.c \
|
---|
159 | RTSemEventWaitNoResume-2-ex-generic.c \
|
---|
160 | RTSemEventMultiWait-2-ex-generic.c \
|
---|
161 | RTSemEventMultiWaitNoResume-2-ex-generic.c \
|
---|
162 | RTTimerCreate-generic.c \
|
---|
163 | rtStrFormatKernelAddress-generic.c \
|
---|
164 | errvars-generic.c \
|
---|
165 | mppresent-generic.c \
|
---|
166 | timer-generic.c
|
---|
167 |
|
---|
168 | .PATH: ${.CURDIR}/r0drv
|
---|
169 | SRCS += \
|
---|
170 | alloc-r0drv.c \
|
---|
171 | alloc-ef-r0drv.c \
|
---|
172 | initterm-r0drv.c \
|
---|
173 | memobj-r0drv.c \
|
---|
174 | powernotification-r0drv.c
|
---|
175 |
|
---|
176 | .PATH: ${.CURDIR}/r0drv/freebsd
|
---|
177 | SRCS += \
|
---|
178 | assert-r0drv-freebsd.c \
|
---|
179 | alloc-r0drv-freebsd.c \
|
---|
180 | initterm-r0drv-freebsd.c \
|
---|
181 | memobj-r0drv-freebsd.c \
|
---|
182 | memuserkernel-r0drv-freebsd.c \
|
---|
183 | mp-r0drv-freebsd.c \
|
---|
184 | process-r0drv-freebsd.c \
|
---|
185 | semevent-r0drv-freebsd.c \
|
---|
186 | semeventmulti-r0drv-freebsd.c \
|
---|
187 | semfastmutex-r0drv-freebsd.c \
|
---|
188 | semmutex-r0drv-freebsd.c \
|
---|
189 | spinlock-r0drv-freebsd.c \
|
---|
190 | thread-r0drv-freebsd.c \
|
---|
191 | thread2-r0drv-freebsd.c \
|
---|
192 | time-r0drv-freebsd.c
|
---|
193 |
|
---|
194 | .PATH: ${.CURDIR}/r0drv/generic
|
---|
195 | SRCS += \
|
---|
196 | semspinmutex-r0drv-generic.c \
|
---|
197 | mpnotification-r0drv-generic.c \
|
---|
198 | threadctxhooks-r0drv-generic.c \
|
---|
199 | RTMpIsCpuWorkPending-r0drv-generic.c
|
---|
200 |
|
---|
201 | .PATH: ${.CURDIR}/VBox
|
---|
202 | SRCS += \
|
---|
203 | log-vbox.c \
|
---|
204 | RTLogWriteVmm-amd64-x86.c
|
---|
205 |
|
---|
206 | .include <bsd.kmod.mk>
|
---|
207 |
|
---|