VirtualBox

source: vbox/trunk/src/VBox/Additions/common/VBoxGuest/linux/Makefile@ 74950

Last change on this file since 74950 was 70160, checked in by vboxsync, 7 years ago

VboxGuest: linux & freebsd needs more source to deal with string dependencies...

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1# $Revision: 70160 $
2## @file
3# VirtualBox Guest Additions Module Makefile.
4#
5
6#
7# Copyright (C) 2006-2017 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# Linux kbuild sets this to our source directory if we are called from there
28obj ?= $(CURDIR)
29include $(obj)/Makefile.include.header
30
31MOD_NAME = vboxguest
32
33MOD_OBJS = \
34 VBoxGuest-linux.o \
35 VBoxGuest.o \
36 VBoxGuestR0LibGenericRequest.o \
37 VBoxGuestR0LibHGCMInternal.o \
38 VBoxGuestR0LibInit.o \
39 VBoxGuestR0LibPhysHeap.o \
40 VBoxGuestR0LibVMMDev.o \
41 r0drv/alloc-r0drv.o \
42 r0drv/initterm-r0drv.o \
43 r0drv/memobj-r0drv.o \
44 r0drv/mpnotification-r0drv.o \
45 r0drv/powernotification-r0drv.o \
46 r0drv/linux/alloc-r0drv-linux.o \
47 r0drv/linux/assert-r0drv-linux.o \
48 r0drv/linux/initterm-r0drv-linux.o \
49 r0drv/linux/memobj-r0drv-linux.o \
50 r0drv/linux/memuserkernel-r0drv-linux.o \
51 r0drv/linux/mp-r0drv-linux.o \
52 r0drv/linux/mpnotification-r0drv-linux.o \
53 r0drv/linux/process-r0drv-linux.o \
54 r0drv/linux/semevent-r0drv-linux.o \
55 r0drv/linux/semeventmulti-r0drv-linux.o \
56 r0drv/linux/semfastmutex-r0drv-linux.o \
57 r0drv/linux/semmutex-r0drv-linux.o \
58 r0drv/linux/spinlock-r0drv-linux.o \
59 r0drv/linux/thread-r0drv-linux.o \
60 r0drv/linux/thread2-r0drv-linux.o \
61 r0drv/linux/time-r0drv-linux.o \
62 r0drv/linux/timer-r0drv-linux.o \
63 r0drv/linux/RTLogWriteDebugger-r0drv-linux.o \
64 r0drv/generic/semspinmutex-r0drv-generic.o \
65 common/alloc/alloc.o \
66 common/err/RTErrConvertFromErrno.o \
67 common/err/RTErrConvertToErrno.o \
68 common/err/errinfo.o \
69 common/log/log.o \
70 common/log/logellipsis.o \
71 common/log/logrel.o \
72 common/log/logrelellipsis.o \
73 common/log/logcom.o \
74 common/log/logformat.o \
75 common/misc/RTAssertMsg1Weak.o \
76 common/misc/RTAssertMsg2.o \
77 common/misc/RTAssertMsg2Add.o \
78 common/misc/RTAssertMsg2AddWeak.o \
79 common/misc/RTAssertMsg2AddWeakV.o \
80 common/misc/RTAssertMsg2Weak.o \
81 common/misc/RTAssertMsg2WeakV.o \
82 common/misc/assert.o \
83 common/misc/thread.o \
84 common/string/RTStrCat.o \
85 common/string/RTStrCmp.o \
86 common/string/RTStrCopy.o \
87 common/string/RTStrCopyEx.o \
88 common/string/RTStrCopyP.o \
89 common/string/RTStrICmpAscii.o \
90 common/string/RTStrNICmpAscii.o \
91 common/string/RTStrNCmp.o \
92 common/string/RTStrNLen.o \
93 common/string/stringalloc.o \
94 common/string/strformat.o \
95 common/string/strformatnum.o \
96 common/string/strformatrt.o \
97 common/string/strformattype.o \
98 common/string/strprintf.o \
99 common/string/strtonum.o \
100 common/string/utf-8.o \
101 common/table/avlpv.o \
102 common/time/time.o \
103 generic/RTAssertShouldPanic-generic.o \
104 generic/RTLogWriteStdErr-stub-generic.o \
105 generic/RTLogWriteStdOut-stub-generic.o \
106 generic/RTMpGetCoreCount-generic.o \
107 generic/RTSemEventWait-2-ex-generic.o \
108 generic/RTSemEventWaitNoResume-2-ex-generic.o \
109 generic/RTSemEventMultiWait-2-ex-generic.o \
110 generic/RTSemEventMultiWaitNoResume-2-ex-generic.o \
111 generic/rtStrFormatKernelAddress-generic.o \
112 generic/errvars-generic.o \
113 generic/mppresent-generic.o \
114 VBox/log-vbox.o \
115 VBox/logbackdoor.o
116ifeq ($(BUILD_TARGET_ARCH),x86)
117MOD_OBJS += \
118 common/math/gcc/divdi3.o \
119 common/math/gcc/moddi3.o \
120 common/math/gcc/udivdi3.o \
121 common/math/gcc/udivmoddi4.o \
122 common/math/gcc/umoddi3.o \
123 common/math/gcc/qdivrem.o
124endif
125ifeq ($(BUILD_TARGET_ARCH),amd64)
126MOD_OBJS += common/alloc/heapsimple.o
127endif
128
129MOD_DEFS = -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST \
130 -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST \
131 -DVBOX_WITH_HGCM
132ifeq ($(BUILD_TARGET_ARCH),amd64)
133 MOD_DEFS += -DRT_ARCH_AMD64
134else
135 MOD_DEFS += -DRT_ARCH_X86
136endif
137ifeq ($(BUILD_TARGET_ARCH),amd64)
138 MOD_DEFS += -DVBOX_WITH_64_BITS_GUESTS
139endif
140MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
141MOD_INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxguest,/ /include /r0drv/linux)
142
143ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxguest),)
144 MANGLING := $(KBUILD_EXTMOD)/vboxguest/include/VBox/VBoxGuestMangling.h
145else
146 MANGLING := $(KBUILD_EXTMOD)/include/VBox/VBoxGuestMangling.h
147endif
148ifeq ($(KERN_VERSION),24)
149 ## @todo move to MOD_DEFS when we have finished refactoring
150 MOD_CFLAGS = -DEXPORT_SYMTAB
151else
152 MOD_CFLAGS = -Wno-declaration-after-statement -include $(MANGLING) -fno-pie
153endif
154
155MOD_CLEAN = . linux r0drv generic r0drv/linux r0drv/generic VBox \
156 common/alloc common/err common/log common/math/gcc common/misc \
157 common/string common/table common/time
158
159include $(obj)/Makefile.include.footer
160
161check: $(MOD_NAME)
162 @if ! readelf -p __ksymtab_strings vboxguest.ko | grep -E "\[.*\] *(RT|g_..*RT.*)"; then \
163 echo "All exported IPRT symbols are properly renamed!"; \
164 else \
165 echo "error: Some exported IPRT symbols was not properly renamed! See above." >&2; \
166 false; \
167 fi
168
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