VirtualBox

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

Last change on this file since 57444 was 56294, checked in by vboxsync, 10 years ago

Additions/common,Additions/os2: Updated (C) year.

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