VirtualBox

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

Last change on this file since 77403 was 77403, checked in by vboxsync, 6 years ago

More linux kernel module Makefile cleanups: Simplified VBOXMOD_INCL by making -I implicit.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
Line 
1# $Id: Makefile 77403 2019-02-20 18:44:36Z vboxsync $
2## @file
3# VirtualBox Guest Additions Module Makefile.
4#
5
6#
7# Copyright (C) 2006-2019 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.
28VBOXGUEST_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 = vboxguest
35VBOXMOD_OBJS = \
36 VBoxGuest-linux.o \
37 VBoxGuest.o \
38 VBoxGuestR0LibGenericRequest.o \
39 VBoxGuestR0LibHGCMInternal.o \
40 VBoxGuestR0LibInit.o \
41 VBoxGuestR0LibPhysHeap.o \
42 VBoxGuestR0LibVMMDev.o \
43 r0drv/alloc-r0drv.o \
44 r0drv/initterm-r0drv.o \
45 r0drv/memobj-r0drv.o \
46 r0drv/mpnotification-r0drv.o \
47 r0drv/powernotification-r0drv.o \
48 r0drv/linux/alloc-r0drv-linux.o \
49 r0drv/linux/assert-r0drv-linux.o \
50 r0drv/linux/initterm-r0drv-linux.o \
51 r0drv/linux/memobj-r0drv-linux.o \
52 r0drv/linux/memuserkernel-r0drv-linux.o \
53 r0drv/linux/mp-r0drv-linux.o \
54 r0drv/linux/mpnotification-r0drv-linux.o \
55 r0drv/linux/process-r0drv-linux.o \
56 r0drv/linux/semevent-r0drv-linux.o \
57 r0drv/linux/semeventmulti-r0drv-linux.o \
58 r0drv/linux/semfastmutex-r0drv-linux.o \
59 r0drv/linux/semmutex-r0drv-linux.o \
60 r0drv/linux/spinlock-r0drv-linux.o \
61 r0drv/linux/thread-r0drv-linux.o \
62 r0drv/linux/thread2-r0drv-linux.o \
63 r0drv/linux/time-r0drv-linux.o \
64 r0drv/linux/timer-r0drv-linux.o \
65 r0drv/linux/RTLogWriteDebugger-r0drv-linux.o \
66 r0drv/generic/semspinmutex-r0drv-generic.o \
67 common/alloc/alloc.o \
68 common/err/RTErrConvertFromErrno.o \
69 common/err/RTErrConvertToErrno.o \
70 common/err/errinfo.o \
71 common/log/log.o \
72 common/log/logellipsis.o \
73 common/log/logrel.o \
74 common/log/logrelellipsis.o \
75 common/log/logcom.o \
76 common/log/logformat.o \
77 common/misc/RTAssertMsg1Weak.o \
78 common/misc/RTAssertMsg2.o \
79 common/misc/RTAssertMsg2Add.o \
80 common/misc/RTAssertMsg2AddWeak.o \
81 common/misc/RTAssertMsg2AddWeakV.o \
82 common/misc/RTAssertMsg2Weak.o \
83 common/misc/RTAssertMsg2WeakV.o \
84 common/misc/assert.o \
85 common/misc/thread.o \
86 common/string/RTStrCat.o \
87 common/string/RTStrCmp.o \
88 common/string/RTStrCopy.o \
89 common/string/RTStrCopyEx.o \
90 common/string/RTStrCopyP.o \
91 common/string/RTStrICmpAscii.o \
92 common/string/RTStrNICmpAscii.o \
93 common/string/RTStrNCmp.o \
94 common/string/RTStrNLen.o \
95 common/string/stringalloc.o \
96 common/string/strformat.o \
97 common/string/strformatnum.o \
98 common/string/strformatrt.o \
99 common/string/strformattype.o \
100 common/string/strprintf.o \
101 common/string/strtonum.o \
102 common/string/utf-8.o \
103 common/table/avlpv.o \
104 common/time/time.o \
105 generic/RTAssertShouldPanic-generic.o \
106 generic/RTLogWriteStdErr-stub-generic.o \
107 generic/RTLogWriteStdOut-stub-generic.o \
108 generic/RTMpGetCoreCount-generic.o \
109 generic/RTSemEventWait-2-ex-generic.o \
110 generic/RTSemEventWaitNoResume-2-ex-generic.o \
111 generic/RTSemEventMultiWait-2-ex-generic.o \
112 generic/RTSemEventMultiWaitNoResume-2-ex-generic.o \
113 generic/rtStrFormatKernelAddress-generic.o \
114 generic/errvars-generic.o \
115 generic/mppresent-generic.o \
116 VBox/log-vbox.o \
117 VBox/logbackdoor.o
118ifeq ($(BUILD_TARGET_ARCH),x86)
119VBOXMOD_OBJS += \
120 common/math/gcc/divdi3.o \
121 common/math/gcc/moddi3.o \
122 common/math/gcc/udivdi3.o \
123 common/math/gcc/udivmoddi4.o \
124 common/math/gcc/umoddi3.o \
125 common/math/gcc/qdivrem.o
126endif
127ifeq ($(BUILD_TARGET_ARCH),amd64)
128VBOXMOD_OBJS += common/alloc/heapsimple.o
129endif
130
131VBOXMOD_DEFS = \
132 VBOX \
133 RT_OS_LINUX \
134 IN_RING0 \
135 IN_RT_R0 \
136 IN_GUEST \
137 IN_GUEST_R0 \
138 IN_MODULE \
139 RT_WITH_VBOX \
140 VBGL_VBOXGUEST \
141 VBOX_WITH_HGCM
142ifeq ($(BUILD_TARGET_ARCH),amd64)
143VBOXMOD_DEFS += VBOX_WITH_64_BITS_GUESTS
144endif
145ifeq ($(KERN_VERSION),24)
146VBOXMOD_DEFS += EXPORT_SYMTAB
147endif
148
149VBOXMOD_INCL = \
150 $(VBOXGUEST_DIR) \
151 $(VBOXGUEST_DIR)include \
152 $(VBOXGUEST_DIR)r0drv/linux
153
154ifeq ($(KERN_VERSION),24)
155VBOXMOD_CFLAGS =
156else
157VBOXMOD_CFLAGS = -Wno-declaration-after-statement -include $(VBOXGUEST_DIR)include/VBox/VBoxGuestMangling.h -fno-pie
158endif
159
160VBOXMOD_CLEAN = \
161 . \
162 linux \
163 r0drv \
164 generic \
165 r0drv/linux \
166 r0drv/generic \
167 VBox \
168 common/alloc \
169 common/err \
170 common/log \
171 common/math/gcc \
172 common/misc \
173 common/string \
174 common/table \
175 common/time
176
177include $(obj)/Makefile-footer.gmk
178
179check: $(VBOXMOD_NAME)
180 @if ! readelf -p __ksymtab_strings vboxguest.ko | grep -E "\[.*\] *(RT|g_..*RT.*)"; then \
181 echo "All exported IPRT symbols are properly renamed!"; \
182 else \
183 echo "error: Some exported IPRT symbols was not properly renamed! See above." >&2; \
184 false; \
185 fi
186
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