VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/vboxmouse/Makefile.kmk@ 49498

Last change on this file since 49498 was 49175, checked in by vboxsync, 11 years ago

Additions/x11: remove outdated todo.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.4 KB
Line 
1# $Id: Makefile.kmk 49175 2013-10-18 09:17:49Z vboxsync $
2## @file
3# Sub-Makefile for the VBox Additions XFree86 and X.org mouse drivers.
4#
5
6#
7# Copyright (C) 2006-2013 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
18SUB_DEPTH = ../../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21vboxmouse_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#
31if1of ($(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 \
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_XFREE_4_3)/include \
49 $(VBOX_PATH_X11_XFREE_4_3)/include/extensions \
50 $(VBOX_PATH_X11_XFREE_4_3)/include/X11 \
51 $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86 \
52 $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/common \
53 $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/os-support \
54 $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/os-support/bus \
55 $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/mi \
56 $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/include \
57 $(PATH_SUB_CURRENT)
58 vboxmouse_drv_SOURCES = \
59 vboxmouse.c
60 # Any global symbols in the driver object files will be added to XFree86's
61 # symbol table, which can cause problems if we e.g. define a symbol in two
62 # modules.
63 vboxmouse_drv_POST_CMDS = \
64 objcopy --keep-global-symbol vboxmouseModuleData $(out) $(out)-objcopy$$(NLTAB) \
65 $(MV) -f $(out)-objcopy $(out)
66endif
67
68
69#
70# vboxmouse_drv_70
71#
72DLLS += vboxmouse_drv_70
73vboxmouse_drv_70_TEMPLATE = VBOXGUESTR3XORGMOD
74vboxmouse_drv_70_DEFS = \
75 XFree86Server IN_MODULE XFree86Module XFree86LOADER XINPUT XORG_7X IN_XF86_MODULE DONT_DEFINE_WRAPPERS NO_ANSIC
76vboxmouse_drv_70_INCS := \
77 $(VBOX_PATH_X11_XORG_7_0) \
78 $(VBOX_PATH_X11_XORG_7_0)/X11 \
79 $(VBOX_PATH_X11_XORG_7_0)/xorg \
80 $(PATH_SUB_CURRENT)
81vboxmouse_drv_70_SOURCES = \
82 vboxmouse.c
83
84
85#
86# vboxmouse_drv_71
87#
88DLLS += vboxmouse_drv_71
89vboxmouse_drv_71_TEMPLATE = VBOXGUESTR3XORGMOD
90vboxmouse_drv_71_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
91vboxmouse_drv_71_INCS := \
92 $(VBOX_PATH_X11_XORG_7_1) \
93 $(VBOX_PATH_X11_XORG_7_1)/X11 \
94 $(VBOX_PATH_X11_XORG_7_1)/xorg \
95 $(PATH_SUB_CURRENT)
96vboxmouse_drv_71_SOURCES = \
97 vboxmouse.c
98
99
100#
101# vboxmouse_drv_13
102#
103DLLS += vboxmouse_drv_13
104vboxmouse_drv_13_TEMPLATE = VBOXGUESTR3XORGMOD
105vboxmouse_drv_13_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
106vboxmouse_drv_13_INCS := \
107 $(vboxmouse_xorg_INCS) \
108 $(VBOX_PATH_X11_ROOT)/xorg-server-1.3.0.0 \
109 $(PATH_SUB_CURRENT)
110vboxmouse_drv_13_SOURCES = \
111 vboxmouse.c
112
113
114#
115# vboxmouse_drv_14
116#
117DLLS += vboxmouse_drv_14
118vboxmouse_drv_14_TEMPLATE = VBOXGUESTR3XORGMOD
119vboxmouse_drv_14_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
120vboxmouse_drv_14_INCS := \
121 $(vboxmouse_xorg_INCS) \
122 $(VBOX_PATH_X11_ROOT)/xorg-server-1.4.2 \
123 $(PATH_SUB_CURRENT)
124vboxmouse_drv_14_SOURCES = \
125 vboxmouse.c
126
127
128#
129# vboxmouse_drv_15
130#
131DLLS += vboxmouse_drv_15
132vboxmouse_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD
133vboxmouse_drv_15_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
134vboxmouse_drv_15_INCS := \
135 $(vboxmouse_xorg_INCS) \
136 $(VBOX_PATH_X11_ROOT)/xorg-server-1.5.3 \
137 $(PATH_SUB_CURRENT)
138vboxmouse_drv_15_SOURCES = \
139 vboxmouse.c
140
141
142#
143# vboxmouse_drv_16
144#
145DLLS += vboxmouse_drv_16
146vboxmouse_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD
147vboxmouse_drv_16_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
148vboxmouse_drv_16_INCS := \
149 $(vboxmouse_xorg_INCS) \
150 $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.5 \
151 $(PATH_SUB_CURRENT)
152vboxmouse_drv_16_SOURCES = \
153 vboxmouse.c
154
155
156ifneq ($(KBUILD_TARGET), linux)
157
158#
159# vboxmouse_drv_17
160#
161DLLS += vboxmouse_drv_17
162vboxmouse_drv_17_TEMPLATE = VBOXGUESTR3XORGMOD
163vboxmouse_drv_17_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
164vboxmouse_drv_17_INCS := \
165 $(vboxmouse_xorg_INCS) \
166 $(VBOX_PATH_X11_ROOT)/xorg-server-1.7.7 \
167 $(PATH_SUB_CURRENT)
168vboxmouse_drv_17_SOURCES = \
169 vboxmouse.c
170
171
172#
173# vboxmouse_drv_18
174#
175DLLS += vboxmouse_drv_18
176vboxmouse_drv_18_TEMPLATE = VBOXGUESTR3XORGMOD
177vboxmouse_drv_18_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
178vboxmouse_drv_18_INCS := \
179 $(vboxmouse_xorg_INCS) \
180 $(VBOX_PATH_X11_ROOT)/xorg-server-1.8.0 \
181 $(PATH_SUB_CURRENT)
182vboxmouse_drv_18_SOURCES = \
183 vboxmouse.c
184
185
186#
187# vboxmouse_drv_19
188#
189DLLS += vboxmouse_drv_19
190vboxmouse_drv_19_TEMPLATE = VBOXGUESTR3XORGMOD
191vboxmouse_drv_19_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
192vboxmouse_drv_19_INCS := \
193 $(vboxmouse_xorg_INCS) \
194 $(VBOX_PATH_X11_ROOT)/xorg-server-1.9.0 \
195 $(PATH_SUB_CURRENT)
196vboxmouse_drv_19_SOURCES = \
197 vboxmouse.c
198
199
200#
201# vboxmouse_drv_110
202#
203DLLS += vboxmouse_drv_110
204vboxmouse_drv_110_TEMPLATE = VBOXGUESTR3XORGMOD
205vboxmouse_drv_110_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
206vboxmouse_drv_110_INCS := \
207 $(vboxmouse_xorg_INCS) \
208 $(VBOX_PATH_X11_ROOT)/xorg-server-1.10.0 \
209 $(PATH_SUB_CURRENT)
210vboxmouse_drv_110_SOURCES = \
211 vboxmouse.c
212
213DLLS += vboxmouse_drv_111
214vboxmouse_drv_111_TEMPLATE = VBOXGUESTR3XORGMOD
215vboxmouse_drv_111_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
216vboxmouse_drv_111_INCS := \
217 $(vboxmouse_xorg_INCS) \
218 $(VBOX_PATH_X11_ROOT)/xorg-server-1.11.0 \
219 $(PATH_SUB_CURRENT)
220vboxmouse_drv_111_SOURCES = \
221 vboxmouse.c
222
223DLLS += vboxmouse_drv_112
224vboxmouse_drv_112_TEMPLATE = VBOXGUESTR3XORGMOD
225vboxmouse_drv_112_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
226vboxmouse_drv_112_INCS := \
227 $(vboxmouse_xorg_INCS) \
228 $(VBOX_PATH_X11_ROOT)/xorg-server-1.12.0 \
229 $(PATH_SUB_CURRENT)
230vboxmouse_drv_112_SOURCES = \
231 vboxmouse.c
232
233endif # neq ($(KBUILD_TARGET),linux)
234
235# 32-bit modules for the 64-bit Linux Additions
236ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.amd64)
237 ifneq ($(VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE),)
238 SYSMODS += vboxmouse_drv_32
239 vboxmouse_drv_32_EXTENDS = vboxmouse_drv
240 vboxmouse_drv_32_TEMPLATE = VBOXGUESTR3XF86MOD_X86
241 vboxmouse_drv_32_NAME = vboxmouse_drv
242 $(foreach i,$(filter vboxmouse_drv_%,$(DLLS)),$(eval DLLS += $(i)_32))
243 $(foreach i,$(filter vboxmouse_drv_%_32,$(DLLS)),$(eval $(i)_EXTENDS = $(subst _32,,$(i))))
244 $(foreach i,$(filter vboxmouse_drv_%_32,$(DLLS)),$(eval $(i)_TEMPLATE = VBOXGUESTR3XORGMOD_X86))
245 $(foreach i,$(filter vboxmouse_drv_%_32,$(DLLS)),$(eval $(i)_NAME = $(subst _32,,$(i))))
246 endif
247endif
248
249ifdef VBOX_USE_SYSTEM_XORG_HEADERS
250 # As vboxmouse_drv is not needed at all for X.Org Server 1.7 and later do not
251 # build it in this case.
252 DLLS := $(filter-out vboxmouse_drv_%,$(DLLS))
253 SYSMODS := $(filter-out vboxmouse_drv%,$(SYSMODS))
254endif
255
256
257# Check the undefined symbols in the X.Org modules against lists of allowed
258# symbols. Not very elegant, but it will catch problems early.
259
260ifdef VBOX_WITH_TESTCASES
261# ifndef VBOX_ONLY_ADDITIONS
262 ifndef VBOX_USE_SYSTEM_XORG_HEADERS
263 ifeq ($(KBUILD_TARGET),linux)
264 ifeq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH))
265 ifndef VBOX_ONLY_SDK
266 VBOXMOUSE_SRC_PATH := $(PATH_SUB_CURRENT)
267
268 ifeq ($(KBUILD_TARGET),linux)
269 TESTING += $(vboxmouse_drv_0_OUTDIR)/tstvboxmouse68.run
270 OTHERS += $(vboxmouse_drv_0_OUTDIR)/tstvboxmouse68.run
271$$(vboxmouse_drv_0_OUTDIR)/tstvboxmouse68.run: $$(vboxmouse_drv_1_STAGE_TARGET)
272 $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<)
273 $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_HOST) \
274 "$(vboxmouse_drv_1_STAGE_TARGET)" --static "$(VBOXMOUSE_SRC_PATH)/undefined"
275 $(QUIET)$(APPEND) -t "$@" "done"
276 endif
277
278##
279# Using the extra expansion to replace $(ver) before eval, thus everything
280# else needs escaped dollars.
281 define def_vboxmouse_test
282 TESTING += $$(vboxmouse_drv$(ver)_0_OUTDIR)/tstvboxmouse$(ver).run
283 OTHERS += $$(vboxmouse_drv$(ver)_0_OUTDIR)/tstvboxmouse$(ver).run
284 $$$$(vboxmouse_drv$(ver)_0_OUTDIR)/tstvboxmouse$(ver).run: $$$$(vboxmouse_drv$(ver)_1_STAGE_TARGET)
285 $$(QUIET)$$(call MSG_L1,Checking for unresolved symbols in $$<)
286 $$(QUIET)$$(ASH) $$(PATH_ROOT)/src/bldprogs/checkUndefined.sh $$(KBUILD_HOST) \
287 $$(vboxmouse_drv$(ver)_1_STAGE_TARGET) $$(VBOXMOUSE_SRC_PATH)/undefined $$(VBOXMOUSE_SRC_PATH)/undefined_extra
288 $$(QUIET)$$(APPEND) -t "$$@" "done"
289 endef
290
291 $(foreach ver, _70 _71 _13 _14 _15 _16, $(eval $(def_vboxmouse_test)))
292
293 ifneq ($(KBUILD_TARGET), linux)
294 $(foreach ver, _17 _18 _19 _110 _111 _112 _113, $(eval $(def_vboxmouse_test)))
295
296 endif # neq ($(KBUILD_TARGET),linux)
297
298 endif # ! VBOX_ONLY_SDK
299 endif # eq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH))
300 endif # eq ($(KBUILD_TARGET),linux)
301 endif # ! VBOX_USE_SYSTEM_XORG_HEADERS
302# endif # ! VBOX_ONLY_ADDITIONS
303endif # VBOX_WITH_TESTCASES
304
305include $(FILE_KBUILD_SUB_FOOTER)
306
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