VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/Makefile.kmk@ 49643

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

Additions/linux: back out single bit-count Additions package experiment.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 26.3 KB
Line 
1# $Id: Makefile.kmk 49643 2013-11-25 15:46:54Z vboxsync $
2## @file
3# Sub-Makefile for the VirtualBox Guest OpenGL part
4#
5
6#
7# Copyright (C) 2008-2012 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
21#
22# Target lists.
23#
24BLDDIRS += \
25 $(VBOX_PATH_CROGL_GENFILES)/
26
27DLLS.win += \
28 VBoxOGL \
29 VBoxOGLarrayspu \
30 VBoxOGLpassthroughspu \
31 VBoxOGLpackspu \
32 VBoxOGLfeedbackspu
33
34if1of ($(KBUILD_TARGET), linux solaris freebsd)
35DLLS += \
36 VBoxOGL \
37 VBoxOGLarrayspu \
38 VBoxOGLpassthroughspu \
39 VBoxOGLpackspu \
40 VBoxOGLfeedbackspu
41endif
42
43VBOX_OGL_X86_GUEST_DLLS = \
44 VBoxOGL-x86 \
45 VBoxOGLarrayspu-x86 \
46 VBoxOGLpassthroughspu-x86 \
47 VBoxOGLpackspu-x86 \
48 VBoxOGLfeedbackspu-x86
49
50ifdef VBOX_WITH_WDDM
51 DLLS.win.amd64 += $(VBOX_OGL_X86_GUEST_DLLS)
52endif
53
54# 32-bit version for the 64-bit Linux Additions
55ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.amd64)
56 ifneq ($(VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE),)
57 DLLS += $(VBOX_OGL_X86_GUEST_DLLS)
58 $(foreach i,$(VBOX_OGL_X86_GUEST_DLLS),$(eval $(i)_INST = $(INST_ADDITIONS)/32/))
59 $(foreach i,$(VBOX_OGL_X86_GUEST_DLLS),$(eval $(i)_NAME = $(subst -x86,,$(i))))
60 endif
61endif
62
63if1of ($(KBUILD_TARGET), linux solaris freebsd)
64 #VBoxOGL_DRI = 1
65 ifn1of ($(KBUILD_TARGET),solaris) # No DRI on Solaris yet
66 VBoxOGL_FAKEDRI = 1
67 endif
68
69 # Only Solaris right now needs C stubs because I can't figure out how to
70 # generate the GOT based relocation ASM yet.
71 ifdef VBoxOGL_FAKEDRI
72 if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),solaris.x86 solaris.amd64 linux.x86 linux.amd64 freebsd.x86 freebsd.amd64)
73 VBOX_OGL_GLX_USE_CSTUBS = 1
74 endif
75 endif
76endif
77
78
79#
80# VBoxOGL
81#
82VBoxOGL_TEMPLATE = VBOXCROGLR3GUESTDLL
83VBoxOGL_INCS = .
84if1of ($(KBUILD_TARGET), linux solaris freebsd)
85 VBoxOGL_INCS += \
86 $(VBOX_PATH_X11_ROOT)/libXdamage-1.1 \
87 $(VBOX_PATH_X11_ROOT)/libXcomposite-0.4.0 \
88 $(VBOX_PATH_X11_ROOT)/libXext-1.3.1 \
89 $(VBOX_PATH_X11_ROOT)/libXfixes-4.0.3 \
90 $(VBOX_PATH_X11_ROOT)/damageproto-1.1.0 \
91 $(VBOX_PATH_X11_ROOT)/compositeproto-0.4 \
92 $(VBOX_PATH_X11_ROOT)/fixesproto-4.0 \
93 $(VBOX_PATH_X11_ROOT)/libx11-1.1.5-other \
94 $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \
95 $(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \
96 $(VBOX_MESA_INCS) \
97 $(PATH_ROOT)/src/VBox/Additions/x11/x11include/libdrm-2.4.13
98 VBoxOGL_DEFS += VBOX_NO_NATIVEGL
99endif
100
101ifdef VBoxOGL_DRI
102 VBoxOGL_DEFS += VBOXOGL_DRI IN_DRI_DRIVER
103else ifdef VBoxOGL_FAKEDRI
104 VBoxOGL_DEFS += VBOXOGL_FAKEDRI
105 ifdef VBOX_OGL_GLX_USE_CSTUBS
106 VBoxOGL_DEFS += VBOX_OGL_GLX_USE_CSTUBS
107 endif
108endif
109
110ifdef VBOX_WITH_WDDM
111 VBoxOGL_DEFS.win += VBOX_WITH_WDDM
112 VBoxOGL_SDKS.win += $(VBOX_WINDDK_GST_WLH)
113endif
114
115ifeq ($(KBUILD_TARGET),win)
116#fixme?, INTERMEDIATES.win ain't working
117 VBoxOGL_INTERMEDIATES += $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h
118 if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
119 VBoxOGL_INSTTYPE.win = none
120 VBoxOGL_DEBUG_INSTTYPE.win = both
121 endif
122endif
123ifdef VBoxOGL_DRI
124 VBoxOGL_INTERMEDIATES += \
125 $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h \
126 $(VBOX_PATH_CROGL_GENFILES)/DD_gl.h
127else ifdef VBoxOGL_FAKEDRI
128 VBoxOGL_INTERMEDIATES += \
129 $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h
130endif
131VBoxOGL_SOURCES += \
132 load.c \
133 stub.c \
134 context.c \
135 $(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c \
136 $(VBOX_PATH_CROGL_GENFILES)/NULLfuncs.c \
137 $(VBOX_PATH_CROGL_GENFILES)/tsfuncs.c
138
139if1of ($(KBUILD_TARGET), linux solaris freebsd)
140 VBoxOGL_SOURCES += \
141 glx.c \
142 xfont.c
143 ifdef VBOX_OGL_GLX_USE_CSTUBS
144 VBoxOGL_SOURCES += glx_c_exports.c
145 endif
146
147 ifdef VBoxOGL_DRI
148 VBoxOGL_SOURCES += \
149 $(VBOX_PATH_CROGL_GENFILES)/DD_gl.c \
150 dri_drv.c
151 VBoxOGL_SOURCES.linux += \
152 $(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm
153 VBoxOGL_SOURCES.solaris += \
154 $(VBOX_PATH_CROGL_GENFILES)/solaris_exports_dri.asm
155 VBoxOGL_SOURCES.freebsd += \
156 $(VBOX_PATH_CROGL_GENFILES)/freebsd_exports_dri.asm
157 else ifdef VBoxOGL_FAKEDRI
158 VBoxOGL_SOURCES += \
159 fakedri_drv.c
160 ifndef VBOX_OGL_GLX_USE_CSTUBS
161 VBoxOGL_SOURCES.solaris += \
162 $(VBOX_PATH_CROGL_GENFILES)/solaris_glxapi_exports.asm \
163 $(VBOX_PATH_CROGL_GENFILES)/solaris_exports_dri.asm
164 VBoxOGL_SOURCES.linux += \
165 $(VBOX_PATH_CROGL_GENFILES)/linux_glxapi_exports.asm \
166 $(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm
167 VBoxOGL_SOURCES.freebsd += \
168 $(VBOX_PATH_CROGL_GENFILES)/freebsd_glxapi_exports.asm \
169 $(VBOX_PATH_CROGL_GENFILES)/freebsd_exports_dri.asm
170 else
171 VBoxOGL_SOURCES.solaris += \
172 $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c
173 VBoxOGL_SOURCES.linux += \
174 $(VBOX_PATH_CROGL_GENFILES)/linux_exports.c
175 VBoxOGL_SOURCES.freebsd += \
176 $(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c
177 endif
178 else
179 VBoxOGL_SOURCES.linux += \
180 $(VBOX_PATH_CROGL_GENFILES)/linux_exports.asm
181 VBoxOGL_SOURCES.solaris += \
182 $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c
183 VBoxOGL_SOURCES.freebsd += \
184 $(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c
185 endif
186endif
187
188VBoxOGL_SOURCES.win = \
189 wgl.c \
190 icd_drv.c \
191 VBoxCROGL.rc \
192 $(VBOX_PATH_CROGL_GENFILES)/windows_exports.asm \
193 $(VBOX_PATH_CROGL_GENFILES)/cropengl.def
194VBoxOGL_CLEAN = \
195 $(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c \
196 $(VBOX_PATH_CROGL_GENFILES)/NULLfuncs.c \
197 $(VBOX_PATH_CROGL_GENFILES)/tsfuncs.c
198VBoxOGL_CLEAN.linux += \
199 $(VBOX_PATH_CROGL_GENFILES)/linux_exports.asm
200VBoxOGL_CLEAN.solaris += \
201 $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c
202VBoxOGL_CLEAN.win = \
203 $(VBOX_PATH_CROGL_GENFILES)/windows_exports.asm \
204 $(VBOX_PATH_CROGL_GENFILES)/cropengl.def
205if1of ($(KBUILD_TARGET), linux solaris)
206 ifdef VBoxOGL_DRI
207 VBoxOGL_CLEAN += \
208 $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h \
209 $(VBOX_PATH_CROGL_GENFILES)/DD_gl.h \
210 $(VBOX_PATH_CROGL_GENFILES)/DD_gl.c
211 else ifdef VBoxOGL_FAKEDRI
212 VBoxOGL_CLEAN += \
213 $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h
214 VBoxOGL_CLEAN.linux += \
215 $(VBOX_PATH_CROGL_GENFILES)/linux_glxapi_exports.asm
216 VBoxOGL_CLEAN.solaris += \
217 $(VBOX_PATH_CROGL_GENFILES)/solaris_glxapi_exports.asm
218 endif
219endif
220VBoxOGL_LIBS = \
221 $(VBOX_LIB_IPRT_GUEST_R3_SHARED) \
222 $(VBOX_LIB_VBGL_R3_SHARED) \
223 $(VBOX_LIB_OGL_CRUTIL) \
224 $(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB)
225if1of ($(KBUILD_TARGET), linux solaris freebsd)
226 VBoxOGL_LIBS += \
227 $(PATH_STAGE_LIB)/libXcomposite.so \
228 $(PATH_STAGE_LIB)/libXdamage.so \
229 $(PATH_STAGE_LIB)/libXfixes.so \
230 $(PATH_STAGE_LIB)/libXext.so
231 ifdef VBoxOGL_FAKEDRI
232 ifeq ($(KBUILD_TARGET), freebsd)
233 VBoxOGL_LIBS += \
234 elf
235 else
236 VBoxOGL_LIBS += \
237 dl
238 endif
239 endif
240endif
241ifdef VBOX_WITH_CRHGSMI
242VBoxOGL_DEFS.win += VBOX_WITH_CRHGSMI
243endif
244ifdef VBOX_WITH_WDDM
245VBoxOGL_DEFS.win += VBOX_WITH_WDDM
246endif
247
248ifdef VBOX_WITH_WDDM
249#
250# VBoxOGL-x86 - x86 VBoxOGL version built for amd64 build
251#
252DLLS.win.amd64 += VBoxOGL-x86
253VBoxOGL-x86_EXTENDS = VBoxOGL
254VBoxOGL-x86_BLD_TRG_ARCH = x86
255VBoxOGL-x86_LIBS = $(VBOX_LIB_IPRT_GUEST_R3_SHARED_X86) \
256 $(VBOX_LIB_VBGL_R3_SHARED_X86) \
257 $(VBOX_LIB_OGL_CRUTIL_X86) \
258 $(PATH_STAGE_LIB)/additions/VBoxOGLspuload-x86$(VBOX_SUFF_LIB)
259VBoxOGL-x86_SOURCES.win = $(subst cropengl.def,cropengl-x86.def,$(VBoxOGL_SOURCES.win))
260VBoxOGL-x86_CLEAN.win = $(subst cropengl.def,cropengl-x86.def,$(VBoxOGL_CLEAN.win))
261VBoxOGL-x86_DEFS = $(VBoxOGL_DEFS) VBOX_WDDM_WOW64
262endif
263
264#
265# Generate files for VBoxOGL.
266#
267$(VBOX_PATH_CROGL_GENFILES)/NULLfuncs.c: $(PATH_SUB_CURRENT)/NULLfuncs.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
268 $(call MSG_GENERATE,python,$@,$<)
269 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
270
271$(VBOX_PATH_CROGL_GENFILES)/tsfuncs.c: $(PATH_SUB_CURRENT)/tsfuncs.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
272 $(call MSG_GENERATE,python,$@,$<)
273 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
274
275
276ifeq ($(KBUILD_TARGET),win)
277 # Windows
278$(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c: $(PATH_SUB_CURRENT)/windows_getprocaddress.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
279 $(call MSG_GENERATE,python,$@,$<)
280 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
281
282 ifeq ($(KBUILD_TARGET_ARCH),amd64)
283$(VBOX_PATH_CROGL_GENFILES)/cropengl.def: $(PATH_SUB_CURRENT)/defs64.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
284 $(call MSG_GENERATE,python,$@,$<)
285 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
286 else
287$(VBOX_PATH_CROGL_GENFILES)/cropengl.def: $(PATH_SUB_CURRENT)/defs.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
288 $(call MSG_GENERATE,python,$@,$<)
289 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
290 endif
291
292$(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
293 $(call MSG_GENERATE,python,$@,$<)
294 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
295
296$(VBOX_PATH_CROGL_GENFILES)/windows_exports.asm: \
297 $(PATH_SUB_CURRENT)/windows_i386_exports.py \
298 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
299 | $$(dir $$@)
300 $(call MSG_GENERATE,python,$@,$<)
301 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
302
303 ifdef VBOX_WITH_WDDM
304 ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
305$(VBOX_PATH_CROGL_GENFILES)/cropengl-x86.def: $(PATH_SUB_CURRENT)/defs.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
306 $(call MSG_GENERATE,python,$@,$<)
307 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
308 endif #ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
309 endif #ifdef VBOX_WITH_WDDM
310
311
312else if1of ($(KBUILD_TARGET), freebsd linux solaris)
313 # FreeBSD, Linux, Solaris
314$(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c: $(PATH_SUB_CURRENT)/getprocaddress.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
315 $(call MSG_GENERATE,python,$@,$<)
316 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
317
318 if !defined(VBoxOGL_DRI) && !defined(VBoxOGL_FAKEDRI)
319 ifeq ($(KBUILD_TARGET),solaris)
320$(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c: \
321 $(PATH_SUB_CURRENT)/SunOS_exports.py \
322 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
323 | $$(dir $$@)
324 $(call MSG_GENERATE,python,$@,$<)
325 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
326
327 else ifeq ($(KBUILD_TARGET),freebsd)
328$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c: \
329 $(PATH_SUB_CURRENT)/FreeBSD_exports.py \
330 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
331 | $$(dir $$@)
332 $(call MSG_GENERATE,python,$@,$<)
333 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
334
335 else
336$(VBOX_PATH_CROGL_GENFILES)/linux_exports.asm: \
337 $(PATH_SUB_CURRENT)/Linux_i386_exports.py \
338 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
339 | $$(dir $$@)
340 $(call MSG_GENERATE,python,$@,$<)
341 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
342 endif
343
344 else ifdef VBoxOGL_DRI
345$(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
346 $(call MSG_GENERATE,python,$@,$<)
347 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
348
349$(VBOX_PATH_CROGL_GENFILES)/DD_gl.h: $(PATH_SUB_CURRENT)/DD_glh.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
350 $(call MSG_GENERATE,python,$@,$<)
351 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
352
353$(VBOX_PATH_CROGL_GENFILES)/DD_gl.c: $(PATH_SUB_CURRENT)/DD_glc.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
354 $(call MSG_GENERATE,python,$@,$<)
355 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
356
357 ifeq ($(KBUILD_TARGET),solaris)
358$(VBOX_PATH_CROGL_GENFILES)/solaris_exports_dri.asm: \
359 $(PATH_SUB_CURRENT)/SunOS_i386_exports_dri.py \
360 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
361 | $$(dir $$@)
362 $(call MSG_GENERATE,python,$@,$<)
363 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
364
365 else ifeq ($(KBUILD_TARGET),freebsd)
366$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports_dri.asm: \
367 $(PATH_SUB_CURRENT)/FreeBSD_i386_exports_dri.py \
368 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
369 | $$(dir $$@)
370 $(call MSG_GENERATE,python,$@,$<)
371 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
372
373 else
374$(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm: \
375 $(PATH_SUB_CURRENT)/Linux_i386_exports_dri.py \
376 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
377 | $$(dir $$@)
378 $(call MSG_GENERATE,python,$@,$<)
379 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
380 endif
381
382 else ifdef VBoxOGL_FAKEDRI
383$(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
384 $(call MSG_GENERATE,python,$@,$<)
385 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
386
387 ifndef VBOX_OGL_GLX_USE_CSTUBS
388 ifeq ($(KBUILD_TARGET),solaris)
389$(VBOX_PATH_CROGL_GENFILES)/solaris_exports_dri.asm: \
390 $(PATH_SUB_CURRENT)/SunOS_i386_exports_dri.py \
391 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
392 | $$(dir $$@)
393 $(call MSG_GENERATE,python,$@,$<)
394 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
395$(VBOX_PATH_CROGL_GENFILES)/solaris_glxapi_exports.asm: $(PATH_SUB_CURRENT)/SunOS_i386_glxapi_exports.py | $$(dir $$@)
396 $(call MSG_GENERATE,python,$@,$<)
397 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $<
398
399 else
400$(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm: \
401 $(PATH_SUB_CURRENT)/Linux_i386_exports_dri.py \
402 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
403 | $$(dir $$@)
404 $(call MSG_GENERATE,python,$@,$<)
405 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
406$(VBOX_PATH_CROGL_GENFILES)/linux_glxapi_exports.asm: $(PATH_SUB_CURRENT)/Linux_i386_glxapi_exports.py | $$(dir $$@)
407 $(call MSG_GENERATE,python,$@,$<)
408 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $<
409 endif
410
411 else
412 ifeq ($(KBUILD_TARGET),solaris)
413$(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c: \
414 $(PATH_SUB_CURRENT)/SunOS_exports.py \
415 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
416 | $$(dir $$@)
417 $(call MSG_GENERATE,python,$@,$<)
418 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
419
420 else ifeq ($(KBUILD_TARGET),freebsd)
421$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c: \
422 $(PATH_SUB_CURRENT)/FreeBSD_exports.py \
423 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
424 | $$(dir $$@)
425 $(call MSG_GENERATE,python,$@,$<)
426 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
427 else
428$(VBOX_PATH_CROGL_GENFILES)/linux_exports.c: \
429 $(PATH_SUB_CURRENT)/Linux_exports.py \
430 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
431 | $$(dir $$@)
432 $(call MSG_GENERATE,python,$@,$<)
433 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
434 endif
435
436 endif # VBOX_OGL_GLX_USE_CSTUBS
437 endif
438endif
439
440#
441# VBoxOGLarrayspu
442#
443VBoxOGLarrayspu_TEMPLATE = VBOXCROGLR3GUESTDLL
444VBoxOGLarrayspu_INCS = \
445 array
446if1of ($(KBUILD_TARGET), linux solaris freebsd)
447 VBoxOGLarrayspu_INCS += \
448 $(VBOX_MESA_INCS)
449endif
450if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
451 VBoxOGLarrayspu_INSTTYPE.win = none
452 VBoxOGLarrayspu_DEBUG_INSTTYPE.win = both
453endif
454VBoxOGLarrayspu_INCS.darwin += $(PATH_OUT)/obj/VBoxOGL
455VBoxOGLarrayspu_INTERMEDIATES = \
456 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
457 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
458VBoxOGLarrayspu_SOURCES = \
459 array/arrayspu.c \
460 array/arrayspu_config.c \
461 array/arrayspu_init.c
462VBoxOGLarrayspu_SOURCES.win = \
463 array/arrayspu.def \
464 array/arrayspu.rc
465VBoxOGLarrayspu_LIBS = \
466 $(VBOX_LIB_OGL_CRUTIL) \
467 $(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) \
468 $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate$(VBOX_SUFF_LIB)
469ifdef VBOX_WITH_CRHGSMI
470VBoxOGLarrayspu_DEFS.win += VBOX_WITH_CRHGSMI
471endif
472ifdef VBOX_WITH_WDDM
473VBoxOGLarrayspu_DEFS.win += VBOX_WITH_WDDM
474endif
475
476ifdef VBOX_WITH_WDDM
477#
478# VBoxOGLarrayspu-x86 - x86 version of VBoxOGLarrayspu built for amd64 build
479#
480DLLS.win.amd64 += VBoxOGLarrayspu-x86
481VBoxOGLarrayspu-x86_EXTENDS = VBoxOGLarrayspu
482VBoxOGLarrayspu-x86_BLD_TRG_ARCH = x86
483VBoxOGLarrayspu-x86_LIBS = $(VBOX_LIB_OGL_CRUTIL_X86) \
484 $(PATH_STAGE_LIB)/additions/VBoxOGLspuload-x86$(VBOX_SUFF_LIB) \
485 $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate-x86$(VBOX_SUFF_LIB)
486VBoxOGLarrayspu-x86_DEFS = $(VBoxOGLarrayspu_DEFS) VBOX_WDDM_WOW64
487endif
488
489#
490# VBoxOGLpassthroughspu
491#
492VBoxOGLpassthroughspu_TEMPLATE = VBOXCROGLR3GUESTDLL
493VBoxOGLpassthroughspu_INCS = \
494 passthrough
495if1of ($(KBUILD_TARGET), linux solaris freebsd)
496 VBoxOGLpassthroughspu_INCS += \
497 $(VBOX_MESA_INCS)
498endif
499if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
500 VBoxOGLpassthroughspu_INSTTYPE.win = none
501 VBoxOGLpassthroughspu_DEBUG_INSTTYPE.win = both
502endif
503VBoxOGLpassthroughspu_SOURCES = \
504 passthrough/passthroughspu_init.c \
505 $(VBOX_PATH_CROGL_GENFILES)/passthroughspu.c
506VBoxOGLpassthroughspu_SOURCES.win = \
507 passthrough/passthrough.def \
508 passthrough/passthroughspu.rc
509VBoxOGLpassthroughspu_CLEAN = \
510 $(VBOX_PATH_CROGL_GENFILES)/passthroughspu.c
511VBoxOGLpassthroughspu_LIBS = \
512 $(VBOX_LIB_OGL_CRUTIL)
513ifdef VBOX_WITH_CRHGSMI
514VBoxOGLpassthroughspu_DEFS.win += VBOX_WITH_CRHGSMI
515endif
516ifdef VBOX_WITH_WDDM
517VBoxOGLpassthroughspu_DEFS.win += VBOX_WITH_WDDM
518endif
519
520ifdef VBOX_WITH_WDDM
521#
522# VBoxOGLpassthroughspu-x86 - x86 version of VBoxOGLpassthroughspu built for amd64 build
523#
524DLLS.win.amd64 += VBoxOGLpassthroughspu-x86
525VBoxOGLpassthroughspu-x86_EXTENDS = VBoxOGLpassthroughspu
526VBoxOGLpassthroughspu-x86_BLD_TRG_ARCH = x86
527VBoxOGLpassthroughspu-x86_LIBS = $(VBOX_LIB_OGL_CRUTIL_X86)
528VBoxOGLpassthroughspu-x86_DEFS = $(VBoxOGLpassthroughspu_DEFS) VBOX_WDDM_WOW64
529endif
530
531#
532# Generate files for VBoxOGLpassthroughspu.
533#
534$(VBOX_PATH_CROGL_GENFILES)/passthroughspu.c: $(PATH_SUB_CURRENT)/passthrough/passthrough.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
535 $(call MSG_GENERATE,python,$@,$<)
536 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
537
538#
539# VBoxOGLpackspu
540#
541VBoxOGLpackspu_TEMPLATE = VBOXCROGLR3GUESTDLL
542VBoxOGLpackspu_DEFS = TRACKS_STATE=1 PACKS=1
543VBoxOGLpackspu_INCS = \
544 pack
545if1of ($(KBUILD_TARGET), linux solaris freebsd)
546 VBoxOGLpackspu_INCS += \
547 $(VBOX_MESA_INCS)
548endif
549if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
550 VBoxOGLpackspu_INSTTYPE.win = none
551 VBoxOGLpackspu_DEBUG_INSTTYPE.win = both
552endif
553VBoxOGLpackspu_INTERMEDIATES = \
554 $(VBOX_PATH_CROGL_GENFILES)/packspu_proto.h \
555 $(VBOX_PATH_CROGL_GENFILES)/cr_packfunctions.h
556VBoxOGLpackspu_SOURCES = \
557 pack/packspu_bufferobject.c \
558 pack/packspu_client.c \
559 pack/packspu_config.c \
560 pack/packspu_context.c \
561 pack/packspu_getstring.c \
562 pack/packspu_init.c \
563 pack/packspu_misc.c \
564 pack/packspu_net.c \
565 pack/packspu_swapbuf.c \
566 pack/packspu_pixel.c \
567 pack/packspu_texture.c \
568 pack/packspu_getshaders.c \
569 pack/packspu_glsl.c \
570 pack/packspu_framebuffer.c \
571 $(VBOX_PATH_CROGL_GENFILES)/packspu.c \
572 $(VBOX_PATH_CROGL_GENFILES)/packspu_get.c \
573 $(VBOX_PATH_CROGL_GENFILES)/packspu_flush.c \
574 $(VBOX_PATH_CROGL_GENFILES)/packspu_beginend.c
575VBoxOGLpackspu_SOURCES.win = \
576 pack/pack.def \
577 pack/packspu.rc
578VBoxOGLpackspu_CLEAN = \
579 $(VBOX_PATH_CROGL_GENFILES)/packspu_proto.h \
580 $(VBOX_PATH_CROGL_GENFILES)/packspu.c \
581 $(VBOX_PATH_CROGL_GENFILES)/packspu_get.c \
582 $(VBOX_PATH_CROGL_GENFILES)/packspu_flush.c \
583 $(VBOX_PATH_CROGL_GENFILES)/packspu_beginend.c
584VBoxOGLpackspu_LIBS = \
585 $(VBOX_LIB_OGL_CRUTIL) \
586 $(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) \
587 $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate$(VBOX_SUFF_LIB) \
588 $(PATH_STAGE_LIB)/additions/VBoxOGLcrpacker$(VBOX_SUFF_LIB)
589ifdef VBOX_WITH_CRHGSMI
590VBoxOGLpackspu_DEFS.win += VBOX_WITH_CRHGSMI
591endif
592ifdef VBOX_WITH_CRDUMPER
593VBoxOGLpackspu_DEFS += VBOX_WITH_CRDUMPER
594endif
595ifdef VBOX_WITH_CRPACKSPU_DUMPER
596VBoxOGLpackspu_DEFS += VBOX_WITH_CRPACKSPU_DUMPER
597endif
598ifdef VBOX_WITH_WDDM
599VBoxOGLpackspu_DEFS.win += VBOX_WITH_WDDM
600endif
601
602ifdef VBOX_WITH_WDDM
603#
604# VBoxOGLpackspu-x86 - x86 version of VBoxOGLpackspu built for amd64 build
605#
606DLLS.win.amd64 += VBoxOGLpackspu-x86
607VBoxOGLpackspu-x86_EXTENDS = VBoxOGLpackspu
608VBoxOGLpackspu-x86_BLD_TRG_ARCH = x86
609VBoxOGLpackspu-x86_LIBS = $(VBOX_LIB_OGL_CRUTIL_X86) \
610 $(PATH_STAGE_LIB)/additions/VBoxOGLspuload-x86$(VBOX_SUFF_LIB) \
611 $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate-x86$(VBOX_SUFF_LIB) \
612 $(PATH_STAGE_LIB)/additions/VBoxOGLcrpacker-x86$(VBOX_SUFF_LIB)
613VBoxOGLpackspu-x86_DEFS = $(VBoxOGLpackspu_DEFS) VBOX_WDDM_WOW64
614endif
615
616#
617# Generate files for VBoxOGLpackspu.
618#
619$(VBOX_PATH_CROGL_GENFILES)/packspu.c: $(addprefix $(PATH_SUB_CURRENT)/pack/,pack.py packspu_special packspu_unimplemented_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
620 $(call MSG_GENERATE,python,$@,$<)
621 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
622
623$(VBOX_PATH_CROGL_GENFILES)/packspu_get.c: $(PATH_SUB_CURRENT)/pack/packspu_get.py $(PATH_SUB_CURRENT)/pack/packspu_special $(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib/get_sizes.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
624 $(call MSG_GENERATE,python,$@,$<)
625 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
626
627$(VBOX_PATH_CROGL_GENFILES)/packspu_flush.c: $(PATH_SUB_CURRENT)/pack/packspu_flush.py $(PATH_SUB_CURRENT)/pack/packspu_flush_special $(VBOX_CROGL_API_FILES) | $$(dir $$@)
628 $(call MSG_GENERATE,python,$@,$<)
629 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
630
631$(VBOX_PATH_CROGL_GENFILES)/packspu_beginend.c: $(PATH_SUB_CURRENT)/pack/packspu_beginend.py $(PATH_SUB_CURRENT)/pack/packspu_vertex_special $(VBOX_CROGL_API_FILES) | $$(dir $$@)
632 $(call MSG_GENERATE,python,$@,$<)
633 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
634
635$(VBOX_PATH_CROGL_GENFILES)/packspu_proto.h: $(addprefix $(PATH_SUB_CURRENT)/pack/,packspu_proto.py packspu_special packspu_unimplemented_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
636 $(call MSG_GENERATE,python,$@,$<)
637 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
638
639#
640# VBoxOGLfeedbackspu
641#
642VBoxOGLfeedbackspu_TEMPLATE = VBOXCROGLR3GUESTDLL
643VBoxOGLfeedbackspu_INCS = \
644 feedback
645if1of ($(KBUILD_TARGET), linux solaris freebsd)
646 VBoxOGLfeedbackspu_INCS += \
647 $(VBOX_MESA_INCS)
648endif
649if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
650 VBoxOGLfeedbackspu_INSTTYPE.win = none
651 VBoxOGLfeedbackspu_DEBUG_INSTTYPE.win = both
652endif
653VBoxOGLarrayspu_INTERMEDIATES = \
654 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_proto.h
655VBoxOGLfeedbackspu_SOURCES = \
656 feedback/feedbackspu_config.c \
657 feedback/feedbackspu_init.c \
658 feedback/feedback_context.c \
659 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu.c \
660 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_state.c
661VBoxOGLfeedbackspu_SOURCES.win = \
662 feedback/feedback.def \
663 feedback/feedbackspu.rc
664VBoxOGLfeedbackspu_CLEAN = \
665 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_proto.h \
666 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu.c \
667 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_state.c
668VBoxOGLfeedbackspu_LIBS = \
669 $(VBOX_LIB_OGL_CRUTIL) \
670 $(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) \
671 $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate$(VBOX_SUFF_LIB)
672ifdef VBOX_WITH_CRHGSMI
673VBoxOGLfeedbackspu_DEFS.win += VBOX_WITH_CRHGSMI
674endif
675ifdef VBOX_WITH_WDDM
676VBoxOGLfeedbackspu_DEFS.win += VBOX_WITH_WDDM
677endif
678
679ifdef VBOX_WITH_WDDM
680#
681# VBoxOGLfeedbackspu-x86 - x86 version of VBoxOGLfeedbackspu built for amd64 build
682#
683DLLS.win.amd64 += VBoxOGLfeedbackspu-x86
684VBoxOGLfeedbackspu-x86_EXTENDS = VBoxOGLfeedbackspu
685VBoxOGLfeedbackspu-x86_BLD_TRG_ARCH = x86
686VBoxOGLfeedbackspu-x86_LIBS = $(VBOX_LIB_OGL_CRUTIL_X86) \
687 $(PATH_STAGE_LIB)/additions/VBoxOGLspuload-x86$(VBOX_SUFF_LIB) \
688 $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate-x86$(VBOX_SUFF_LIB)
689VBoxOGLfeedbackspu-x86_DEFS = $(VBoxOGLfeedbackspu_DEFS) VBOX_WDDM_WOW64
690endif
691
692#
693# Generate files for VBoxOGLfeedbackspu.
694#
695$(VBOX_PATH_CROGL_GENFILES)/feedbackspu.c: $(addprefix $(PATH_SUB_CURRENT)/feedback/,feedback.py feedback_special select_special feedback_state_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
696 $(call MSG_GENERATE,python,$@,$<)
697 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
698
699$(VBOX_PATH_CROGL_GENFILES)/feedbackspu_state.c: $(addprefix $(PATH_SUB_CURRENT)/feedback/,feedback_state.py feedback_state_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
700 $(call MSG_GENERATE,python,$@,$<)
701 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
702
703$(VBOX_PATH_CROGL_GENFILES)/feedbackspu_proto.h: $(addprefix $(PATH_SUB_CURRENT)/feedback/,feedbackspu_proto.py feedback_special select_special feedback_state_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
704 $(call MSG_GENERATE,python,$@,$<)
705 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
706
707include $(FILE_KBUILD_SUB_FOOTER)
708
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