VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/Support/linux/Makefile@ 85938

Last change on this file since 85938 was 85523, checked in by vboxsync, 4 years ago

SUPDrv/linux: Use two combined-agnostic.c files to undo the build time regression on systems with lots of cores. bugref:9798

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.9 KB
Line 
1# $Id: Makefile 85523 2020-07-29 11:54:52Z vboxsync $
2## @file
3# Makefile for the VirtualBox Linux Host Driver.
4#
5
6#
7# Copyright (C) 2006-2020 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# The contents of this file may alternatively be used under the terms
18# of the Common Development and Distribution License Version 1.0
19# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20# VirtualBox OSE distribution, in which case the provisions of the
21# CDDL are applicable instead of those of the GPL.
22#
23# You may elect to license modified versions of this file under the
24# terms and conditions of either the GPL or the CDDL or both.
25#
26
27# Find the directory of this makefile.
28VBOXDRV_DIR := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
29
30# Linux kbuild sets this to our source directory if we are called from there
31obj ?= $(CURDIR)
32include $(obj)/Makefile-header.gmk
33
34VBOXMOD_NAME = vboxdrv
35VBOXMOD_OBJS = \
36 linux/SUPDrv-linux.o \
37 SUPDrv.o \
38 SUPDrvGip.o \
39 SUPDrvSem.o \
40 SUPDrvTracer.o \
41 SUPLibAll.o \
42 common/string/strformatrt.o
43
44ifndef VBOX_WITHOUT_COMBINED_SOURCES
45VBOXMOD_OBJS += \
46 combined-agnostic1.o \
47 combined-agnostic2.o \
48 combined-os-specific.o
49else # VBOX_WITHOUT_COMBINED_SOURCES
50VBOXMOD_OBJS += \
51 r0drv/alloc-r0drv.o \
52 r0drv/initterm-r0drv.o \
53 r0drv/memobj-r0drv.o \
54 r0drv/mpnotification-r0drv.o \
55 r0drv/powernotification-r0drv.o \
56 r0drv/linux/assert-r0drv-linux.o \
57 r0drv/linux/alloc-r0drv-linux.o \
58 r0drv/linux/initterm-r0drv-linux.o \
59 r0drv/linux/memobj-r0drv-linux.o \
60 r0drv/linux/memuserkernel-r0drv-linux.o \
61 r0drv/linux/mp-r0drv-linux.o \
62 r0drv/linux/mpnotification-r0drv-linux.o \
63 r0drv/linux/process-r0drv-linux.o \
64 r0drv/linux/rtStrFormatKernelAddress-r0drv-linux.o \
65 r0drv/linux/semevent-r0drv-linux.o \
66 r0drv/linux/semeventmulti-r0drv-linux.o \
67 r0drv/linux/semfastmutex-r0drv-linux.o \
68 r0drv/linux/semmutex-r0drv-linux.o \
69 r0drv/linux/spinlock-r0drv-linux.o \
70 r0drv/linux/thread-r0drv-linux.o \
71 r0drv/linux/thread2-r0drv-linux.o \
72 r0drv/linux/threadctxhooks-r0drv-linux.o \
73 r0drv/linux/time-r0drv-linux.o \
74 r0drv/linux/timer-r0drv-linux.o \
75 r0drv/generic/semspinmutex-r0drv-generic.o \
76 common/alloc/alloc.o \
77 common/checksum/crc32.o \
78 common/checksum/ipv4.o \
79 common/checksum/ipv6.o \
80 common/err/RTErrConvertFromErrno.o \
81 common/err/RTErrConvertToErrno.o \
82 common/err/errinfo.o \
83 common/log/log.o \
84 common/log/logellipsis.o \
85 common/log/logrel.o \
86 common/log/logrelellipsis.o \
87 common/log/logcom.o \
88 common/log/logformat.o \
89 common/misc/RTAssertMsg1Weak.o \
90 common/misc/RTAssertMsg2.o \
91 common/misc/RTAssertMsg2Add.o \
92 common/misc/RTAssertMsg2AddWeak.o \
93 common/misc/RTAssertMsg2AddWeakV.o \
94 common/misc/RTAssertMsg2Weak.o \
95 common/misc/RTAssertMsg2WeakV.o \
96 common/misc/assert.o \
97 common/misc/handletable.o \
98 common/misc/handletablectx.o \
99 common/misc/thread.o \
100 common/string/RTStrCat.o \
101 common/string/RTStrCopy.o \
102 common/string/RTStrCopyEx.o \
103 common/string/RTStrCopyP.o \
104 common/string/RTStrEnd.o \
105 common/string/RTStrNCmp.o \
106 common/string/RTStrNLen.o \
107 common/string/stringalloc.o \
108 common/string/strformat.o \
109 common/string/strformatnum.o \
110 common/string/strformattype.o \
111 common/string/strprintf.o \
112 common/string/strtonum.o \
113 common/table/avlpv.o \
114 common/time/time.o \
115 r0drv/linux/RTLogWriteDebugger-r0drv-linux.o \
116 generic/RTAssertShouldPanic-generic.o \
117 generic/RTLogWriteStdErr-stub-generic.o \
118 generic/RTLogWriteStdOut-stub-generic.o \
119 generic/RTLogWriteUser-generic.o \
120 generic/RTMpGetArraySize-generic.o \
121 generic/RTMpGetCoreCount-generic.o \
122 generic/RTSemEventWait-2-ex-generic.o \
123 generic/RTSemEventWaitNoResume-2-ex-generic.o \
124 generic/RTSemEventMultiWait-2-ex-generic.o \
125 generic/RTSemEventMultiWaitNoResume-2-ex-generic.o \
126 generic/RTTimerCreate-generic.o \
127 generic/errvars-generic.o \
128 generic/mppresent-generic.o \
129 generic/uuid-generic.o \
130 VBox/log-vbox.o
131 ifeq ($(VBOX_KBUILD_TARGET_ARCH),amd64)
132VBOXMOD_OBJS += common/alloc/heapsimple.o
133 endif
134endif # VBOX_WITHOUT_COMBINED_SOURCES
135ifeq ($(VBOX_KBUILD_TARGET_ARCH),x86)
136VBOXMOD_OBJS += \
137 math/gcc/divdi3.o \
138 math/gcc/moddi3.o \
139 math/gcc/qdivrem.o \
140 math/gcc/udivdi3.o \
141 math/gcc/udivmoddi4.o \
142 math/gcc/divdi3.o \
143 math/gcc/umoddi3.o
144endif
145ifdef VBOX_WITH_NATIVE_DTRACE
146VBOXMOD_OBJS += SUPDrvDTrace.o
147endif
148
149VBOXMOD_INCL = \
150 $(VBOXDRV_DIR) \
151 $(VBOXDRV_DIR)include \
152 $(VBOXDRV_DIR)r0drv/linux
153ifdef VBOX_WITH_NATIVE_DTRACE
154VBOXMOD_INCL += \
155 /usr/include/linux \
156 /usr/include
157endif
158
159VBOXMOD_DEFS = \
160 RT_OS_LINUX \
161 IN_RING0 \
162 IN_RT_R0 \
163 IN_SUP_R0 \
164 VBOX \
165 RT_WITH_VBOX \
166 VBOX_WITH_HARDENING \
167 SUPDRV_WITH_RELEASE_LOGGER \
168 VBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV \
169 VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV \
170 IPRT_WITHOUT_EFLAGS_AC_PRESERVING \
171 IPRT_WITH_EFLAGS_AC_PRESERVING \
172 VBOX_WITH_64_BITS_GUESTS # <-- must be consistent with Config.kmk!
173ifndef CONFIG_VBOXDRV_FIXEDMAJOR
174VBOXMOD_DEFS += CONFIG_VBOXDRV_AS_MISC
175endif
176ifdef VBOX_WITH_NATIVE_DTRACE
177VBOXMOD_DEFS += VBOX_WITH_NATIVE_DTRACE
178endif
179ifdef VBOX_WITH_TEXT_MODMEM_HACK
180VBOXMOD_DEFS += RTMEMALLOC_EXEC_HEAP VBOX_WITH_TEXT_MODMEM_HACK
181endif
182VBOXMOD_CFLAGS = -include $(VBOXDRV_DIR)include/VBox/SUPDrvMangling.h \
183 -fno-omit-frame-pointer -fno-pie -Wno-declaration-after-statement
184
185
186include $(obj)/Makefile-footer.gmk
187
188check: $(VBOXMOD_0_TARGET)
189 @if ! readelf -p __ksymtab_strings vboxdrv.ko | grep -E "\[.*\] *(RT|g_..*RT.*)"; then \
190 echo "All exported IPRT symbols are properly renamed!"; \
191 else \
192 echo "error: Some exported IPRT symbols was not properly renamed! See above." >&2; \
193 false; \
194 fi
195
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette