VirtualBox

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

Last change on this file since 62484 was 61081, checked in by vboxsync, 8 years ago

allow to compile with gcc configured with --enable-default-pie (e.g. Ubuntu Yakkety)

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