VirtualBox

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

Last change on this file since 41683 was 37233, checked in by vboxsync, 14 years ago

IRPT: Adding RTErrVarsSave/Restore/++ to preserve errno, h_error/WSAGetLastError and GetLastError accross assertions.

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