VirtualBox

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

Last change on this file since 53400 was 53145, checked in by vboxsync, 10 years ago

Host 3D: Chromium server: Presentation framework: move classes into separate files for better code reading (to be continued).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 12.2 KB
Line 
1# $Id: Makefile.kmk 53145 2014-10-26 16:13:36Z vboxsync $
2## @file
3# Sub-Makefile for the Shared OpenGL Host Service.
4#
5
6#
7# Copyright (C) 2008-2014 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
32ifeq ($(KBUILD_TARGET),darwin)
33 #
34 # We have to symlink the system headers of OpenGl cause they have some
35 # different directory hierarchy on Mac OS X (no /GL sub directory).
36 #
37 # See Config.kmk for the global variables.
38 #
39 INSTALLS += DarwinOpenGLHdrs
40 DarwinOpenGLHdrs_INST = $(VBOX_DARWIN_OPENGL_INST)
41 DarwinOpenGLHdrs_SYMLINKS = \
42 $(foreach hdr, $(VBOX_DARWIN_OPENGL_HEADERS),\
43 $(hdr)=>$(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/$(hdr))
44endif # darwin
45
46#
47# VBoxSharedCrOpenGL
48#
49VBoxSharedCrOpenGL_TEMPLATE = VBOXCROGLR3HOSTDLL
50ifdef VBOX_WITH_XPCOM
51 VBoxSharedCrOpenGL_DEFS = VBOX_WITH_XPCOM
52 VBoxSharedCrOpenGL_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar $(VBOX_GCC_std)
53endif
54VBoxSharedCrOpenGL_INTERMEDIATES = \
55 $(TEMPLATE_VBOXMAINEXE_INTERMEDIATES)
56VBoxSharedCrOpenGL_INCS.win = \
57 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \
58 $(VBOX_PATH_SDK)/bindings/mscom/include
59ifdef VBOX_WITH_XPCOM
60VBoxSharedCrOpenGL_INCS += \
61 $(VBOX_XPCOM_INCS)
62endif
63VBoxSharedCrOpenGL_SOURCES = \
64 crserver/crservice.cpp
65VBoxSharedCrOpenGL_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedCrOpenGL.dylib
66VBoxSharedCrOpenGL_LIBS = \
67 $(PATH_STAGE_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \
68 $(PATH_STAGE_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \
69 $(PATH_STAGE_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
70 $(PATH_STAGE_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
71 $(PATH_STAGE_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
72 $(VBOX_LIB_OGL_HOSTCRUTIL) \
73 $(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
74 $(LIB_RUNTIME) \
75 $(LIB_VMM)
76VBoxSharedCrOpenGL_LIBS.darwin = \
77 $(LIB_REM)
78ifeq ($(KBUILD_TARGET),win)
79 VBoxSharedCrOpenGL_LIBS += \
80 $(PATH_OBJ)/VBoxOGLrenderspu/VBoxOGLrenderspu$(VBOX_SUFF_LIB) \
81 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_SUFF_LIB)
82else
83 VBoxSharedCrOpenGL_LIBS += \
84 $(PATH_STAGE_BIN)/VBoxOGLrenderspu$(VBOX_SUFF_DLL)
85endif
86ifdef VBOX_WITH_XPCOM
87 VBoxSharedCrOpenGL_LIBS += \
88 $(LIB_XPCOM)
89endif
90ifdef VBOX_WITH_CRHGSMI
91VBoxSharedCrOpenGL_DEFS += VBOX_WITH_CRHGSMI
92endif
93
94#
95# VBoxOGLcrserverlib
96#
97VBoxOGLcrserverlib_TEMPLATE = VBOXCROGLR3HOSTLIB
98VBoxOGLcrserverlib_INCS = \
99 . \
100 crserverlib
101VBoxOGLcrserverlib_INTERMEDIATES = \
102 $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \
103 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h \
104 $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
105 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
106 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
107VBoxOGLcrserverlib_SOURCES := \
108 crserverlib/server_main.c \
109 crserverlib/server_boundsinfo.c \
110 crserverlib/server_bufferobject.c \
111 crserverlib/server_clear.c \
112 crserverlib/server_clip.c \
113 crserverlib/server_config.c \
114 crserverlib/server_context.c \
115 crserverlib/server_gentextures.c \
116 crserverlib/server_getmap.c \
117 crserverlib/server_getstring.c \
118 crserverlib/server_getpointer.c \
119 crserverlib/server_getpixelmap.c \
120 crserverlib/server_getteximage.c \
121 crserverlib/server_lists.c \
122 crserverlib/server_misc.c \
123 crserverlib/server_occlude.c \
124 crserverlib/server_papi.c \
125 crserverlib/server_projmatrix.c \
126 crserverlib/server_readpixels.c \
127 crserverlib/server_stream.c \
128 crserverlib/server_viewport.c \
129 crserverlib/server_window.c \
130 crserverlib/server_winpos.c \
131 crserverlib/server_writeback.c \
132 crserverlib/server_getshaders.c \
133 crserverlib/server_framebuffer.c \
134 crserverlib/server_glsl.c \
135 crserverlib/server_muralfbo.cpp \
136 crserverlib/server_texture.c \
137 crserverlib/presenter/server_presenter.cpp \
138 crserverlib/presenter/display_base.cpp \
139 crserverlib/presenter/display_composite.cpp \
140 crserverlib/presenter/window.cpp \
141 crserverlib/presenter/display_window.cpp \
142 crserverlib/presenter/display_window_rootvr.cpp \
143 crserverlib/presenter/display_vrdp.cpp \
144 crserverlib/server_rpw.cpp \
145 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
146 $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
147 $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
148 $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c
149VBoxOGLcrserverlib_CLEAN = \
150 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
151 $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
152 $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
153 $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c \
154 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h
155ifdef VBOXCR_LOGFPS
156VBoxOGLcrserverlib_DEFS += VBOXCR_LOGFPS
157endif
158ifdef VBOX_WITH_CRHGSMI
159VBoxOGLcrserverlib_DEFS += ifdef VBOX_WITH_CRHGSMI
160endif
161ifdef VBOX_WITH_CRDUMPER
162VBoxOGLcrserverlib_DEFS += VBOX_WITH_CRDUMPER
163endif
164ifdef VBOX_WITH_CRSERVER_DUMPER
165VBoxOGLcrserverlib_DEFS += VBOX_WITH_CRSERVER_DUMPER
166endif
167
168
169#
170# Generate files for VBoxOGLcrserverlib
171#
172$(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 $$@)
173 $(call MSG_GENERATE,python,$@,$<)
174 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
175
176$(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 $$@)
177 $(call MSG_GENERATE,python,$@,$<)
178 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
179
180$(VBOX_PATH_CROGL_GENFILES)/server_retval.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_retval.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
181 $(call MSG_GENERATE,python,$@,$<)
182 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
183
184$(VBOX_PATH_CROGL_GENFILES)/server_get.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_get.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
185 $(call MSG_GENERATE,python,$@,$<)
186 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
187
188$(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_simpleget.py get_sizes.py) $(VBOX_CROGL_API_FILES) | $$(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
193#
194# VBoxOGLcrunpacker
195#
196VBoxOGLcrunpacker_TEMPLATE = VBOXCROGLR3HOSTLIB
197VBoxOGLcrunpacker_INCS = \
198 unpacker
199VBoxOGLcrunpacker_INTERMEDIATES = \
200 $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \
201 $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
202 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h \
203 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
204 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
205VBoxOGLcrunpacker_SOURCES = \
206 unpacker/unpack_arrays.c \
207 unpacker/unpack_bounds.c \
208 unpacker/unpack_bufferobject.c \
209 unpacker/unpack_calllists.c \
210 unpacker/unpack_clipplane.c \
211 unpacker/unpack_context.c \
212 unpacker/unpack_drawpixels.c \
213 unpacker/unpack_fence.c \
214 unpacker/unpack_fog.c \
215 unpacker/unpack_lights.c \
216 unpacker/unpack_map.c \
217 unpacker/unpack_materials.c \
218 unpacker/unpack_matrices.c \
219 unpacker/unpack_misc.c \
220 unpacker/unpack_pixelmap.c \
221 unpacker/unpack_point.c \
222 unpacker/unpack_program.c \
223 unpacker/unpack_readpixels.c \
224 unpacker/unpack_regcombiner.c \
225 unpacker/unpack_stipple.c \
226 unpacker/unpack_texture.c \
227 unpacker/unpack_writeback.c \
228 unpacker/unpack_visibleregion.c \
229 unpacker/unpack_shaders.c \
230 unpacker/unpack_framebuffer.c \
231 $(VBOX_PATH_CROGL_GENFILES)/unpack.c
232VBoxOGLcrunpacker_CLEAN = \
233 $(VBOX_PATH_CROGL_GENFILES)/unpack.c \
234 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h
235
236#
237# Generate files for VBoxOGLcrunpacker.
238#
239$(VBOX_PATH_CROGL_GENFILES)/unpack.c: \
240 $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack.py unpacker_special) \
241 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h \
242 $(VBOX_CROGL_API_FILES) \
243 | $$(dir $$@)
244 $(call MSG_GENERATE,python,$@,$<)
245 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
246
247$(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h: \
248 $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack_extend.py unpacker_special) \
249 $(VBOX_CROGL_API_FILES) \
250 | $$(dir $$@)
251 $(call MSG_GENERATE,python,$@,$<)
252 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
253
254
255#
256# VBoxOGLrenderspu
257#
258VBoxOGLrenderspu_TEMPLATE = VBOXCROGLR3HOSTDLL
259VBoxOGLrenderspu_INTERMEDIATES = \
260 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
261 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
262VBoxOGLrenderspu_SOURCES = \
263 render/renderspu.c \
264 render/renderspu_config.c \
265 render/renderspu_init.c
266VBoxOGLrenderspu_SOURCES.win = render/renderspu_wgl.c render/render.def
267VBoxOGLrenderspu_SOURCES.linux = render/renderspu_glx.c
268VBoxOGLrenderspu_SOURCES.solaris = render/renderspu_glx.c
269VBoxOGLrenderspu_SOURCES.freebsd = render/renderspu_glx.c
270VBoxOGLrenderspu_OBJCFLAGS.darwin = -Wno-shadow
271VBoxOGLrenderspu_SOURCES.darwin = \
272 OpenGLTest/OpenGLTestDarwin.cpp \
273 render/renderspu_cocoa.c \
274 render/renderspu_cocoa_helper.m
275ifdef VBOX_WITH_CRHGSMI
276VBoxOGLrenderspu_DEFS += VBOX_WITH_CRHGSMI
277endif
278ifdef VBOX_WITH_VDMA
279VBoxOGLrenderspu_DEFS += VBOX_WITH_VDMA
280endif
281VBoxOGLrenderspu_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLrenderspu.dylib -framework IOKit
282VBoxOGLrenderspu_LIBS = \
283 $(PATH_STAGE_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
284 $(VBOX_LIB_OGL_HOSTCRUTIL) \
285 $(LIB_RUNTIME)
286if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # the X11 gang
287 VBoxOGLrenderspu_LIBS += \
288 Xmu \
289 X11 \
290 Xext
291 VBoxOGLrenderspu_LIBPATH = \
292 $(VBOX_LIBPATH_X11)
293endif
294
295LIBRARIES += VBoxOGLTest
296VBoxOGLTest_TEMPLATE = VBOXR3
297ifneq ($(KBUILD_TARGET),darwin)
298 VBoxOGLTest_SOURCES = OpenGLTest/OpenGLTest.cpp
299endif
300VBoxOGLTest_SOURCES.darwin = OpenGLTest/OpenGLTestDarwin.cpp
301
302#
303# VBoxTestOGL - OpenGL support test app.
304# Note! Doesn't link with VBOX_WITH_DEBUG_VCC_CRT defined because it uses Qt.
305#
306if ( defined(VBOX_WITH_QTGUI) \
307 && (defined(VBOX_WITH_CROGL) || defined(VBOX_WITH_VIDEOHWACCEL)) \
308 && !defined(VBOX_WITH_DEBUG_VCC_CRT))
309 ifneq ($(KBUILD_TARGET),darwin)
310 ifdef VBOX_WITH_VIDEOHWACCEL
311 USES += qt4
312 endif
313 PROGRAMS += VBoxTestOGL
314 VBoxTestOGL_TEMPLATE = $(if $(VBOX_WITH_VIDEOHWACCEL),$(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE),VBOXMAINEXE)
315 VBoxTestOGL_SOURCES = OpenGLTest/OpenGLTestApp.cpp
316 VBoxTestOGL_LIBS = \
317 $(if $(VBOX_WITH_CROGL), \
318 $(PATH_STAGE_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
319 $(VBOX_LIB_OGL_HOSTCRUTIL),) \
320 $(if $(VBOX_WITH_VIDEOHWACCEL), $(PATH_STAGE_LIB)/VBoxOGL2D$(VBOX_SUFF_LIB),) \
321 $(LIB_RUNTIME)
322 VBoxTestOGL_DEFS += \
323 VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\" \
324 $(if $(VBOX_WITH_CROGL), VBOX_WITH_CROGL,) \
325 $(if $(VBOX_WITH_VIDEOHWACCEL), VBOX_WITH_VIDEOHWACCEL,) \
326 $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",)
327 ifdef VBOX_WITH_VIDEOHWACCEL
328 VBoxTestOGL_QT_MODULES += Core Gui OpenGL
329 VBoxTestOGL_LDFLAGS.darwin += -framework OpenGL
330 VBoxTestOGL_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
331 if1of ($(KBUILD_TARGET), solaris linux freebsd)
332 # must come after VBoxOGL2D, therefore don't set the arch-specific LIBS variable here!
333 VBoxTestOGL_LIBS += GL
334 endif
335 endif
336 VBoxTestOGL_LDFLAGS.win = /SUBSYSTEM:windows
337 endif
338endif
339
340include $(FILE_KBUILD_SUB_FOOTER)
341
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