1 | # $Id: Makefile.kmk 69098 2017-10-17 08:59:16Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the VBox Additions XFree86 and X.org mouse drivers.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2016 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 | SUB_DEPTH = ../../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | vboxmouse_xorg_INCS = \
|
---|
22 | $(VBOX_PATH_X11_ROOT)/inputproto-1.9.99.902 \
|
---|
23 | $(VBOX_PATH_X11_ROOT)/libpciaccess-0.10.8 \
|
---|
24 | $(VBOX_PATH_X11_ROOT)/pixman-0.16.0 \
|
---|
25 | $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \
|
---|
26 | $(VBOX_PATH_X11_ROOT)/xproto-7.0.18
|
---|
27 |
|
---|
28 | #
|
---|
29 | # vboxmouse_drv
|
---|
30 | #
|
---|
31 | if1of ($(KBUILD_TARGET), linux)
|
---|
32 | SYSMODS += vboxmouse_drv
|
---|
33 | vboxmouse_drv_TEMPLATE = VBOXGUESTR3XF86MOD
|
---|
34 | vboxmouse_drv_DEFS.linux = linux
|
---|
35 | vboxmouse_drv_DEFS.x86 += __i386__
|
---|
36 | # This one has to be defined when building server code on systems where
|
---|
37 | # unsigned long is 64bits
|
---|
38 | vboxmouse_drv_DEFS.amd64 += _XSERVER64
|
---|
39 | vboxmouse_drv_DEFS += \
|
---|
40 | _POSIX_C_SOURCE=199309L _POSIX_SOURCE _XOPEN_SOURCE _DEFAULT_SOURCE \
|
---|
41 | _BSD_SOURCE _SVID_SOURCE _GNU_SOURCE SHAPE XINPUT XKB LBX XAPPGROUP \
|
---|
42 | XCSECURITY TOGCUP XF86BIGFONT DPMSExtension PIXPRIV PANORAMIX RENDER \
|
---|
43 | GCCUSESGAS AVOID_GLYPHBLT PIXPRIV SINGLEDEPTH XFreeXDGA XvExtension \
|
---|
44 | XFree86LOADER XFree86Server XF86VIDMODE XvMCExtension SMART_SCHEDULE \
|
---|
45 | BUILDDEBUG X_BYTE_ORDER=X_LITTLE_ENDIAN DNDEBUG FUNCPROTO=15 NARROWPROTO \
|
---|
46 | IN_MODULE XFree86Module PNP_MOUSE IN_XF86_MODULE
|
---|
47 | vboxmouse_drv_INCS := \
|
---|
48 | $(VBOX_PATH_X11_ROOT)/XFree86-4.3 \
|
---|
49 | $(VBOX_PATH_X11_ROOT)/XFree86-4.3/X11 \
|
---|
50 | $(VBOX_PATH_X11_ROOT)/XFree86-4.3/X11/extensions \
|
---|
51 | $(VBOX_PATH_X11_ROOT)/XFree86-4.3/Xserver \
|
---|
52 | $(PATH_SUB_CURRENT)
|
---|
53 | vboxmouse_drv_SOURCES = \
|
---|
54 | vboxmouse.c
|
---|
55 | # Any global symbols in the driver object files will be added to XFree86's
|
---|
56 | # symbol table, which can cause problems if we e.g. define a symbol in two
|
---|
57 | # modules.
|
---|
58 | vboxmouse_drv_POST_CMDS = \
|
---|
59 | objcopy --keep-global-symbol vboxmouseModuleData $(out) $(out)-objcopy$$(NLTAB) \
|
---|
60 | $(MV) -f $(out)-objcopy $(out)
|
---|
61 | endif
|
---|
62 |
|
---|
63 |
|
---|
64 | #
|
---|
65 | # vboxmouse_drv_70
|
---|
66 | #
|
---|
67 | DLLS += vboxmouse_drv_70
|
---|
68 | vboxmouse_drv_70_TEMPLATE = VBOXGUESTR3XORGMOD
|
---|
69 | vboxmouse_drv_70_DEFS = \
|
---|
70 | XFree86Server IN_MODULE XFree86Module XFree86LOADER XINPUT XORG_7X IN_XF86_MODULE DONT_DEFINE_WRAPPERS NO_ANSIC
|
---|
71 | vboxmouse_drv_70_INCS := \
|
---|
72 | $(vboxmouse_xorg_INCS) \
|
---|
73 | $(VBOX_PATH_X11_ROOT)/xorg-server-1.0.1 \
|
---|
74 | $(PATH_SUB_CURRENT)
|
---|
75 | vboxmouse_drv_70_SOURCES = \
|
---|
76 | vboxmouse.c
|
---|
77 |
|
---|
78 |
|
---|
79 | #
|
---|
80 | # vboxmouse_drv_71
|
---|
81 | #
|
---|
82 | DLLS += vboxmouse_drv_71
|
---|
83 | vboxmouse_drv_71_TEMPLATE = VBOXGUESTR3XORGMOD
|
---|
84 | vboxmouse_drv_71_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
|
---|
85 | vboxmouse_drv_71_INCS := \
|
---|
86 | $(vboxmouse_xorg_INCS) \
|
---|
87 | $(VBOX_PATH_X11_ROOT)/xorg-server-1.1.0 \
|
---|
88 | $(PATH_SUB_CURRENT)
|
---|
89 | vboxmouse_drv_71_SOURCES = \
|
---|
90 | vboxmouse.c
|
---|
91 |
|
---|
92 |
|
---|
93 | #
|
---|
94 | # vboxmouse_drv_13
|
---|
95 | #
|
---|
96 | DLLS += vboxmouse_drv_13
|
---|
97 | vboxmouse_drv_13_TEMPLATE = VBOXGUESTR3XORGMOD
|
---|
98 | vboxmouse_drv_13_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
|
---|
99 | vboxmouse_drv_13_INCS := \
|
---|
100 | $(vboxmouse_xorg_INCS) \
|
---|
101 | $(VBOX_PATH_X11_ROOT)/xorg-server-1.3.0.0 \
|
---|
102 | $(PATH_SUB_CURRENT)
|
---|
103 | vboxmouse_drv_13_SOURCES = \
|
---|
104 | vboxmouse.c
|
---|
105 |
|
---|
106 |
|
---|
107 | #
|
---|
108 | # vboxmouse_drv_14
|
---|
109 | #
|
---|
110 | DLLS += vboxmouse_drv_14
|
---|
111 | vboxmouse_drv_14_TEMPLATE = VBOXGUESTR3XORGMOD
|
---|
112 | vboxmouse_drv_14_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
|
---|
113 | vboxmouse_drv_14_INCS := \
|
---|
114 | $(vboxmouse_xorg_INCS) \
|
---|
115 | $(VBOX_PATH_X11_ROOT)/xorg-server-1.4.2 \
|
---|
116 | $(PATH_SUB_CURRENT)
|
---|
117 | vboxmouse_drv_14_SOURCES = \
|
---|
118 | vboxmouse.c
|
---|
119 |
|
---|
120 |
|
---|
121 | #
|
---|
122 | # vboxmouse_drv_15
|
---|
123 | #
|
---|
124 | DLLS += vboxmouse_drv_15
|
---|
125 | vboxmouse_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD
|
---|
126 | vboxmouse_drv_15_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
|
---|
127 | vboxmouse_drv_15_INCS := \
|
---|
128 | $(vboxmouse_xorg_INCS) \
|
---|
129 | $(VBOX_PATH_X11_ROOT)/xorg-server-1.5.3 \
|
---|
130 | $(PATH_SUB_CURRENT)
|
---|
131 | vboxmouse_drv_15_SOURCES = \
|
---|
132 | vboxmouse.c
|
---|
133 |
|
---|
134 |
|
---|
135 | #
|
---|
136 | # vboxmouse_drv_16
|
---|
137 | #
|
---|
138 | DLLS += vboxmouse_drv_16
|
---|
139 | vboxmouse_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD
|
---|
140 | vboxmouse_drv_16_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
|
---|
141 | vboxmouse_drv_16_INCS := \
|
---|
142 | $(vboxmouse_xorg_INCS) \
|
---|
143 | $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.5 \
|
---|
144 | $(PATH_SUB_CURRENT)
|
---|
145 | vboxmouse_drv_16_SOURCES = \
|
---|
146 | vboxmouse.c
|
---|
147 |
|
---|
148 |
|
---|
149 | ifneq ($(KBUILD_TARGET), linux)
|
---|
150 |
|
---|
151 | #
|
---|
152 | # vboxmouse_drv_17
|
---|
153 | #
|
---|
154 | DLLS += vboxmouse_drv_17
|
---|
155 | vboxmouse_drv_17_TEMPLATE = VBOXGUESTR3XORGMOD
|
---|
156 | vboxmouse_drv_17_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
|
---|
157 | vboxmouse_drv_17_INCS := \
|
---|
158 | $(vboxmouse_xorg_INCS) \
|
---|
159 | $(VBOX_PATH_X11_ROOT)/xorg-server-1.7.7 \
|
---|
160 | $(PATH_SUB_CURRENT)
|
---|
161 | vboxmouse_drv_17_SOURCES = \
|
---|
162 | vboxmouse.c
|
---|
163 |
|
---|
164 |
|
---|
165 | #
|
---|
166 | # vboxmouse_drv_18
|
---|
167 | #
|
---|
168 | DLLS += vboxmouse_drv_18
|
---|
169 | vboxmouse_drv_18_TEMPLATE = VBOXGUESTR3XORGMOD
|
---|
170 | vboxmouse_drv_18_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
|
---|
171 | vboxmouse_drv_18_INCS := \
|
---|
172 | $(vboxmouse_xorg_INCS) \
|
---|
173 | $(VBOX_PATH_X11_ROOT)/xorg-server-1.8.0 \
|
---|
174 | $(PATH_SUB_CURRENT)
|
---|
175 | vboxmouse_drv_18_SOURCES = \
|
---|
176 | vboxmouse.c
|
---|
177 |
|
---|
178 |
|
---|
179 | #
|
---|
180 | # vboxmouse_drv_19
|
---|
181 | #
|
---|
182 | DLLS += vboxmouse_drv_19
|
---|
183 | vboxmouse_drv_19_TEMPLATE = VBOXGUESTR3XORGMOD
|
---|
184 | vboxmouse_drv_19_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
|
---|
185 | vboxmouse_drv_19_INCS := \
|
---|
186 | $(vboxmouse_xorg_INCS) \
|
---|
187 | $(VBOX_PATH_X11_ROOT)/xorg-server-1.9.0 \
|
---|
188 | $(PATH_SUB_CURRENT)
|
---|
189 | vboxmouse_drv_19_SOURCES = \
|
---|
190 | vboxmouse.c
|
---|
191 |
|
---|
192 |
|
---|
193 | #
|
---|
194 | # vboxmouse_drv_110
|
---|
195 | #
|
---|
196 | DLLS += vboxmouse_drv_110
|
---|
197 | vboxmouse_drv_110_TEMPLATE = VBOXGUESTR3XORGMOD
|
---|
198 | vboxmouse_drv_110_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
|
---|
199 | vboxmouse_drv_110_INCS := \
|
---|
200 | $(vboxmouse_xorg_INCS) \
|
---|
201 | $(VBOX_PATH_X11_ROOT)/xorg-server-1.10.0 \
|
---|
202 | $(PATH_SUB_CURRENT)
|
---|
203 | vboxmouse_drv_110_SOURCES = \
|
---|
204 | vboxmouse.c
|
---|
205 |
|
---|
206 | DLLS += vboxmouse_drv_111
|
---|
207 | vboxmouse_drv_111_TEMPLATE = VBOXGUESTR3XORGMOD
|
---|
208 | vboxmouse_drv_111_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
|
---|
209 | vboxmouse_drv_111_INCS := \
|
---|
210 | $(vboxmouse_xorg_INCS) \
|
---|
211 | $(VBOX_PATH_X11_ROOT)/xorg-server-1.11.0 \
|
---|
212 | $(PATH_SUB_CURRENT)
|
---|
213 | vboxmouse_drv_111_SOURCES = \
|
---|
214 | vboxmouse.c
|
---|
215 |
|
---|
216 | DLLS += vboxmouse_drv_112
|
---|
217 | vboxmouse_drv_112_TEMPLATE = VBOXGUESTR3XORGMOD
|
---|
218 | vboxmouse_drv_112_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
|
---|
219 | vboxmouse_drv_112_INCS := \
|
---|
220 | $(vboxmouse_xorg_INCS) \
|
---|
221 | $(VBOX_PATH_X11_ROOT)/xorg-server-1.12.0 \
|
---|
222 | $(PATH_SUB_CURRENT)
|
---|
223 | vboxmouse_drv_112_SOURCES = \
|
---|
224 | vboxmouse.c
|
---|
225 |
|
---|
226 | endif # neq ($(KBUILD_TARGET),linux)
|
---|
227 |
|
---|
228 |
|
---|
229 | ifdef VBOX_USE_SYSTEM_XORG_HEADERS
|
---|
230 | # As vboxmouse_drv is not needed at all for X.Org Server 1.7 and later do not
|
---|
231 | # build it in this case.
|
---|
232 | DLLS := $(filter-out vboxmouse_drv_%,$(DLLS))
|
---|
233 | SYSMODS := $(filter-out vboxmouse_drv%,$(SYSMODS))
|
---|
234 | endif
|
---|
235 |
|
---|
236 |
|
---|
237 | # Check the undefined symbols in the X.Org modules against lists of allowed
|
---|
238 | # symbols. Not very elegant, but it will catch problems early.
|
---|
239 |
|
---|
240 | ifdef VBOX_WITH_TESTCASES
|
---|
241 | # ifndef VBOX_ONLY_ADDITIONS
|
---|
242 | ifndef VBOX_USE_SYSTEM_XORG_HEADERS
|
---|
243 | ifeq ($(KBUILD_TARGET),linux)
|
---|
244 | ifeq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH))
|
---|
245 | ifndef VBOX_ONLY_SDK
|
---|
246 | VBOXMOUSE_SRC_PATH := $(PATH_SUB_CURRENT)
|
---|
247 |
|
---|
248 | ifeq ($(KBUILD_TARGET),linux)
|
---|
249 | TESTING += $(vboxmouse_drv_0_OUTDIR)/tstvboxmouse68.run
|
---|
250 | OTHERS += $(vboxmouse_drv_0_OUTDIR)/tstvboxmouse68.run
|
---|
251 | $$(vboxmouse_drv_0_OUTDIR)/tstvboxmouse68.run: $$(vboxmouse_drv_1_STAGE_TARGET)
|
---|
252 | $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<)
|
---|
253 | $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_HOST) \
|
---|
254 | "$(vboxmouse_drv_1_STAGE_TARGET)" --static "$(VBOXMOUSE_SRC_PATH)/../undefined_xfree86" "$(VBOXMOUSE_SRC_PATH)/../undefined_xfree86_modules"
|
---|
255 | $(QUIET)$(APPEND) -t "$@" "done"
|
---|
256 | endif
|
---|
257 |
|
---|
258 | ##
|
---|
259 | # Using the extra expansion to replace $(ver) before eval, thus everything
|
---|
260 | # else needs escaped dollars.
|
---|
261 | define def_vboxmouse_test
|
---|
262 | TESTING += $$(vboxmouse_drv$(ver)_0_OUTDIR)/tstvboxmouse$(ver).run
|
---|
263 | OTHERS += $$(vboxmouse_drv$(ver)_0_OUTDIR)/tstvboxmouse$(ver).run
|
---|
264 | $$$$(vboxmouse_drv$(ver)_0_OUTDIR)/tstvboxmouse$(ver).run: $$$$(vboxmouse_drv$(ver)_1_STAGE_TARGET)
|
---|
265 | $$(QUIET)$$(call MSG_L1,Checking for unresolved symbols in $$<)
|
---|
266 | $$(QUIET)$$(ASH) $$(PATH_ROOT)/src/bldprogs/checkUndefined.sh $$(KBUILD_HOST) \
|
---|
267 | $$(vboxmouse_drv$(ver)_1_STAGE_TARGET) $$(VBOXMOUSE_SRC_PATH)/../undefined_xfree86 $(VBOXMOUSE_SRC_PATH)/../undefined_xfree86_modules $$(VBOXMOUSE_SRC_PATH)/../undefined_xorg
|
---|
268 | $$(QUIET)$$(APPEND) -t "$$@" "done"
|
---|
269 | endef
|
---|
270 |
|
---|
271 | $(foreach ver, _70 _71 _13 _14 _15 _16, $(eval $(def_vboxmouse_test)))
|
---|
272 |
|
---|
273 | ifneq ($(KBUILD_TARGET), linux)
|
---|
274 | $(foreach ver, _17 _18 _19 _110 _111 _112 _113, $(eval $(def_vboxmouse_test)))
|
---|
275 |
|
---|
276 | endif # neq ($(KBUILD_TARGET),linux)
|
---|
277 |
|
---|
278 | endif # ! VBOX_ONLY_SDK
|
---|
279 | endif # eq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH))
|
---|
280 | endif # eq ($(KBUILD_TARGET),linux)
|
---|
281 | endif # ! VBOX_USE_SYSTEM_XORG_HEADERS
|
---|
282 | # endif # ! VBOX_ONLY_ADDITIONS
|
---|
283 | endif # VBOX_WITH_TESTCASES
|
---|
284 |
|
---|
285 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
286 |
|
---|