1 | # $Id: Makefile.kmk 15532 2008-12-15 18:53:11Z 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 | ifndef VBOX_BLD_PYTHON
|
---|
28 | if1of ($(KBUILD_HOST), win)
|
---|
29 | VBOX_BLD_PYTHON := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS)/win.x86/python/v*/python$(HOSTSUFF_EXE))) python-not-found.exe)
|
---|
30 | else
|
---|
31 | VBOX_BLD_PYTHON := python$(HOSTSUFF_EXE)
|
---|
32 | endif
|
---|
33 | endif
|
---|
34 |
|
---|
35 | GLAPI_PATH := $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/glapi_parser
|
---|
36 |
|
---|
37 | if1of ($(KBUILD_HOST), win)
|
---|
38 | export PYTHONPATH := $(GLAPI_PATH);$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer;$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
|
---|
39 | else
|
---|
40 | export PYTHONPATH := $(GLAPI_PATH):$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer:$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
|
---|
41 | endif
|
---|
42 | APIFILES := $(GLAPI_PATH)/apiutil.py $(GLAPI_PATH)/APIspec.txt
|
---|
43 |
|
---|
44 | VBOXCROGL_GENFILES := VBoxOGLgen
|
---|
45 |
|
---|
46 | PATH_VBOXCROGL_GENFILES := $(PATH_OBJ)/$(VBOXCROGL_GENFILES)
|
---|
47 | PATH_VBOXCROGL_HOST_GENFILES := $(PATH_TARGET)/$(VBOXCROGL_GENFILES)
|
---|
48 | PATH_VBOXCROGL_INCLUDE := $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/include
|
---|
49 |
|
---|
50 | VBOX_OPENGL_HEADERS = gl.h glu.h
|
---|
51 | VBOX_PATH_MACOSX_OPENGL = $(PATH_OBJ)/VBoxOGL/GL
|
---|
52 |
|
---|
53 | DLLS += VBoxSharedCrOpenGL
|
---|
54 | DLLS += VBoxOGLrenderspu
|
---|
55 | LIBRARIES += VBoxOGLcrserverlib
|
---|
56 | LIBRARIES += VBoxOGLcrunpacker
|
---|
57 |
|
---|
58 | # We have to symlink the system headers of OpenGl cause they have some
|
---|
59 | # different directory hierarchy on Mac OS X (no /GL sub directory).
|
---|
60 | $(addprefix $(VBOX_PATH_MACOSX_OPENGL)/,$(VBOX_OPENGL_HEADERS)): \
|
---|
61 | $(VBOX_PATH_MACOSX_OPENGL)/%: $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/% | $$(dir $$@)
|
---|
62 | $(LN) -s $< $@
|
---|
63 |
|
---|
64 | ## VBOXOGLR3HOST ##
|
---|
65 | TEMPLATE_VBOXOGLR3HOST = VBox OpenGL Host Libraries
|
---|
66 | TEMPLATE_VBOXOGLR3HOST_EXTENDS = VBOXR3NP
|
---|
67 | TEMPLATE_VBOXOGLR3HOST_DEFS = $(TEMPLATE_VBOXR3NP_DEFS) CHROMIUM_THREADSAFE VBOX_WITH_HGCM UNPACKS
|
---|
68 | TEMPLATE_VBOXOGLR3HOST_DEFS.win = $(TEMPLATE_VBOXOGLR3HOST_DEFS) _WIN32_WINNT=0x0500 WINDOWS=1
|
---|
69 | TEMPLATE_VBOXOGLR3HOST_DEFS.linux = $(TEMPLATE_VBOXOGLR3HOST_DEFS) Linux
|
---|
70 | TEMPLATE_VBOXOGLR3HOST_DEFS.solaris = $(TEMPLATE_VBOXOGLR3HOST_DEFS) SunOS
|
---|
71 | TEMPLATE_VBOXOGLR3HOST_DEFS.darwin = $(TEMPLATE_VBOXOGLR3HOST_DEFS) DARWIN GL_GLEXT_LEGACY
|
---|
72 | TEMPLATE_VBOXOGLR3HOST_INCS = $(PATH_VBOXCROGL_INCLUDE) $(PATH_VBOXCROGL_GENFILES)
|
---|
73 | TEMPLATE_VBOXOGLR3HOST_DEPS.darwin = $(addprefix $(VBOX_PATH_MACOSX_OPENGL)/,$(VBOX_OPENGL_HEADERS))
|
---|
74 | TEMPLATE_VBOXOGLR3HOST_INCS.darwin = $(VBOX_PATH_MACOSX_OPENGL)/..
|
---|
75 | TEMPLATE_VBOXOGLR3HOST_BLDDIRS.darwin = $(VBOX_PATH_MACOSX_OPENGL)
|
---|
76 | TEMPLATE_VBOXOGLR3HOST_LDFLAGS.linux = -Wl,--no-as-needed
|
---|
77 | TEMPLATE_VBOXOGLR3HOST_LDFLAGS.darwin = -framework Carbon -framework OpenGL -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
|
---|
78 | TEMPLATE_VBOXOGLR3HOST_BLDDIRS = $(PATH_VBOXCROGL_HOST_GENFILES)/
|
---|
79 |
|
---|
80 | #
|
---|
81 | # VBoxSharedCrOpenGL
|
---|
82 | #
|
---|
83 |
|
---|
84 | VBoxSharedCrOpenGL_TEMPLATE = VBOXOGLR3HOST
|
---|
85 | VBoxSharedCrOpenGL_INCS := \
|
---|
86 | $(PATH_SUB_CURRENT) \
|
---|
87 | $(PATH_VBoxSVC)
|
---|
88 | VBoxSharedCrOpenGL_INCS.win += \
|
---|
89 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \
|
---|
90 | $(VBOX_PATH_SDK)/bindings/mscom/include \
|
---|
91 | $(PATH_VBoxCOM)
|
---|
92 | ifdef VBOX_WITH_XPCOM
|
---|
93 | VBoxSharedCrOpenGL_DEFS += VBOX_WITH_XPCOM
|
---|
94 | VBoxSharedCrOpenGL_INCS += $(VBOX_XPCOM_INCS)
|
---|
95 | VBoxSharedCrOpenGL_INTERMEDIATES += $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
96 | endif
|
---|
97 | VBoxSharedCrOpenGL_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedCrOpenGL.dylib
|
---|
98 | VBoxSharedCrOpenGL_SOURCES += crserver/crservice.cpp
|
---|
99 | VBoxSharedCrOpenGL_LIBS.win = \
|
---|
100 | $(PATH_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
|
---|
101 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
|
---|
102 | $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \
|
---|
103 | $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
|
---|
104 | $(PATH_LIB)/VBoxOGLrenderspu$(VBOX_SUFF_LIB) \
|
---|
105 | $(PATH_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \
|
---|
106 | $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
|
---|
107 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_SUFF_LIB)\
|
---|
108 | $(LIB_RUNTIME) $(LIB_VMM)
|
---|
109 | if1of ($(KBUILD_TARGET), linux solaris darwin)
|
---|
110 | VBoxSharedCrOpenGL_LIBS += \
|
---|
111 | $(PATH_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \
|
---|
112 | $(PATH_BIN)/VBoxOGLrenderspu$(VBOX_SUFF_DLL) \
|
---|
113 | $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
|
---|
114 | $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
|
---|
115 | $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \
|
---|
116 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
|
---|
117 | $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL) \
|
---|
118 | $(LIB_RUNTIME) $(LIB_VMM)
|
---|
119 | endif
|
---|
120 | VBoxSharedCrOpenGL_LIBS.darwin += $(LIB_REM)
|
---|
121 |
|
---|
122 | #
|
---|
123 | # VBoxOGLcrserverlib
|
---|
124 | #
|
---|
125 |
|
---|
126 | $(PATH_VBOXCROGL_HOST_GENFILES)/server_dispatch.h: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch_header.py server_special) $(APIFILES) | $$(dir $$@)
|
---|
127 | $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $(<D) > $@
|
---|
128 |
|
---|
129 | $(PATH_VBOXCROGL_HOST_GENFILES)/server_dispatch.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch.py server_special) $(APIFILES) | $$(dir $$@)
|
---|
130 | $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $(<D) > $@
|
---|
131 |
|
---|
132 | $(PATH_VBOXCROGL_HOST_GENFILES)/server_retval.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_retval.py server_special) $(APIFILES) | $$(dir $$@)
|
---|
133 | $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $(<D) > $@
|
---|
134 |
|
---|
135 | $(PATH_VBOXCROGL_HOST_GENFILES)/server_get.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_get.py server_special get_components.py) $(APIFILES) | $$(dir $$@)
|
---|
136 | $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $(<D) > $@
|
---|
137 |
|
---|
138 | $(PATH_VBOXCROGL_HOST_GENFILES)/server_simpleget.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_simpleget.py get_sizes.py) $(APIFILES) | $$(dir $$@)
|
---|
139 | $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $(<D) > $@
|
---|
140 |
|
---|
141 | GEN_C_FILES := server_dispatch.c \
|
---|
142 | server_retval.c \
|
---|
143 | server_get.c \
|
---|
144 | server_simpleget.c
|
---|
145 | GEN_C_FILES := $(addprefix $(PATH_VBOXCROGL_HOST_GENFILES)/, $(GEN_C_FILES))
|
---|
146 |
|
---|
147 | GEN_H_FILES := server_dispatch.h
|
---|
148 | GEN_H_FILES := $(addprefix $(PATH_VBOXCROGL_HOST_GENFILES)/, $(GEN_H_FILES))
|
---|
149 |
|
---|
150 | NORMAL_C_FILES := server_main.c \
|
---|
151 | server_boundsinfo.c \
|
---|
152 | server_bufferobject.c \
|
---|
153 | server_clear.c \
|
---|
154 | server_clip.c \
|
---|
155 | server_config.c \
|
---|
156 | server_context.c \
|
---|
157 | server_gentextures.c \
|
---|
158 | server_getmap.c \
|
---|
159 | server_getstring.c \
|
---|
160 | server_getpointer.c \
|
---|
161 | server_getpixelmap.c \
|
---|
162 | server_getteximage.c \
|
---|
163 | server_lists.c \
|
---|
164 | server_misc.c \
|
---|
165 | server_occlude.c \
|
---|
166 | server_papi.c \
|
---|
167 | server_projmatrix.c \
|
---|
168 | server_readpixels.c \
|
---|
169 | server_stream.c \
|
---|
170 | server_tiles.c \
|
---|
171 | server_viewport.c \
|
---|
172 | server_window.c \
|
---|
173 | server_winpos.c \
|
---|
174 | server_writeback.c
|
---|
175 | NORMAL_C_FILES := $(addprefix crserverlib/, $(NORMAL_C_FILES))
|
---|
176 |
|
---|
177 | VBoxOGLcrserverlib_TEMPLATE = VBOXOGLR3HOST
|
---|
178 | VBoxOGLcrserverlib_INCS := \
|
---|
179 | $(PATH_SUB_CURRENT)/crserverlib \
|
---|
180 | $(PATH_VBOXCROGL_HOST_GENFILES)
|
---|
181 | VBoxOGLcrserverlib_INTERMEDIATES = $(PATH_VBOXCROGL_GENFILES)/spu_dispatch_table.h
|
---|
182 | VBoxOGLcrserverlib_SOURCES := $(NORMAL_C_FILES) $(GEN_C_FILES)
|
---|
183 | #VBoxOGLcrserverlib_SOURCES.win = crserverlib.def
|
---|
184 | VBoxOGLcrserverlib_DEPS := \
|
---|
185 | $(GEN_H_FILES) \
|
---|
186 | $(PATH_VBOXCROGL_GENFILES)/state/cr_currentpointers.h \
|
---|
187 | $(PATH_VBOXCROGL_GENFILES)/state/cr_statefuncs.h
|
---|
188 | VBoxOGLcrserverlib_CLEAN := $(GEN_C_FILES) $(GEN_H_FILES)
|
---|
189 | VBoxOGLcrserverlib_LIBS.win = \
|
---|
190 | $(PATH_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
|
---|
191 | $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
|
---|
192 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
|
---|
193 | $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
|
---|
194 | $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB)
|
---|
195 | if1of ($(KBUILD_TARGET), linux solaris darwin)
|
---|
196 | VBoxOGLcrserverlib_LIBS += \
|
---|
197 | $(PATH_BIN)/VBoxOGLhostcrpacker$(VBOX_SUFF_DLL) \
|
---|
198 | $(PATH_BIN)/VBoxOGLhostspuload$(VBOX_SUFF_DLL) \
|
---|
199 | $(PATH_BIN)/VBoxOGLcrunpacker$(VBOX_SUFF_DLL) \
|
---|
200 | $(PATH_BIN)/VBoxOGLhostcrstate$(VBOX_SUFF_DLL) \
|
---|
201 | $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
|
---|
202 | endif
|
---|
203 |
|
---|
204 | #
|
---|
205 | # VBoxOGLcrunpacker
|
---|
206 | #
|
---|
207 |
|
---|
208 | $(PATH_VBOXCROGL_HOST_GENFILES)/unpack.c: $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack.py unpacker_special) $(PATH_VBOXCROGL_HOST_GENFILES)/unpack_extend.h $(APIFILES) | $$(dir $$@)
|
---|
209 | $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $(<D) > $@
|
---|
210 |
|
---|
211 | $(PATH_VBOXCROGL_HOST_GENFILES)/unpack_extend.h: $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack_extend.py unpacker_special) $(APIFILES) | $$(dir $$@)
|
---|
212 | $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $(<D) > $@
|
---|
213 |
|
---|
214 | GEN_C_FILES := unpack.c
|
---|
215 | GEN_C_FILES := $(addprefix $(PATH_VBOXCROGL_HOST_GENFILES)/, $(GEN_C_FILES))
|
---|
216 |
|
---|
217 | GEN_H_FILES := unpack_extend.h
|
---|
218 | GEN_H_FILES := $(addprefix $(PATH_VBOXCROGL_HOST_GENFILES)/, $(GEN_H_FILES))
|
---|
219 |
|
---|
220 | NORMAL_FILES := \
|
---|
221 | unpack_arrays \
|
---|
222 | unpack_bounds \
|
---|
223 | unpack_bufferobject \
|
---|
224 | unpack_calllists \
|
---|
225 | unpack_clipplane \
|
---|
226 | unpack_context \
|
---|
227 | unpack_drawpixels \
|
---|
228 | unpack_fence \
|
---|
229 | unpack_fog \
|
---|
230 | unpack_lights \
|
---|
231 | unpack_map \
|
---|
232 | unpack_materials \
|
---|
233 | unpack_matrices \
|
---|
234 | unpack_misc \
|
---|
235 | unpack_pixelmap \
|
---|
236 | unpack_point \
|
---|
237 | unpack_program \
|
---|
238 | unpack_readpixels \
|
---|
239 | unpack_regcombiner \
|
---|
240 | unpack_stipple \
|
---|
241 | unpack_texture \
|
---|
242 | unpack_writeback \
|
---|
243 | unpack_visibleregion
|
---|
244 | NORMAL_C_FILES := $(addsuffix .c, $(NORMAL_FILES))
|
---|
245 | NORMAL_C_FILES := $(addprefix unpacker/, $(NORMAL_C_FILES))
|
---|
246 |
|
---|
247 | VBoxOGLcrunpacker_TEMPLATE = VBOXOGLR3HOST
|
---|
248 | VBoxOGLcrunpacker_INCS := \
|
---|
249 | $(PATH_SUB_CURRENT)/unpacker \
|
---|
250 | $(PATH_VBOXCROGL_HOST_GENFILES)
|
---|
251 | VBoxOGLcrunpacker_INTERMEDIATES = \
|
---|
252 | $(PATH_VBOXCROGL_GENFILES)/spu_dispatch_table.h \
|
---|
253 | $(PATH_VBOXCROGL_GENFILES)/cr_opcodes.h
|
---|
254 | VBoxOGLcrunpacker_SOURCES := $(NORMAL_C_FILES) $(GEN_C_FILES)
|
---|
255 | #VBoxOGLcrunpacker_SOURCES.win = unpack.def
|
---|
256 | VBoxOGLcrunpacker_DEPS := $(GEN_H_FILES)
|
---|
257 | VBoxOGLcrunpacker_CLEAN := $(GEN_C_FILES) $(GEN_H_FILES)
|
---|
258 | VBoxOGLcrunpacker_LIBS.win = \
|
---|
259 | $(PATH_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
|
---|
260 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
|
---|
261 | $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB)
|
---|
262 | if1of ($(KBUILD_TARGET), linux solaris darwin)
|
---|
263 | VBoxOGLcrunpacker_LIBS += \
|
---|
264 | $(PATH_BIN)/VBoxOGLhostcrpacker$(VBOX_SUFF_DLL) \
|
---|
265 | $(PATH_BIN)/VBoxOGLhostspuload$(VBOX_SUFF_DLL) \
|
---|
266 | $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
|
---|
267 | endif
|
---|
268 |
|
---|
269 | #
|
---|
270 | # VBoxOGLrenderspu
|
---|
271 | #
|
---|
272 |
|
---|
273 | VBoxOGLrenderspu_TEMPLATE = VBOXOGLR3HOST
|
---|
274 | VBoxOGLrenderspu_LIBS += $(LIB_RUNTIME)
|
---|
275 | VBoxOGLrenderspu_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLrenderspu.dylib
|
---|
276 | VBoxOGLrenderspu_SOURCES := \
|
---|
277 | render/renderspu.c \
|
---|
278 | render/renderspu_config.c \
|
---|
279 | render/renderspu_init.c
|
---|
280 | VBoxOGLrenderspu_SOURCES.win = render/renderspu_wgl.c render/render.def
|
---|
281 | VBoxOGLrenderspu_SOURCES.linux = render/renderspu_glx.c
|
---|
282 | VBoxOGLrenderspu_SOURCES.solaris = render/renderspu_glx.c
|
---|
283 | VBoxOGLrenderspu_SOURCES.darwin = render/renderspu_agl.c
|
---|
284 | VBoxOGLrenderspu_LIBS.win = \
|
---|
285 | $(PATH_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
|
---|
286 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB)
|
---|
287 |
|
---|
288 | if1of ($(KBUILD_TARGET), linux solaris darwin)
|
---|
289 | VBoxOGLrenderspu_LIBS += \
|
---|
290 | $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL) \
|
---|
291 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB)
|
---|
292 | endif
|
---|
293 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
294 | VBoxOGLrenderspu_LIBPATH += $(VBOX_LIBPATH_X11)
|
---|
295 | VBoxOGLrenderspu_LIBS += \
|
---|
296 | Xmu X11 Xext
|
---|
297 | endif
|
---|
298 |
|
---|
299 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
300 |
|
---|