VirtualBox

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

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

IPRT: split %RKv formatting into separate function.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 4.6 KB
Line 
1# $Revision: 66415 $
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/rtStrFormatKernelAddress-generic.o \
94 generic/errvars-generic.o \
95 generic/mppresent-generic.o \
96 VBox/log-vbox.o \
97 VBox/logbackdoor.o
98ifeq ($(BUILD_TARGET_ARCH),x86)
99MOD_OBJS += \
100 common/math/gcc/divdi3.o \
101 common/math/gcc/moddi3.o \
102 common/math/gcc/udivdi3.o \
103 common/math/gcc/umoddi3.o \
104 common/math/gcc/qdivrem.o
105endif
106ifeq ($(BUILD_TARGET_ARCH),amd64)
107MOD_OBJS += common/alloc/heapsimple.o
108endif
109
110MOD_DEFS = -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST \
111 -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST \
112 -DVBOX_WITH_HGCM
113ifeq ($(BUILD_TARGET_ARCH),amd64)
114 MOD_DEFS += -DRT_ARCH_AMD64
115else
116 MOD_DEFS += -DRT_ARCH_X86
117endif
118ifeq ($(BUILD_TARGET_ARCH),amd64)
119 MOD_DEFS += -DVBOX_WITH_64_BITS_GUESTS
120endif
121MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
122MOD_INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxguest,/ /include /r0drv/linux)
123
124ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxguest),)
125 MANGLING := $(KBUILD_EXTMOD)/vboxguest/include/VBox/VBoxGuestMangling.h
126else
127 MANGLING := $(KBUILD_EXTMOD)/include/VBox/VBoxGuestMangling.h
128endif
129ifeq ($(KERN_VERSION),24)
130 ## @todo move to MOD_DEFS when we have finished refactoring
131 MOD_CFLAGS = -DEXPORT_SYMTAB
132else
133 MOD_CFLAGS = -Wno-declaration-after-statement -include $(MANGLING) -fno-pie
134endif
135
136MOD_CLEAN = . linux r0drv generic r0drv/linux r0drv/generic VBox \
137 common/alloc common/err common/log common/math/gcc common/misc \
138 common/string common/time
139
140include $(obj)/Makefile.include.footer
141
142check: $(MOD_NAME)
143 @if ! readelf -p __ksymtab_strings vboxguest.ko | grep -E "\[.*\] *(RT|g_..*RT.*)"; then \
144 echo "All exported IPRT symbols are properly renamed!"; \
145 else \
146 echo "error: Some exported IPRT symbols was not properly renamed! See above." >&2; \
147 false; \
148 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