VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/Makefile.kmk@ 62484

Last change on this file since 62484 was 60765, checked in by vboxsync, 9 years ago

API: stop using ATL and use a vastly smaller lookalike instead, plus a lot of cleanups

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 15.8 KB
Line 
1# $Id: Makefile.kmk 60765 2016-04-29 14:26:58Z vboxsync $
2## @file
3# Sub-Makefile for the Shared OpenGL Host Service.
4#
5
6#
7# Copyright (C) 2008-2016 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21
22#
23# Target lists.
24#
25ifdef VBOX_WITH_MAIN
26DLLS += VBoxSharedCrOpenGL VBoxOGLrenderspu
27LIBRARIES += VBoxOGLcrserverlib VBoxOGLcrunpacker
28BLDDIRS += \
29 $(VBOX_PATH_CROGL_GENFILES)/
30endif
31
32ifdef VBOX_WITH_CR_DISPLAY_LISTS
33 LIBRARIES += VBoxOGLcrdlm
34 DLLS += VBoxOGLexpandospu
35endif # VBOX_WITH_CR_DISPLAY_LISTS
36
37ifeq ($(KBUILD_TARGET),darwin)
38 #
39 # We have to symlink the system headers of OpenGl cause they have some
40 # different directory hierarchy on Mac OS X (no /GL sub directory).
41 #
42 # See Config.kmk for the global variables.
43 #
44 INSTALLS += DarwinOpenGLHdrs
45 DarwinOpenGLHdrs_INST = $(VBOX_DARWIN_OPENGL_INST)
46 DarwinOpenGLHdrs_SYMLINKS = \
47 $(foreach hdr, $(VBOX_DARWIN_OPENGL_HEADERS),\
48 $(hdr)=>$(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/$(hdr))
49endif # darwin
50
51#
52# VBoxSharedCrOpenGL
53#
54VBoxSharedCrOpenGL_TEMPLATE = VBOXCROGLR3HOSTDLL
55ifdef VBOX_WITH_XPCOM
56 VBoxSharedCrOpenGL_DEFS = VBOX_WITH_XPCOM
57 VBoxSharedCrOpenGL_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar $(VBOX_GCC_std)
58endif
59VBoxSharedCrOpenGL_INTERMEDIATES = \
60 $(TEMPLATE_VBOXMAINEXE_INTERMEDIATES)
61VBoxSharedCrOpenGL_INCS.win = \
62 $(VBOX_PATH_SDK)/bindings/mscom/include
63ifdef VBOX_WITH_XPCOM
64VBoxSharedCrOpenGL_INCS += \
65 $(VBOX_XPCOM_INCS)
66endif
67VBoxSharedCrOpenGL_SOURCES = \
68 crserver/crservice.cpp
69VBoxSharedCrOpenGL_SOURCES.win = \
70 crserver/VBoxSharedCrOpenGL.rc
71VBoxSharedCrOpenGL_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedCrOpenGL.dylib
72VBoxSharedCrOpenGL_LIBS = \
73 $(PATH_STAGE_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \
74 $(PATH_STAGE_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \
75 $(PATH_STAGE_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
76 $(PATH_STAGE_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
77 $(PATH_STAGE_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
78 $(VBOX_LIB_OGL_HOSTCRUTIL) \
79 $(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
80 $(LIB_RUNTIME) \
81 $(LIB_VMM)
82VBoxSharedCrOpenGL_LIBS.darwin = \
83 $(LIB_REM)
84ifeq ($(KBUILD_TARGET),win)
85 VBoxSharedCrOpenGL_LIBS += \
86 $(PATH_OBJ)/VBoxOGLrenderspu/VBoxOGLrenderspu$(VBOX_SUFF_LIB)
87else
88 VBoxSharedCrOpenGL_LIBS += \
89 $(PATH_STAGE_BIN)/VBoxOGLrenderspu$(VBOX_SUFF_DLL)
90endif
91ifdef VBOX_WITH_XPCOM
92 VBoxSharedCrOpenGL_LIBS += \
93 $(LIB_XPCOM)
94endif
95ifdef VBOX_WITH_CRHGSMI
96VBoxSharedCrOpenGL_DEFS += VBOX_WITH_CRHGSMI
97endif
98ifdef VBOX_WITH_CR_DISPLAY_LISTS
99VBoxSharedCrOpenGL_LIBS += $(PATH_STAGE_LIB)/VBoxOGLcrdlm$(VBOX_SUFF_LIB)
100endif
101
102#
103# VBoxOGLcrserverlib
104#
105VBoxOGLcrserverlib_TEMPLATE = VBOXCROGLR3HOSTLIB
106VBoxOGLcrserverlib_INCS = \
107 . \
108 crserverlib
109VBoxOGLcrserverlib_INTERMEDIATES = \
110 $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \
111 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h \
112 $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
113 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
114 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
115
116ifdef VBOX_WITH_CR_DISPLAY_LISTS
117VBoxOGLcrserverlib_INTERMEDIATES += $(VBOX_PATH_CROGL_GENFILES)/cr_dlm.h
118endif
119
120VBoxOGLcrserverlib_SOURCES := \
121 crserverlib/server_main.c \
122 crserverlib/server_boundsinfo.c \
123 crserverlib/server_bufferobject.c \
124 crserverlib/server_clear.c \
125 crserverlib/server_clip.c \
126 crserverlib/server_config.c \
127 crserverlib/server_context.c \
128 crserverlib/server_gentextures.c \
129 crserverlib/server_getmap.c \
130 crserverlib/server_getstring.c \
131 crserverlib/server_getpointer.c \
132 crserverlib/server_getpixelmap.c \
133 crserverlib/server_getteximage.c \
134 crserverlib/server_lists.c \
135 crserverlib/server_misc.c \
136 crserverlib/server_occlude.c \
137 crserverlib/server_papi.c \
138 crserverlib/server_projmatrix.c \
139 crserverlib/server_readpixels.c \
140 crserverlib/server_stream.c \
141 crserverlib/server_viewport.c \
142 crserverlib/server_window.c \
143 crserverlib/server_winpos.c \
144 crserverlib/server_writeback.c \
145 crserverlib/server_getshaders.c \
146 crserverlib/server_framebuffer.c \
147 crserverlib/server_glsl.c \
148 crserverlib/server_muralfbo.cpp \
149 crserverlib/server_texture.c \
150 crserverlib/presenter/server_presenter.cpp \
151 crserverlib/presenter/display_base.cpp \
152 crserverlib/presenter/display_composite.cpp \
153 crserverlib/presenter/window.cpp \
154 crserverlib/presenter/display_window.cpp \
155 crserverlib/presenter/display_window_rootvr.cpp \
156 crserverlib/presenter/display_vrdp.cpp \
157 crserverlib/server_rpw.cpp \
158 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
159 $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
160 $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
161 $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c
162VBoxOGLcrserverlib_CLEAN = \
163 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
164 $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
165 $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
166 $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c \
167 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h
168ifdef VBOX_WITH_CR_DISPLAY_LISTS
169VBoxOGLcrserverlib_DEFS += VBOX_WITH_CR_DISPLAY_LISTS
170endif
171ifdef VBOXCR_LOGFPS
172VBoxOGLcrserverlib_DEFS += VBOXCR_LOGFPS
173endif
174ifdef VBOX_WITH_CRHGSMI
175VBoxOGLcrserverlib_DEFS += ifdef VBOX_WITH_CRHGSMI
176endif
177ifdef VBOX_WITH_CRDUMPER
178VBoxOGLcrserverlib_DEFS += VBOX_WITH_CRDUMPER
179endif
180ifdef VBOX_WITH_CRSERVER_DUMPER
181VBoxOGLcrserverlib_DEFS += VBOX_WITH_CRSERVER_DUMPER
182endif
183
184
185#
186# Generate files for VBoxOGLcrserverlib
187#
188$(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch_header.py server_special) $(VBOX_CROGL_API_FILES) $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/state_tracker/state_special | $$(dir $$@)
189 $(call MSG_GENERATE,python,$@,$<)
190 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
191
192$(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch.py server_special) $(VBOX_CROGL_API_FILES) $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/state_tracker/state_special | $$(dir $$@)
193 $(call MSG_GENERATE,python,$@,$<)
194 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
195
196$(VBOX_PATH_CROGL_GENFILES)/server_retval.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_retval.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
197 $(call MSG_GENERATE,python,$@,$<)
198 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
199
200$(VBOX_PATH_CROGL_GENFILES)/server_get.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_get.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
201 $(call MSG_GENERATE,python,$@,$<)
202 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
203
204$(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_simpleget.py get_sizes.py) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
205 $(call MSG_GENERATE,python,$@,$<)
206 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
207
208
209#
210# VBoxOGLcrunpacker
211#
212VBoxOGLcrunpacker_TEMPLATE = VBOXCROGLR3HOSTLIB
213VBoxOGLcrunpacker_INCS = \
214 unpacker
215VBoxOGLcrunpacker_INTERMEDIATES = \
216 $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \
217 $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
218 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h \
219 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
220 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
221VBoxOGLcrunpacker_SOURCES = \
222 unpacker/unpack_arrays.c \
223 unpacker/unpack_bounds.c \
224 unpacker/unpack_bufferobject.c \
225 unpacker/unpack_calllists.c \
226 unpacker/unpack_clipplane.c \
227 unpacker/unpack_context.c \
228 unpacker/unpack_drawpixels.c \
229 unpacker/unpack_fence.c \
230 unpacker/unpack_fog.c \
231 unpacker/unpack_lights.c \
232 unpacker/unpack_map.c \
233 unpacker/unpack_materials.c \
234 unpacker/unpack_matrices.c \
235 unpacker/unpack_misc.c \
236 unpacker/unpack_pixelmap.c \
237 unpacker/unpack_point.c \
238 unpacker/unpack_program.c \
239 unpacker/unpack_readpixels.c \
240 unpacker/unpack_regcombiner.c \
241 unpacker/unpack_stipple.c \
242 unpacker/unpack_texture.c \
243 unpacker/unpack_writeback.c \
244 unpacker/unpack_visibleregion.c \
245 unpacker/unpack_shaders.c \
246 unpacker/unpack_framebuffer.c \
247 $(VBOX_PATH_CROGL_GENFILES)/unpack.c
248VBoxOGLcrunpacker_CLEAN = \
249 $(VBOX_PATH_CROGL_GENFILES)/unpack.c \
250 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h
251
252#
253# Generate files for VBoxOGLcrunpacker.
254#
255$(VBOX_PATH_CROGL_GENFILES)/unpack.c: \
256 $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack.py unpacker_special) \
257 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h \
258 $(VBOX_CROGL_API_FILES) \
259 | $$(dir $$@)
260 $(call MSG_GENERATE,python,$@,$<)
261 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
262
263$(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h: \
264 $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack_extend.py unpacker_special) \
265 $(VBOX_CROGL_API_FILES) \
266 | $$(dir $$@)
267 $(call MSG_GENERATE,python,$@,$<)
268 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
269
270
271ifdef VBOX_WITH_CR_DISPLAY_LISTS
272#
273# VBoxOGLcrdlm
274#
275
276VBoxOGLcrdlm_TEMPLATE = VBOXCROGLR3HOSTLIB
277VBoxOGLcrdlm_INCS = \
278 dlm
279VBoxOGLcrdlm_INTERMEDIATES = \
280 $(VBOX_PATH_CROGL_GENFILES)/cr_dlm.h \
281 $(VBOX_PATH_CROGL_GENFILES)/dlm_generated.h
282
283VBoxOGLcrdlm_SOURCES = \
284 dlm/dlm.c \
285 dlm/dlm_arrays.c \
286 dlm/dlm_state.c \
287 dlm/dlm_checklist.c \
288 dlm/dlm_error.c \
289 dlm/dlm_lists.c \
290 dlm/dlm_pointers.c \
291 $(VBOX_PATH_CROGL_GENFILES)/dlm_generated.c
292
293VBoxOGLcrdlm_CLEAN = \
294 $(VBOX_PATH_CROGL_GENFILES)/dlm_generated.c \
295 $(VBOX_PATH_CROGL_GENFILES)/cr_dlm.h \
296 $(VBOX_PATH_CROGL_GENFILES)/dlm_generated.h
297#
298# Generate files for VBoxOGLcrdlm.
299#
300$(VBOX_PATH_CROGL_GENFILES)/cr_dlm.h: \
301 $(addprefix $(PATH_SUB_CURRENT)/dlm/, dlm_header.py) \
302 $(VBOX_CROGL_API_FILES) \
303 | $$(dir $$@)
304 $(call MSG_GENERATE,python,$@,$<)
305 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< header $(<D) $(VBOX_PATH_CROGL_GLAPI) > $@
306
307$(VBOX_PATH_CROGL_GENFILES)/dlm_generated.h: \
308 $(addprefix $(PATH_SUB_CURRENT)/dlm/, dlm_generated.py dlm_special) \
309 $(VBOX_PATH_CROGL_GENFILES)/cr_dlm.h \
310 $(VBOX_CROGL_API_FILES) \
311 | $$(dir $$@)
312 $(call MSG_GENERATE,python,$@,$<)
313 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< headers $(<D) $(VBOX_PATH_CROGL_GLAPI) > $@
314
315$(VBOX_PATH_CROGL_GENFILES)/dlm_generated.c: \
316 $(addprefix $(PATH_SUB_CURRENT)/dlm/, dlm_generated.py dlm_special) \
317 $(VBOX_PATH_CROGL_GENFILES)/dlm_generated.h \
318 $(VBOX_CROGL_API_FILES) \
319 | $$(dir $$@)
320 $(call MSG_GENERATE,python,$@,$<)
321 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< source $(<D) $(VBOX_PATH_CROGL_GLAPI) > $@
322
323
324#
325# VBoxOGLexpandospu
326#
327VBoxOGLexpandospu_TEMPLATE = VBOXCROGLR3HOSTDLL
328VBoxOGLexpandospu_INCS = \
329 expando
330VBoxOGLexpandospu_SOURCES = \
331 expando/expandospu.c \
332 expando/expandospu_config.c \
333 expando/expandospu_init.c \
334 $(VBOX_PATH_CROGL_GENFILES)/expando.c
335VBoxOGLexpandospu_CLEAN = \
336 $(VBOX_PATH_CROGL_GENFILES)/expando.c
337VBoxOGLexpandospu_CLEAN = \
338 $(VBOX_PATH_CROGL_GENFILES)/expando.c
339VBoxOGLexpandospu_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLexpandospu.dylib
340VBoxOGLexpandospu_LIBS = \
341 $(PATH_STAGE_LIB)/VBoxOGLcrdlm$(VBOX_SUFF_LIB) \
342 $(PATH_STAGE_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \
343 $(PATH_STAGE_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
344 $(VBOX_LIB_OGL_HOSTCRUTIL) \
345 $(LIB_RUNTIME) \
346 $(LIB_VMM)
347#
348# Generate files for VBoxOGLexpandospu.
349#
350$(VBOX_PATH_CROGL_GENFILES)/expando.c: \
351 $(addprefix $(PATH_SUB_CURRENT)/expando/, expando.py expando_special) \
352 $(VBOX_CROGL_API_FILES) \
353 | $$(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) $(<D) > $@
356endif
357
358
359#
360# VBoxOGLrenderspu
361#
362VBoxOGLrenderspu_TEMPLATE = VBOXCROGLR3HOSTDLL
363VBoxOGLrenderspu_INTERMEDIATES = \
364 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
365 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
366VBoxOGLrenderspu_SOURCES = \
367 render/renderspu.c \
368 render/renderspu_config.c \
369 render/renderspu_init.c
370VBoxOGLrenderspu_SOURCES.win = \
371 render/renderspu_wgl.c \
372 render/render.def \
373 render/VBoxOGLrenderspu.rc
374VBoxOGLrenderspu_SOURCES.linux = render/renderspu_glx.c
375VBoxOGLrenderspu_SOURCES.solaris = render/renderspu_glx.c
376VBoxOGLrenderspu_SOURCES.freebsd = render/renderspu_glx.c
377VBoxOGLrenderspu_OBJCFLAGS.darwin = -Wno-shadow
378VBoxOGLrenderspu_SOURCES.darwin = \
379 OpenGLTest/OpenGLTestDarwin.cpp \
380 render/renderspu_cocoa.c \
381 render/renderspu_cocoa_helper.m
382ifdef VBOX_WITH_CRHGSMI
383VBoxOGLrenderspu_DEFS += VBOX_WITH_CRHGSMI
384endif
385ifdef VBOX_WITH_VDMA
386VBoxOGLrenderspu_DEFS += VBOX_WITH_VDMA
387endif
388VBoxOGLrenderspu_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLrenderspu.dylib -framework IOKit
389VBoxOGLrenderspu_LIBS = \
390 $(PATH_STAGE_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
391 $(VBOX_LIB_OGL_HOSTCRUTIL) \
392 $(LIB_RUNTIME)
393if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # the X11 gang
394 VBoxOGLrenderspu_LIBS += \
395 Xmu \
396 X11 \
397 Xext
398 VBoxOGLrenderspu_LIBPATH = \
399 $(VBOX_LIBPATH_X11)
400endif
401
402LIBRARIES += VBoxOGLTest
403VBoxOGLTest_TEMPLATE = VBOXR3
404ifneq ($(KBUILD_TARGET),darwin)
405 VBoxOGLTest_SOURCES = OpenGLTest/OpenGLTest.cpp
406endif
407VBoxOGLTest_SOURCES.darwin = OpenGLTest/OpenGLTestDarwin.cpp
408
409#
410# VBoxTestOGL - OpenGL support test app.
411# Note! Doesn't link with VBOX_WITH_DEBUG_VCC_CRT defined because it uses Qt.
412#
413if ( defined(VBOX_WITH_QTGUI) \
414 && (defined(VBOX_WITH_CROGL) || defined(VBOX_WITH_VIDEOHWACCEL)) \
415 && !defined(VBOX_WITH_DEBUG_VCC_CRT))
416 ifneq ($(KBUILD_TARGET),darwin)
417 ifdef VBOX_WITH_VIDEOHWACCEL
418 ifndef VBOX_WITH_QTGUI_V5
419 USES += qt4
420 else # VBOX_WITH_QTGUI_V5
421 USES += qt5
422 endif # VBOX_WITH_QTGUI_V5
423 endif
424 PROGRAMS += VBoxTestOGL
425 VBoxTestOGL_TEMPLATE = $(if $(VBOX_WITH_VIDEOHWACCEL),$(if $(VBOX_WITH_HARDENING),VBOXQTGUI,VBOXQTGUIEXE),VBOXMAINEXE)
426 VBoxTestOGL_SOURCES = OpenGLTest/OpenGLTestApp.cpp
427 VBoxTestOGL_SOURCES.win = OpenGLTest/VBoxTestOGL.rc
428 VBoxTestOGL_LIBS = \
429 $(if $(VBOX_WITH_CROGL), \
430 $(PATH_STAGE_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
431 $(VBOX_LIB_OGL_HOSTCRUTIL),) \
432 $(if $(VBOX_WITH_VIDEOHWACCEL), $(PATH_STAGE_LIB)/VBoxOGL2D$(VBOX_SUFF_LIB),) \
433 $(LIB_RUNTIME)
434 VBoxTestOGL_DEFS += \
435 VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\" \
436 $(if $(VBOX_WITH_CROGL), VBOX_WITH_CROGL,) \
437 $(if $(VBOX_WITH_VIDEOHWACCEL), VBOX_WITH_VIDEOHWACCEL,) \
438 $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",)
439 ifdef VBOX_WITH_VIDEOHWACCEL
440 VBoxTestOGL_QT_MODULES += Core Gui OpenGL
441 ifdef VBOX_WITH_QTGUI_V5
442 # Qt5 requires additional modules:
443 VBoxTestOGL_QT_MODULES += Widgets
444 VBoxTestOGL_LIBS.linux += xcb
445 VBoxTestOGL_LIBS.solaris += xcb
446 VBoxTestOGL_LIBS.freebsd += xcb
447 endif # VBOX_WITH_QTGUI_V5
448 VBoxTestOGL_LDFLAGS.darwin += -framework OpenGL
449 VBoxTestOGL_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
450 if1of ($(KBUILD_TARGET), solaris linux freebsd)
451 # must come after VBoxOGL2D, therefore don't set the arch-specific LIBS variable here!
452 VBoxTestOGL_LIBS += GL
453 endif
454 endif
455 VBoxTestOGL_LDFLAGS.win = /SUBSYSTEM:windows
456 endif
457endif
458
459include $(FILE_KBUILD_SUB_FOOTER)
460
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