1 | # $Id: Makefile.kmk 16243 2009-01-26 17:33:37Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the VirtualBox Windows Chromium OpenGL ICD.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2008 Sun Microsystems, Inc.
|
---|
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 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
18 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
19 | # additional information or have any questions.
|
---|
20 | #
|
---|
21 |
|
---|
22 |
|
---|
23 | SUB_DEPTH = ../../../..
|
---|
24 |
|
---|
25 | include $(KBUILD_PATH)/subheader.kmk
|
---|
26 |
|
---|
27 | if1of ($(KBUILD_HOST), win)
|
---|
28 | VBOX_CROGL_HOST_PYTHONPATH := $(VBOX_PATH_CROGL_GLAPI);$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer;$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
|
---|
29 | else
|
---|
30 | VBOX_CROGL_HOST_PYTHONPATH := $(VBOX_PATH_CROGL_GLAPI):$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer:$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
|
---|
31 | endif
|
---|
32 |
|
---|
33 | VBOX_OPENGL_HEADERS = gl.h glu.h
|
---|
34 | VBOX_PATH_MACOSX_OPENGL = $(PATH_OBJ)/VBoxOGL/GL
|
---|
35 |
|
---|
36 | DLLS += VBoxSharedCrOpenGL
|
---|
37 | DLLS += VBoxOGLrenderspu
|
---|
38 | LIBRARIES += VBoxOGLcrserverlib
|
---|
39 | LIBRARIES += VBoxOGLcrunpacker
|
---|
40 |
|
---|
41 | # We have to symlink the system headers of OpenGl cause they have some
|
---|
42 | # different directory hierarchy on Mac OS X (no /GL sub directory).
|
---|
43 | $(addprefix $(VBOX_PATH_MACOSX_OPENGL)/,$(VBOX_OPENGL_HEADERS)): \
|
---|
44 | $(VBOX_PATH_MACOSX_OPENGL)/%: $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/% | $$(dir $$@)
|
---|
45 | $(LN) -s $< $@
|
---|
46 |
|
---|
47 | ## VBOXOGLR3HOST ##
|
---|
48 | TEMPLATE_VBOXOGLR3HOST = VBox OpenGL Host Libraries
|
---|
49 | TEMPLATE_VBOXOGLR3HOST_EXTENDS = VBOXR3NP
|
---|
50 | TEMPLATE_VBOXOGLR3HOST_DEFS = $(TEMPLATE_VBOXR3NP_DEFS) CHROMIUM_THREADSAFE VBOX_WITH_HGCM UNPACKS
|
---|
51 | TEMPLATE_VBOXOGLR3HOST_DEFS.win = _WIN32_WINNT=0x0500 WINDOWS=1
|
---|
52 | TEMPLATE_VBOXOGLR3HOST_DEFS.linux = Linux
|
---|
53 | TEMPLATE_VBOXOGLR3HOST_DEFS.solaris = SunOS
|
---|
54 | TEMPLATE_VBOXOGLR3HOST_DEFS.darwin = DARWIN GL_GLEXT_LEGACY
|
---|
55 | TEMPLATE_VBOXOGLR3HOST_INCS = $(VBOX_PATH_CROGL_INCLUDE) $(VBOX_PATH_CROGL_GENFILES)
|
---|
56 | TEMPLATE_VBOXOGLR3HOST_DEPS.darwin = $(addprefix $(VBOX_PATH_MACOSX_OPENGL)/,$(VBOX_OPENGL_HEADERS))
|
---|
57 | TEMPLATE_VBOXOGLR3HOST_INCS.darwin = $(VBOX_PATH_MACOSX_OPENGL)/..
|
---|
58 | TEMPLATE_VBOXOGLR3HOST_BLDDIRS.darwin = $(VBOX_PATH_MACOSX_OPENGL)
|
---|
59 | TEMPLATE_VBOXOGLR3HOST_LDFLAGS.linux = -Wl,--no-as-needed
|
---|
60 | TEMPLATE_VBOXOGLR3HOST_LDFLAGS.darwin = -framework Carbon -framework OpenGL -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
|
---|
61 | TEMPLATE_VBOXOGLR3HOST_BLDDIRS = $(VBOX_PATH_CROGL_GENFILES)/
|
---|
62 |
|
---|
63 | #
|
---|
64 | # VBoxSharedCrOpenGL
|
---|
65 | #
|
---|
66 |
|
---|
67 | VBoxSharedCrOpenGL_TEMPLATE = VBOXOGLR3HOST
|
---|
68 | VBoxSharedCrOpenGL_INCS := \
|
---|
69 | $(PATH_SUB_CURRENT) \
|
---|
70 | $(PATH_VBoxSVC)
|
---|
71 | VBoxSharedCrOpenGL_INCS.win += \
|
---|
72 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \
|
---|
73 | $(VBOX_PATH_SDK)/bindings/mscom/include \
|
---|
74 | $(PATH_VBoxCOM)
|
---|
75 | ifdef VBOX_WITH_XPCOM
|
---|
76 | VBoxSharedCrOpenGL_DEFS += VBOX_WITH_XPCOM
|
---|
77 | VBoxSharedCrOpenGL_INCS += $(VBOX_XPCOM_INCS)
|
---|
78 | VBoxSharedCrOpenGL_INTERMEDIATES += $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
79 | endif
|
---|
80 | VBoxSharedCrOpenGL_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedCrOpenGL.dylib
|
---|
81 | VBoxSharedCrOpenGL_SOURCES += crserver/crservice.cpp
|
---|
82 | VBoxSharedCrOpenGL_LIBS.win = \
|
---|
83 | $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
|
---|
84 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
|
---|
85 | $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \
|
---|
86 | $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
|
---|
87 | $(PATH_OBJ)/VBoxOGLrenderspu/VBoxOGLrenderspu$(VBOX_SUFF_LIB) \
|
---|
88 | $(PATH_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \
|
---|
89 | $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
|
---|
90 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_SUFF_LIB)\
|
---|
91 | $(LIB_RUNTIME) $(LIB_VMM)
|
---|
92 | if1of ($(KBUILD_TARGET), linux solaris darwin)
|
---|
93 | VBoxSharedCrOpenGL_LIBS += \
|
---|
94 | $(PATH_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \
|
---|
95 | $(PATH_BIN)/VBoxOGLrenderspu$(VBOX_SUFF_DLL) \
|
---|
96 | $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
|
---|
97 | $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
|
---|
98 | $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \
|
---|
99 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
|
---|
100 | $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL) \
|
---|
101 | $(LIB_RUNTIME) $(LIB_VMM)
|
---|
102 | endif
|
---|
103 | VBoxSharedCrOpenGL_LIBS.darwin += $(LIB_REM)
|
---|
104 |
|
---|
105 | #
|
---|
106 | # VBoxOGLcrserverlib
|
---|
107 | #
|
---|
108 |
|
---|
109 | VBoxOGLcrserverlib_TEMPLATE = VBOXOGLR3HOST
|
---|
110 | VBoxOGLcrserverlib_INCS := $(PATH_SUB_CURRENT)/crserverlib
|
---|
111 | VBoxOGLcrserverlib_INTERMEDIATES = $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h
|
---|
112 | VBoxOGLcrserverlib_SOURCES := \
|
---|
113 | crserverlib/server_main.c \
|
---|
114 | crserverlib/server_boundsinfo.c \
|
---|
115 | crserverlib/server_bufferobject.c \
|
---|
116 | crserverlib/server_clear.c \
|
---|
117 | crserverlib/server_clip.c \
|
---|
118 | crserverlib/server_config.c \
|
---|
119 | crserverlib/server_context.c \
|
---|
120 | crserverlib/server_gentextures.c \
|
---|
121 | crserverlib/server_getmap.c \
|
---|
122 | crserverlib/server_getstring.c \
|
---|
123 | crserverlib/server_getpointer.c \
|
---|
124 | crserverlib/server_getpixelmap.c \
|
---|
125 | crserverlib/server_getteximage.c \
|
---|
126 | crserverlib/server_lists.c \
|
---|
127 | crserverlib/server_misc.c \
|
---|
128 | crserverlib/server_occlude.c \
|
---|
129 | crserverlib/server_papi.c \
|
---|
130 | crserverlib/server_projmatrix.c \
|
---|
131 | crserverlib/server_readpixels.c \
|
---|
132 | crserverlib/server_stream.c \
|
---|
133 | crserverlib/server_tiles.c \
|
---|
134 | crserverlib/server_viewport.c \
|
---|
135 | crserverlib/server_window.c \
|
---|
136 | crserverlib/server_winpos.c \
|
---|
137 | crserverlib/server_writeback.c \
|
---|
138 | $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
|
---|
139 | $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
|
---|
140 | $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
|
---|
141 | $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c
|
---|
142 | VBoxOGLcrserverlib_INTERMEDIATES := \
|
---|
143 | $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h \
|
---|
144 | $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
|
---|
145 | $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
|
---|
146 | VBoxOGLcrserverlib_CLEAN := \
|
---|
147 | $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
|
---|
148 | $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
|
---|
149 | $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
|
---|
150 | $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c \
|
---|
151 | $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h
|
---|
152 | VBoxOGLcrserverlib_LIBS.win = \
|
---|
153 | $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
|
---|
154 | $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
|
---|
155 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
|
---|
156 | $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
|
---|
157 | $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB)
|
---|
158 | if1of ($(KBUILD_TARGET), linux solaris darwin)
|
---|
159 | VBoxOGLcrserverlib_LIBS += \
|
---|
160 | $(PATH_BIN)/VBoxOGLhostcrpacker$(VBOX_SUFF_DLL) \
|
---|
161 | $(PATH_BIN)/VBoxOGLhostspuload$(VBOX_SUFF_DLL) \
|
---|
162 | $(PATH_BIN)/VBoxOGLcrunpacker$(VBOX_SUFF_DLL) \
|
---|
163 | $(PATH_BIN)/VBoxOGLhostcrstate$(VBOX_SUFF_DLL) \
|
---|
164 | $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
|
---|
165 | endif
|
---|
166 |
|
---|
167 | $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch_header.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
|
---|
168 | $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
169 |
|
---|
170 | $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
|
---|
171 | $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
172 |
|
---|
173 | $(VBOX_PATH_CROGL_GENFILES)/server_retval.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_retval.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
|
---|
174 | $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
175 |
|
---|
176 | $(VBOX_PATH_CROGL_GENFILES)/server_get.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_get.py server_special get_components.py) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
|
---|
177 | $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
178 |
|
---|
179 | $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_simpleget.py get_sizes.py) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
|
---|
180 | $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
181 |
|
---|
182 | #
|
---|
183 | # VBoxOGLcrunpacker
|
---|
184 | #
|
---|
185 |
|
---|
186 | VBoxOGLcrunpacker_TEMPLATE = VBOXOGLR3HOST
|
---|
187 | VBoxOGLcrunpacker_INCS := $(PATH_SUB_CURRENT)/unpacker
|
---|
188 | VBoxOGLcrunpacker_INTERMEDIATES = \
|
---|
189 | $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \
|
---|
190 | $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
|
---|
191 | $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h
|
---|
192 | VBoxOGLcrunpacker_SOURCES := \
|
---|
193 | unpacker/unpack_arrays.c \
|
---|
194 | unpacker/unpack_bounds.c \
|
---|
195 | unpacker/unpack_bufferobject.c \
|
---|
196 | unpacker/unpack_calllists.c \
|
---|
197 | unpacker/unpack_clipplane.c \
|
---|
198 | unpacker/unpack_context.c \
|
---|
199 | unpacker/unpack_drawpixels.c \
|
---|
200 | unpacker/unpack_fence.c \
|
---|
201 | unpacker/unpack_fog.c \
|
---|
202 | unpacker/unpack_lights.c \
|
---|
203 | unpacker/unpack_map.c \
|
---|
204 | unpacker/unpack_materials.c \
|
---|
205 | unpacker/unpack_matrices.c \
|
---|
206 | unpacker/unpack_misc.c \
|
---|
207 | unpacker/unpack_pixelmap.c \
|
---|
208 | unpacker/unpack_point.c \
|
---|
209 | unpacker/unpack_program.c \
|
---|
210 | unpacker/unpack_readpixels.c \
|
---|
211 | unpacker/unpack_regcombiner.c \
|
---|
212 | unpacker/unpack_stipple.c \
|
---|
213 | unpacker/unpack_texture.c \
|
---|
214 | unpacker/unpack_writeback.c \
|
---|
215 | unpacker/unpack_visibleregion.c \
|
---|
216 | $(VBOX_PATH_CROGL_GENFILES)/unpack.c
|
---|
217 | VBoxOGLcrunpacker_CLEAN := \
|
---|
218 | $(VBOX_PATH_CROGL_GENFILES)/unpack.c \
|
---|
219 | $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h
|
---|
220 | VBoxOGLcrunpacker_LIBS.win = \
|
---|
221 | $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
|
---|
222 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
|
---|
223 | $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB)
|
---|
224 | if1of ($(KBUILD_TARGET), linux solaris darwin)
|
---|
225 | VBoxOGLcrunpacker_LIBS += \
|
---|
226 | $(PATH_BIN)/VBoxOGLhostcrpacker$(VBOX_SUFF_DLL) \
|
---|
227 | $(PATH_BIN)/VBoxOGLhostspuload$(VBOX_SUFF_DLL) \
|
---|
228 | $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
|
---|
229 | endif
|
---|
230 |
|
---|
231 | $(VBOX_PATH_CROGL_GENFILES)/unpack.c: $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack.py unpacker_special) $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h $(VBOX_CROGL_API_FILES) | $$(dir $$@)
|
---|
232 | $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
233 |
|
---|
234 | $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h: $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack_extend.py unpacker_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
|
---|
235 | $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
236 |
|
---|
237 | #
|
---|
238 | # VBoxOGLrenderspu
|
---|
239 | #
|
---|
240 |
|
---|
241 | VBoxOGLrenderspu_TEMPLATE = VBOXOGLR3HOST
|
---|
242 | VBoxOGLrenderspu_LIBS += $(LIB_RUNTIME)
|
---|
243 | VBoxOGLrenderspu_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLrenderspu.dylib
|
---|
244 | VBoxOGLrenderspu_SOURCES := \
|
---|
245 | render/renderspu.c \
|
---|
246 | render/renderspu_config.c \
|
---|
247 | render/renderspu_init.c
|
---|
248 | VBoxOGLrenderspu_SOURCES.win = render/renderspu_wgl.c render/render.def
|
---|
249 | VBoxOGLrenderspu_SOURCES.linux = render/renderspu_glx.c
|
---|
250 | VBoxOGLrenderspu_SOURCES.solaris = render/renderspu_glx.c
|
---|
251 | VBoxOGLrenderspu_SOURCES.darwin = render/renderspu_agl.c
|
---|
252 | VBoxOGLrenderspu_LIBS.win = \
|
---|
253 | $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
|
---|
254 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB)
|
---|
255 | if1of ($(KBUILD_TARGET), linux solaris darwin)
|
---|
256 | VBoxOGLrenderspu_LIBS += \
|
---|
257 | $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL) \
|
---|
258 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB)
|
---|
259 | endif
|
---|
260 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
261 | VBoxOGLrenderspu_LIBPATH += $(VBOX_LIBPATH_X11)
|
---|
262 | VBoxOGLrenderspu_LIBS += \
|
---|
263 | Xmu X11 Xext
|
---|
264 | endif
|
---|
265 |
|
---|
266 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
267 |
|
---|