VirtualBox

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

Last change on this file since 15707 was 15532, checked in by vboxsync, 16 years ago

crOpenGL: export to OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 11.3 KB
Line 
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
23SUB_DEPTH = ../../../..
24
25include $(KBUILD_PATH)/subheader.kmk
26
27ifndef 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
33endif
34
35GLAPI_PATH := $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/glapi_parser
36
37if1of ($(KBUILD_HOST), win)
38 export PYTHONPATH := $(GLAPI_PATH);$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer;$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
39else
40 export PYTHONPATH := $(GLAPI_PATH):$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer:$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
41endif
42APIFILES := $(GLAPI_PATH)/apiutil.py $(GLAPI_PATH)/APIspec.txt
43
44VBOXCROGL_GENFILES := VBoxOGLgen
45
46PATH_VBOXCROGL_GENFILES := $(PATH_OBJ)/$(VBOXCROGL_GENFILES)
47PATH_VBOXCROGL_HOST_GENFILES := $(PATH_TARGET)/$(VBOXCROGL_GENFILES)
48PATH_VBOXCROGL_INCLUDE := $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/include
49
50VBOX_OPENGL_HEADERS = gl.h glu.h
51VBOX_PATH_MACOSX_OPENGL = $(PATH_OBJ)/VBoxOGL/GL
52
53DLLS += VBoxSharedCrOpenGL
54DLLS += VBoxOGLrenderspu
55LIBRARIES += VBoxOGLcrserverlib
56LIBRARIES += 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 ##
65TEMPLATE_VBOXOGLR3HOST = VBox OpenGL Host Libraries
66TEMPLATE_VBOXOGLR3HOST_EXTENDS = VBOXR3NP
67TEMPLATE_VBOXOGLR3HOST_DEFS = $(TEMPLATE_VBOXR3NP_DEFS) CHROMIUM_THREADSAFE VBOX_WITH_HGCM UNPACKS
68TEMPLATE_VBOXOGLR3HOST_DEFS.win = $(TEMPLATE_VBOXOGLR3HOST_DEFS) _WIN32_WINNT=0x0500 WINDOWS=1
69TEMPLATE_VBOXOGLR3HOST_DEFS.linux = $(TEMPLATE_VBOXOGLR3HOST_DEFS) Linux
70TEMPLATE_VBOXOGLR3HOST_DEFS.solaris = $(TEMPLATE_VBOXOGLR3HOST_DEFS) SunOS
71TEMPLATE_VBOXOGLR3HOST_DEFS.darwin = $(TEMPLATE_VBOXOGLR3HOST_DEFS) DARWIN GL_GLEXT_LEGACY
72TEMPLATE_VBOXOGLR3HOST_INCS = $(PATH_VBOXCROGL_INCLUDE) $(PATH_VBOXCROGL_GENFILES)
73TEMPLATE_VBOXOGLR3HOST_DEPS.darwin = $(addprefix $(VBOX_PATH_MACOSX_OPENGL)/,$(VBOX_OPENGL_HEADERS))
74TEMPLATE_VBOXOGLR3HOST_INCS.darwin = $(VBOX_PATH_MACOSX_OPENGL)/..
75TEMPLATE_VBOXOGLR3HOST_BLDDIRS.darwin = $(VBOX_PATH_MACOSX_OPENGL)
76TEMPLATE_VBOXOGLR3HOST_LDFLAGS.linux = -Wl,--no-as-needed
77TEMPLATE_VBOXOGLR3HOST_LDFLAGS.darwin = -framework Carbon -framework OpenGL -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
78TEMPLATE_VBOXOGLR3HOST_BLDDIRS = $(PATH_VBOXCROGL_HOST_GENFILES)/
79
80#
81# VBoxSharedCrOpenGL
82#
83
84VBoxSharedCrOpenGL_TEMPLATE = VBOXOGLR3HOST
85VBoxSharedCrOpenGL_INCS := \
86 $(PATH_SUB_CURRENT) \
87 $(PATH_VBoxSVC)
88VBoxSharedCrOpenGL_INCS.win += \
89 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \
90 $(VBOX_PATH_SDK)/bindings/mscom/include \
91 $(PATH_VBoxCOM)
92ifdef 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
96endif
97VBoxSharedCrOpenGL_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedCrOpenGL.dylib
98VBoxSharedCrOpenGL_SOURCES += crserver/crservice.cpp
99VBoxSharedCrOpenGL_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)
109if1of ($(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)
119endif
120VBoxSharedCrOpenGL_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
141GEN_C_FILES := server_dispatch.c \
142 server_retval.c \
143 server_get.c \
144 server_simpleget.c
145GEN_C_FILES := $(addprefix $(PATH_VBOXCROGL_HOST_GENFILES)/, $(GEN_C_FILES))
146
147GEN_H_FILES := server_dispatch.h
148GEN_H_FILES := $(addprefix $(PATH_VBOXCROGL_HOST_GENFILES)/, $(GEN_H_FILES))
149
150NORMAL_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
175NORMAL_C_FILES := $(addprefix crserverlib/, $(NORMAL_C_FILES))
176
177VBoxOGLcrserverlib_TEMPLATE = VBOXOGLR3HOST
178VBoxOGLcrserverlib_INCS := \
179 $(PATH_SUB_CURRENT)/crserverlib \
180 $(PATH_VBOXCROGL_HOST_GENFILES)
181VBoxOGLcrserverlib_INTERMEDIATES = $(PATH_VBOXCROGL_GENFILES)/spu_dispatch_table.h
182VBoxOGLcrserverlib_SOURCES := $(NORMAL_C_FILES) $(GEN_C_FILES)
183#VBoxOGLcrserverlib_SOURCES.win = crserverlib.def
184VBoxOGLcrserverlib_DEPS := \
185 $(GEN_H_FILES) \
186 $(PATH_VBOXCROGL_GENFILES)/state/cr_currentpointers.h \
187 $(PATH_VBOXCROGL_GENFILES)/state/cr_statefuncs.h
188VBoxOGLcrserverlib_CLEAN := $(GEN_C_FILES) $(GEN_H_FILES)
189VBoxOGLcrserverlib_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)
195if1of ($(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)
202endif
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
214GEN_C_FILES := unpack.c
215GEN_C_FILES := $(addprefix $(PATH_VBOXCROGL_HOST_GENFILES)/, $(GEN_C_FILES))
216
217GEN_H_FILES := unpack_extend.h
218GEN_H_FILES := $(addprefix $(PATH_VBOXCROGL_HOST_GENFILES)/, $(GEN_H_FILES))
219
220NORMAL_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
244NORMAL_C_FILES := $(addsuffix .c, $(NORMAL_FILES))
245NORMAL_C_FILES := $(addprefix unpacker/, $(NORMAL_C_FILES))
246
247VBoxOGLcrunpacker_TEMPLATE = VBOXOGLR3HOST
248VBoxOGLcrunpacker_INCS := \
249 $(PATH_SUB_CURRENT)/unpacker \
250 $(PATH_VBOXCROGL_HOST_GENFILES)
251VBoxOGLcrunpacker_INTERMEDIATES = \
252 $(PATH_VBOXCROGL_GENFILES)/spu_dispatch_table.h \
253 $(PATH_VBOXCROGL_GENFILES)/cr_opcodes.h
254VBoxOGLcrunpacker_SOURCES := $(NORMAL_C_FILES) $(GEN_C_FILES)
255#VBoxOGLcrunpacker_SOURCES.win = unpack.def
256VBoxOGLcrunpacker_DEPS := $(GEN_H_FILES)
257VBoxOGLcrunpacker_CLEAN := $(GEN_C_FILES) $(GEN_H_FILES)
258VBoxOGLcrunpacker_LIBS.win = \
259 $(PATH_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
260 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
261 $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB)
262if1of ($(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)
267endif
268
269#
270# VBoxOGLrenderspu
271#
272
273VBoxOGLrenderspu_TEMPLATE = VBOXOGLR3HOST
274VBoxOGLrenderspu_LIBS += $(LIB_RUNTIME)
275VBoxOGLrenderspu_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLrenderspu.dylib
276VBoxOGLrenderspu_SOURCES := \
277 render/renderspu.c \
278 render/renderspu_config.c \
279 render/renderspu_init.c
280VBoxOGLrenderspu_SOURCES.win = render/renderspu_wgl.c render/render.def
281VBoxOGLrenderspu_SOURCES.linux = render/renderspu_glx.c
282VBoxOGLrenderspu_SOURCES.solaris = render/renderspu_glx.c
283VBoxOGLrenderspu_SOURCES.darwin = render/renderspu_agl.c
284VBoxOGLrenderspu_LIBS.win = \
285 $(PATH_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
286 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB)
287
288if1of ($(KBUILD_TARGET), linux solaris darwin)
289 VBoxOGLrenderspu_LIBS += \
290 $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL) \
291 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB)
292endif
293if1of ($(KBUILD_TARGET), linux solaris)
294 VBoxOGLrenderspu_LIBPATH += $(VBOX_LIBPATH_X11)
295 VBoxOGLrenderspu_LIBS += \
296 Xmu X11 Xext
297endif
298
299include $(KBUILD_PATH)/subfooter.kmk
300
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