VirtualBox

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

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

Additions: Remove the VBoxOGLarrayspu library as it is unused for a long time already bugref:9435

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 25.6 KB
Line 
1# $Id: Makefile.kmk 78340 2019-04-28 15:23:27Z vboxsync $
2## @file
3# Sub-Makefile for the VirtualBox Guest OpenGL part
4#
5
6#
7# Copyright (C) 2008-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
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 VBoxOGLpassthroughspu \
31 VBoxOGLpackspu \
32 VBoxOGLfeedbackspu
33endif
34
35VBOX_OGL_X86_GUEST_DLLS = \
36 VBoxOGL-x86 \
37 VBoxOGLpassthroughspu-x86 \
38 VBoxOGLpackspu-x86 \
39 VBoxOGLfeedbackspu-x86
40
41ifdef VBOX_WITH_WDDM
42 DLLS.win.amd64 += $(VBOX_OGL_X86_GUEST_DLLS)
43endif
44
45if1of ($(KBUILD_TARGET), linux solaris freebsd)
46 #VBoxOGL_DRI = 1
47 DLLS += VBoxEGL
48 ifn1of ($(KBUILD_TARGET),linux solaris) # No DRI on Solaris yet
49 VBoxOGL_FAKEDRI = 1
50 endif
51
52 # Only Solaris right now needs C stubs because I can't figure out how to
53 # generate the GOT based relocation ASM yet.
54 ifdef VBoxOGL_FAKEDRI
55 if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),solaris.x86 solaris.amd64 linux.x86 linux.amd64 freebsd.x86 freebsd.amd64)
56 VBOX_OGL_GLX_USE_CSTUBS = 1
57 endif
58 endif
59endif
60
61
62#
63# VBoxOGL
64#
65VBoxOGL_TEMPLATE = VBOXCROGLR3GUESTDLL
66VBoxOGL_INCS = . $(VBOX_GRAPHICS_INCS)
67if1of ($(KBUILD_TARGET), linux solaris freebsd)
68 ifndef VBOX_USE_SYSTEM_GL_HEADERS
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_GL_INCS)
81 endif
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.c
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.c
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
204# VBoxOGL_LIBS = \ # VBOX_LIB_OGL_CRUTIL includes these and caused an interesting conflict.
205# $(VBOX_LIB_IPRT_GUEST_R3_SHARED) \
206# $(VBOX_LIB_VBGL_R3_SHARED) \
207
208VBoxOGL_LIBS = \
209 $(VBOX_LIB_OGL_CRUTIL) \
210 $(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB)
211
212VBoxOGL_LIBS.win += \
213 $(PATH_STAGE_LIB)/additions/VBoxDispMpLogger$(VBOX_SUFF_LIB) \
214 $(PATH_STAGE_LIB)/additions/VBoxWddmUmKmt$(VBOX_SUFF_LIB) \
215 $(PATH_STAGE_LIB)/additions/VBoxCrHgsmi$(VBOX_SUFF_LIB)
216
217if1of ($(KBUILD_TARGET), linux solaris freebsd)
218 ifdef VBOX_USE_SYSTEM_GL_HEADERS
219 VBoxOGL_LIBS += Xcomposite Xdamage Xfixes Xext
220 else
221 VBoxOGL_LIBS += \
222 $(PATH_STAGE_LIB)/libXcomposite.so \
223 $(PATH_STAGE_LIB)/libXdamage.so \
224 $(PATH_STAGE_LIB)/libXfixes.so \
225 $(PATH_STAGE_LIB)/libXext.so
226 endif
227 ifdef VBoxOGL_FAKEDRI
228 ifeq ($(KBUILD_TARGET), freebsd)
229 VBoxOGL_LIBS += \
230 elf
231 else
232 VBoxOGL_LIBS += \
233 dl
234 endif
235 else
236 VBoxOGL_SONAME.linux = libGL.so.1
237 VBoxOGL_LDFLAGS.linux += -Wl,-e,LibMain
238 endif
239endif
240ifdef VBOX_WITH_CRHGSMI
241VBoxOGL_DEFS.win += VBOX_WITH_CRHGSMI
242endif
243ifdef VBOX_WITH_WDDM
244VBoxOGL_DEFS.win += VBOX_WITH_WDDM
245endif
246if1of ($(KBUILD_TARGET), linux)
247VBoxOGL_LDFLAGS += -Wl,-z,nodelete
248endif
249ifdef VBOX_WITH_WDDM
250#
251# VBoxOGL-x86 - x86 VBoxOGL version built for amd64 build
252#
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)
259
260VBoxOGL-x86_LIBS.win += \
261 $(PATH_STAGE_LIB)/additions/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \
262 $(PATH_STAGE_LIB)/additions/VBoxWddmUmKmt-x86$(VBOX_SUFF_LIB) \
263 $(PATH_STAGE_LIB)/additions/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB)
264
265
266VBoxOGL-x86_SOURCES.win = $(subst cropengl.def,cropengl-x86.def,$(VBoxOGL_SOURCES.win))
267VBoxOGL-x86_CLEAN.win = $(subst cropengl.def,cropengl-x86.def,$(VBoxOGL_CLEAN.win))
268VBoxOGL-x86_DEFS = $(VBoxOGL_DEFS) VBOX_WDDM_WOW64
269endif
270
271#
272# Generate files for VBoxOGL.
273#
274$(VBOX_PATH_CROGL_GENFILES)/NULLfuncs.c: $(PATH_SUB_CURRENT)/NULLfuncs.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$(VBOX_PATH_CROGL_GENFILES)/tsfuncs.c: $(PATH_SUB_CURRENT)/tsfuncs.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
283ifeq ($(KBUILD_TARGET),win)
284 # Windows
285$(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c: $(PATH_SUB_CURRENT)/windows_getprocaddress.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
286 $(call MSG_GENERATE,python,$@,$<)
287 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
288
289 ifeq ($(KBUILD_TARGET_ARCH),amd64)
290$(VBOX_PATH_CROGL_GENFILES)/cropengl.def: $(PATH_SUB_CURRENT)/defs64.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
291 $(call MSG_GENERATE,python,$@,$<)
292 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
293 else
294$(VBOX_PATH_CROGL_GENFILES)/cropengl.def: $(PATH_SUB_CURRENT)/defs.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
295 $(call MSG_GENERATE,python,$@,$<)
296 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
297 endif
298
299$(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.py $(VBOX_CROGL_API_FILES) | $$(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$(VBOX_PATH_CROGL_GENFILES)/windows_exports.asm: \
304 $(PATH_SUB_CURRENT)/windows_i386_exports.py \
305 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
306 | $$(dir $$@)
307 $(call MSG_GENERATE,python,$@,$<)
308 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
309
310 ifdef VBOX_WITH_WDDM
311 ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
312$(VBOX_PATH_CROGL_GENFILES)/cropengl-x86.def: $(PATH_SUB_CURRENT)/defs.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
313 $(call MSG_GENERATE,python,$@,$<)
314 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
315 endif #ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
316 endif #ifdef VBOX_WITH_WDDM
317
318
319else if1of ($(KBUILD_TARGET), freebsd linux solaris)
320 # FreeBSD, Linux, Solaris
321$(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c: $(PATH_SUB_CURRENT)/getprocaddress.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
322 $(call MSG_GENERATE,python,$@,$<)
323 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
324
325 if !defined(VBoxOGL_DRI) && !defined(VBoxOGL_FAKEDRI)
326 ifeq ($(KBUILD_TARGET),solaris)
327$(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c: \
328 $(PATH_SUB_CURRENT)/SunOS_exports.py \
329 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
330 | $$(dir $$@)
331 $(call MSG_GENERATE,python,$@,$<)
332 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
333
334 else ifeq ($(KBUILD_TARGET),freebsd)
335$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c: \
336 $(PATH_SUB_CURRENT)/FreeBSD_exports.py \
337 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
338 | $$(dir $$@)
339 $(call MSG_GENERATE,python,$@,$<)
340 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
341
342 else
343$(VBOX_PATH_CROGL_GENFILES)/linux_exports.c: \
344 $(PATH_SUB_CURRENT)/Linux_exports.py \
345 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
346 | $$(dir $$@)
347 $(call MSG_GENERATE,python,$@,$<)
348 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
349 endif
350
351 else ifdef VBoxOGL_DRI
352$(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
353 $(call MSG_GENERATE,python,$@,$<)
354 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
355
356$(VBOX_PATH_CROGL_GENFILES)/DD_gl.h: $(PATH_SUB_CURRENT)/DD_glh.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
357 $(call MSG_GENERATE,python,$@,$<)
358 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
359
360$(VBOX_PATH_CROGL_GENFILES)/DD_gl.c: $(PATH_SUB_CURRENT)/DD_glc.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
361 $(call MSG_GENERATE,python,$@,$<)
362 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
363
364 ifeq ($(KBUILD_TARGET),solaris)
365$(VBOX_PATH_CROGL_GENFILES)/solaris_exports_dri.asm: \
366 $(PATH_SUB_CURRENT)/SunOS_i386_exports_dri.py \
367 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
368 | $$(dir $$@)
369 $(call MSG_GENERATE,python,$@,$<)
370 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
371
372 else ifeq ($(KBUILD_TARGET),freebsd)
373$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports_dri.asm: \
374 $(PATH_SUB_CURRENT)/FreeBSD_i386_exports_dri.py \
375 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
376 | $$(dir $$@)
377 $(call MSG_GENERATE,python,$@,$<)
378 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
379
380 else
381$(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm: \
382 $(PATH_SUB_CURRENT)/Linux_i386_exports_dri.py \
383 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
384 | $$(dir $$@)
385 $(call MSG_GENERATE,python,$@,$<)
386 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
387 endif
388
389 else ifdef VBoxOGL_FAKEDRI
390$(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
391 $(call MSG_GENERATE,python,$@,$<)
392 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
393
394 ifndef VBOX_OGL_GLX_USE_CSTUBS
395 ifeq ($(KBUILD_TARGET),solaris)
396$(VBOX_PATH_CROGL_GENFILES)/solaris_exports_dri.asm: \
397 $(PATH_SUB_CURRENT)/SunOS_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)/solaris_glxapi_exports.asm: $(PATH_SUB_CURRENT)/SunOS_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
406 else
407$(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm: \
408 $(PATH_SUB_CURRENT)/Linux_i386_exports_dri.py \
409 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
410 | $$(dir $$@)
411 $(call MSG_GENERATE,python,$@,$<)
412 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
413$(VBOX_PATH_CROGL_GENFILES)/linux_glxapi_exports.asm: $(PATH_SUB_CURRENT)/Linux_i386_glxapi_exports.py | $$(dir $$@)
414 $(call MSG_GENERATE,python,$@,$<)
415 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $<
416 endif
417
418 else
419 ifeq ($(KBUILD_TARGET),solaris)
420$(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c: \
421 $(PATH_SUB_CURRENT)/SunOS_exports.py \
422 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
423 | $$(dir $$@)
424 $(call MSG_GENERATE,python,$@,$<)
425 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
426
427 else ifeq ($(KBUILD_TARGET),freebsd)
428$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c: \
429 $(PATH_SUB_CURRENT)/FreeBSD_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 else
435$(VBOX_PATH_CROGL_GENFILES)/linux_exports.c: \
436 $(PATH_SUB_CURRENT)/Linux_exports.py \
437 $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
438 | $$(dir $$@)
439 $(call MSG_GENERATE,python,$@,$<)
440 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
441 endif
442
443 endif # VBOX_OGL_GLX_USE_CSTUBS
444 endif
445endif
446
447#
448# VBoxOGLpassthroughspu
449#
450VBoxOGLpassthroughspu_TEMPLATE = VBOXCROGLR3GUESTDLL
451VBoxOGLpassthroughspu_INCS = \
452 passthrough \
453 $(VBOX_GRAPHICS_INCS)
454if1of ($(KBUILD_TARGET), linux solaris freebsd)
455 VBoxOGLpassthroughspu_INCS += \
456 $(VBOX_GL_INCS)
457endif
458if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
459 VBoxOGLpassthroughspu_INSTTYPE.win = none
460 VBoxOGLpassthroughspu_DEBUG_INSTTYPE.win = both
461endif
462VBoxOGLpassthroughspu_SOURCES = \
463 passthrough/passthroughspu_init.c \
464 $(VBOX_PATH_CROGL_GENFILES)/passthroughspu.c
465VBoxOGLpassthroughspu_SOURCES.win = \
466 passthrough/passthrough.def \
467 passthrough/passthroughspu.rc
468VBoxOGLpassthroughspu_CLEAN = \
469 $(VBOX_PATH_CROGL_GENFILES)/passthroughspu.c
470VBoxOGLpassthroughspu_LIBS = \
471 $(VBOX_LIB_OGL_CRUTIL)
472ifdef VBOX_WITH_CRHGSMI
473VBoxOGLpassthroughspu_DEFS.win += VBOX_WITH_CRHGSMI
474endif
475ifdef VBOX_WITH_WDDM
476VBoxOGLpassthroughspu_DEFS.win += VBOX_WITH_WDDM
477endif
478
479ifdef VBOX_WITH_WDDM
480#
481# VBoxOGLpassthroughspu-x86 - x86 version of VBoxOGLpassthroughspu built for amd64 build
482#
483VBoxOGLpassthroughspu-x86_EXTENDS = VBoxOGLpassthroughspu
484VBoxOGLpassthroughspu-x86_BLD_TRG_ARCH = x86
485VBoxOGLpassthroughspu-x86_LIBS = $(VBOX_LIB_OGL_CRUTIL_X86)
486VBoxOGLpassthroughspu-x86_DEFS = $(VBoxOGLpassthroughspu_DEFS) VBOX_WDDM_WOW64
487endif
488
489#
490# Generate files for VBoxOGLpassthroughspu.
491#
492$(VBOX_PATH_CROGL_GENFILES)/passthroughspu.c: $(PATH_SUB_CURRENT)/passthrough/passthrough.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
493 $(call MSG_GENERATE,python,$@,$<)
494 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
495
496#
497# VBoxOGLpackspu
498#
499VBoxOGLpackspu_TEMPLATE = VBOXCROGLR3GUESTDLL
500VBoxOGLpackspu_DEFS = TRACKS_STATE=1 PACKS=1
501VBoxOGLpackspu_INCS = \
502 pack \
503 $(VBOX_GRAPHICS_INCS)
504if1of ($(KBUILD_TARGET), linux solaris freebsd)
505 VBoxOGLpackspu_INCS += \
506 $(VBOX_GL_INCS)
507endif
508if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
509 VBoxOGLpackspu_INSTTYPE.win = none
510 VBoxOGLpackspu_DEBUG_INSTTYPE.win = both
511endif
512VBoxOGLpackspu_INTERMEDIATES = \
513 $(VBOX_PATH_CROGL_GENFILES)/packspu_proto.h \
514 $(VBOX_PATH_CROGL_GENFILES)/cr_packfunctions.h
515VBoxOGLpackspu_SOURCES = \
516 pack/packspu_bufferobject.c \
517 pack/packspu_client.c \
518 pack/packspu_config.c \
519 pack/packspu_context.c \
520 pack/packspu_getstring.c \
521 pack/packspu_init.c \
522 pack/packspu_misc.c \
523 pack/packspu_net.c \
524 pack/packspu_swapbuf.c \
525 pack/packspu_pixel.c \
526 pack/packspu_texture.c \
527 pack/packspu_getshaders.c \
528 pack/packspu_glsl.c \
529 pack/packspu_framebuffer.c \
530 $(VBOX_PATH_CROGL_GENFILES)/packspu.c \
531 $(VBOX_PATH_CROGL_GENFILES)/packspu_get.c \
532 $(VBOX_PATH_CROGL_GENFILES)/packspu_flush.c \
533 $(VBOX_PATH_CROGL_GENFILES)/packspu_beginend.c
534VBoxOGLpackspu_SOURCES.win = \
535 pack/pack.def \
536 pack/packspu.rc
537VBoxOGLpackspu_CLEAN = \
538 $(VBOX_PATH_CROGL_GENFILES)/packspu_proto.h \
539 $(VBOX_PATH_CROGL_GENFILES)/packspu.c \
540 $(VBOX_PATH_CROGL_GENFILES)/packspu_get.c \
541 $(VBOX_PATH_CROGL_GENFILES)/packspu_flush.c \
542 $(VBOX_PATH_CROGL_GENFILES)/packspu_beginend.c
543VBoxOGLpackspu_LIBS = \
544 $(VBOX_LIB_OGL_CRUTIL) \
545 $(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) \
546 $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate$(VBOX_SUFF_LIB) \
547 $(PATH_STAGE_LIB)/additions/VBoxOGLcrpacker$(VBOX_SUFF_LIB)
548VBoxOGLpackspu_LIBS.win += \
549 $(PATH_STAGE_LIB)/additions/VBoxDispMpLogger$(VBOX_SUFF_LIB) \
550 $(PATH_STAGE_LIB)/additions/VBoxWddmUmKmt$(VBOX_SUFF_LIB) \
551 $(PATH_STAGE_LIB)/additions/VBoxCrHgsmi$(VBOX_SUFF_LIB)
552
553ifdef VBOX_WITH_CRHGSMI
554VBoxOGLpackspu_DEFS.win += VBOX_WITH_CRHGSMI
555endif
556ifdef VBOX_WITH_CRDUMPER
557VBoxOGLpackspu_DEFS += VBOX_WITH_CRDUMPER
558endif
559ifdef VBOX_WITH_CRPACKSPU_DUMPER
560VBoxOGLpackspu_DEFS += VBOX_WITH_CRPACKSPU_DUMPER
561endif
562ifdef VBOX_WITH_WDDM
563VBoxOGLpackspu_DEFS.win += VBOX_WITH_WDDM
564endif
565
566ifdef VBOX_WITH_WDDM
567#
568# VBoxOGLpackspu-x86 - x86 version of VBoxOGLpackspu built for amd64 build
569#
570VBoxOGLpackspu-x86_EXTENDS = VBoxOGLpackspu
571VBoxOGLpackspu-x86_BLD_TRG_ARCH = x86
572VBoxOGLpackspu-x86_LIBS = $(VBOX_LIB_OGL_CRUTIL_X86) \
573 $(PATH_STAGE_LIB)/additions/VBoxOGLspuload-x86$(VBOX_SUFF_LIB) \
574 $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate-x86$(VBOX_SUFF_LIB) \
575 $(PATH_STAGE_LIB)/additions/VBoxOGLcrpacker-x86$(VBOX_SUFF_LIB)
576VBoxOGLpackspu-x86_LIBS.win += \
577 $(PATH_STAGE_LIB)/additions/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \
578 $(PATH_STAGE_LIB)/additions/VBoxWddmUmKmt-x86$(VBOX_SUFF_LIB) \
579 $(PATH_STAGE_LIB)/additions/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB)
580VBoxOGLpackspu-x86_DEFS = $(VBoxOGLpackspu_DEFS) VBOX_WDDM_WOW64
581endif
582
583#
584# Generate files for VBoxOGLpackspu.
585#
586$(VBOX_PATH_CROGL_GENFILES)/packspu.c: $(addprefix $(PATH_SUB_CURRENT)/pack/,pack.py packspu_special packspu_unimplemented_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
587 $(call MSG_GENERATE,python,$@,$<)
588 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
589
590$(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 $$@)
591 $(call MSG_GENERATE,python,$@,$<)
592 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
593
594$(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 $$@)
595 $(call MSG_GENERATE,python,$@,$<)
596 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
597
598$(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 $$@)
599 $(call MSG_GENERATE,python,$@,$<)
600 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
601
602$(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 $$@)
603 $(call MSG_GENERATE,python,$@,$<)
604 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
605
606#
607# VBoxOGLfeedbackspu
608#
609VBoxOGLfeedbackspu_TEMPLATE = VBOXCROGLR3GUESTDLL
610VBoxOGLfeedbackspu_INCS = \
611 feedback \
612 $(VBOX_GRAPHICS_INCS)
613if1of ($(KBUILD_TARGET), linux solaris freebsd)
614 VBoxOGLfeedbackspu_INCS += \
615 $(VBOX_GL_INCS)
616endif
617if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
618 VBoxOGLfeedbackspu_INSTTYPE.win = none
619 VBoxOGLfeedbackspu_DEBUG_INSTTYPE.win = both
620endif
621VBoxOGLfeedbackspu_INTERMEDIATES = \
622 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_proto.h
623VBoxOGLfeedbackspu_SOURCES = \
624 feedback/feedbackspu_config.c \
625 feedback/feedbackspu_init.c \
626 feedback/feedback_context.c \
627 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu.c \
628 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_state.c
629VBoxOGLfeedbackspu_SOURCES.win = \
630 feedback/feedback.def \
631 feedback/feedbackspu.rc
632VBoxOGLfeedbackspu_CLEAN = \
633 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_proto.h \
634 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu.c \
635 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_state.c
636VBoxOGLfeedbackspu_LIBS = \
637 $(VBOX_LIB_OGL_CRUTIL) \
638 $(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) \
639 $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate$(VBOX_SUFF_LIB)
640ifdef VBOX_WITH_CRHGSMI
641VBoxOGLfeedbackspu_DEFS.win += VBOX_WITH_CRHGSMI
642endif
643ifdef VBOX_WITH_WDDM
644VBoxOGLfeedbackspu_DEFS.win += VBOX_WITH_WDDM
645endif
646
647ifdef VBOX_WITH_WDDM
648#
649# VBoxOGLfeedbackspu-x86 - x86 version of VBoxOGLfeedbackspu built for amd64 build
650#
651VBoxOGLfeedbackspu-x86_EXTENDS = VBoxOGLfeedbackspu
652VBoxOGLfeedbackspu-x86_BLD_TRG_ARCH = x86
653VBoxOGLfeedbackspu-x86_LIBS = $(VBOX_LIB_OGL_CRUTIL_X86) \
654 $(PATH_STAGE_LIB)/additions/VBoxOGLspuload-x86$(VBOX_SUFF_LIB) \
655 $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate-x86$(VBOX_SUFF_LIB)
656VBoxOGLfeedbackspu-x86_DEFS = $(VBoxOGLfeedbackspu_DEFS) VBOX_WDDM_WOW64
657endif
658
659#
660# Generate files for VBoxOGLfeedbackspu.
661#
662$(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 $$@)
663 $(call MSG_GENERATE,python,$@,$<)
664 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
665
666$(VBOX_PATH_CROGL_GENFILES)/feedbackspu_state.c: $(addprefix $(PATH_SUB_CURRENT)/feedback/,feedback_state.py feedback_state_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
667 $(call MSG_GENERATE,python,$@,$<)
668 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
669
670$(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 $$@)
671 $(call MSG_GENERATE,python,$@,$<)
672 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
673
674VBoxEGL_TEMPLATE = VBOXCROGLR3GUESTDLL
675VBoxEGL_SOURCES = egl.c
676ifndef VBOX_USE_SYSTEM_GL_HEADERS
677 VBoxEGL_INCS = $(VBOX_PATH_X11_ROOT)/mesa-11.0.7
678endif
679VBoxEGL_LIBS = $(VBOX_LIB_OGL) # $(VBOX_LIB_IPRT_GUEST_R3_SHARED)
680VBoxEGL_SONAME.linux = libEGL.so.1
681
682include $(FILE_KBUILD_SUB_FOOTER)
683
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