VirtualBox

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

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

darwin build fix.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 11.4 KB
Line 
1# $Id: Makefile.kmk 16285 2009-01-27 23:19:03Z vboxsync $
2## @file
3# Sub-Makefile for the VirtualBox HGCM Service.
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
22SUB_DEPTH = ../../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25
26#
27# Target lists.
28#
29DLLS += VBoxSharedCrOpenGL VBoxOGLrenderspu
30LIBRARIES += VBoxOGLcrserverlib VBoxOGLcrunpacker
31BLDDIRS += \
32 $(VBOX_PATH_CROGL_GENFILES)/
33
34
35#
36# Globals
37#
38if1of ($(KBUILD_HOST), os2 win)
39 VBOX_CROGL_HOST_PYTHONPATH := $(VBOX_PATH_CROGL_GLAPI);$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer;$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
40else
41 VBOX_CROGL_HOST_PYTHONPATH := $(VBOX_PATH_CROGL_GLAPI):$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer:$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
42endif
43
44
45#
46# The VBOXOGLR3HOST template.
47#
48## @todo r=bird: Most of the keywords are overridden here... check each and why.
49TEMPLATE_VBOXOGLR3HOST = VBox OpenGL Host Libraries
50TEMPLATE_VBOXOGLR3HOST_EXTENDS = VBOXR3NP
51TEMPLATE_VBOXOGLR3HOST_DEFS = $(TEMPLATE_VBOXR3NP_DEFS) CHROMIUM_THREADSAFE VBOX_WITH_HGCM UNPACKS
52TEMPLATE_VBOXOGLR3HOST_DEFS.win = _WIN32_WINNT=0x0500 WINDOWS=1
53TEMPLATE_VBOXOGLR3HOST_DEFS.linux = Linux
54TEMPLATE_VBOXOGLR3HOST_DEFS.solaris = SunOS
55TEMPLATE_VBOXOGLR3HOST_DEFS.darwin = DARWIN GL_GLEXT_LEGACY
56TEMPLATE_VBOXOGLR3HOST_SDKS.darwin += $(VBOXR3NP_SDKS.darwin) DARWIN-OPENGL
57TEMPLATE_VBOXOGLR3HOST_INCS = \
58 $(VBOX_PATH_CROGL_INCLUDE) \
59 $(VBOX_PATH_CROGL_GENFILES)
60TEMPLATE_VBOXOGLR3HOST_LDFLAGS.linux = -Wl,--no-as-needed
61TEMPLATE_VBOXOGLR3HOST_LDFLAGS.darwin = -framework Carbon -framework OpenGL -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
62
63
64ifeq ($(KBUILD_TARGET),darwin)
65 #
66 # We have to symlink the system headers of OpenGl cause they have some
67 # different directory hierarchy on Mac OS X (no /GL sub directory).
68 #
69 # See Config.kmk for the global variables.
70 #
71 INSTALLS += DarwinOpenGLHdrs
72 DarwinOpenGLHdrs_INST = $(VBOX_DARWIN_OPENGL_INST)
73 DarwinOpenGLHdrs_SYMLINKS = \
74 $(foreach hdr, $(VBOX_DARWIN_OPENGL_HEADERS),\
75 $(hdr)=>$(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/$(hdr))
76endif # darwin
77
78#
79# VBoxSharedCrOpenGL
80#
81VBoxSharedCrOpenGL_TEMPLATE = VBOXOGLR3HOST
82ifdef VBOX_WITH_XPCOM
83 VBoxSharedCrOpenGL_DEFS = VBOX_WITH_XPCOM
84 VBoxSharedCrOpenGL_INTERMEDIATES = \
85 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
86endif
87VBoxSharedCrOpenGL_INCS.win = \
88 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \
89 $(VBOX_PATH_SDK)/bindings/mscom/include \
90 $(PATH_VBoxCOM)
91VBoxSharedCrOpenGL_INCS = \
92 . \
93 $(PATH_VBoxSVC)
94ifdef VBOX_WITH_XPCOM
95 VBoxSharedCrOpenGL_INCS += \
96 $(VBOX_XPCOM_INCS)
97endif
98VBoxSharedCrOpenGL_SOURCES = \
99 crserver/crservice.cpp
100VBoxSharedCrOpenGL_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedCrOpenGL.dylib
101VBoxSharedCrOpenGL_LIBS.darwin = \
102 $(LIB_REM)
103ifeq ($(KBUILD_TARGET),win)
104VBoxSharedCrOpenGL_LIBS = \
105 $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
106 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
107 $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \
108 $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
109 $(PATH_OBJ)/VBoxOGLrenderspu/VBoxOGLrenderspu$(VBOX_SUFF_LIB) \
110 $(PATH_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \
111 $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
112 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_SUFF_LIB)
113else
114 VBoxSharedCrOpenGL_LIBS += \
115 $(PATH_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \
116 $(PATH_BIN)/VBoxOGLrenderspu$(VBOX_SUFF_DLL) \
117 $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
118 $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
119 $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \
120 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
121 $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
122endif
123VBoxSharedCrOpenGL_LIBS += \
124 $(LIB_RUNTIME) \
125 $(LIB_VMM)
126
127
128#
129# VBoxOGLcrserverlib
130#
131VBoxOGLcrserverlib_TEMPLATE = VBOXOGLR3HOST
132VBoxOGLcrserverlib_INCS = \
133 crserverlib
134VBoxOGLcrserverlib_INTERMEDIATES = \
135 $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \
136 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h \
137 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
138 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
139VBoxOGLcrserverlib_SOURCES := \
140 crserverlib/server_main.c \
141 crserverlib/server_boundsinfo.c \
142 crserverlib/server_bufferobject.c \
143 crserverlib/server_clear.c \
144 crserverlib/server_clip.c \
145 crserverlib/server_config.c \
146 crserverlib/server_context.c \
147 crserverlib/server_gentextures.c \
148 crserverlib/server_getmap.c \
149 crserverlib/server_getstring.c \
150 crserverlib/server_getpointer.c \
151 crserverlib/server_getpixelmap.c \
152 crserverlib/server_getteximage.c \
153 crserverlib/server_lists.c \
154 crserverlib/server_misc.c \
155 crserverlib/server_occlude.c \
156 crserverlib/server_papi.c \
157 crserverlib/server_projmatrix.c \
158 crserverlib/server_readpixels.c \
159 crserverlib/server_stream.c \
160 crserverlib/server_tiles.c \
161 crserverlib/server_viewport.c \
162 crserverlib/server_window.c \
163 crserverlib/server_winpos.c \
164 crserverlib/server_writeback.c \
165 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
166 $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
167 $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
168 $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c
169VBoxOGLcrserverlib_CLEAN = \
170 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
171 $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
172 $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
173 $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c \
174 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h
175ifeq ($(KBUILD_HOST),win)
176 VBoxOGLcrserverlib_LIBS = \
177 $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
178 $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
179 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
180 $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
181 $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB)
182else
183 VBoxOGLcrserverlib_LIBS = \
184 $(PATH_BIN)/VBoxOGLhostcrpacker$(VBOX_SUFF_DLL) \
185 $(PATH_BIN)/VBoxOGLhostspuload$(VBOX_SUFF_DLL) \
186 $(PATH_BIN)/VBoxOGLcrunpacker$(VBOX_SUFF_DLL) \
187 $(PATH_BIN)/VBoxOGLhostcrstate$(VBOX_SUFF_DLL) \
188 $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
189endif
190
191#
192# Generate files for VBoxOGLcrserverlib
193#
194$(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch_header.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
195 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
196
197$(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
198 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
199
200$(VBOX_PATH_CROGL_GENFILES)/server_retval.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_retval.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
201 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
202
203$(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 $$@)
204 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
205
206$(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_simpleget.py get_sizes.py) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
207 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
208
209
210#
211# VBoxOGLcrunpacker
212#
213VBoxOGLcrunpacker_TEMPLATE = VBOXOGLR3HOST
214VBoxOGLcrunpacker_INCS = \
215 unpacker
216VBoxOGLcrunpacker_INTERMEDIATES = \
217 $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \
218 $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
219 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h
220VBoxOGLcrunpacker_SOURCES = \
221 unpacker/unpack_arrays.c \
222 unpacker/unpack_bounds.c \
223 unpacker/unpack_bufferobject.c \
224 unpacker/unpack_calllists.c \
225 unpacker/unpack_clipplane.c \
226 unpacker/unpack_context.c \
227 unpacker/unpack_drawpixels.c \
228 unpacker/unpack_fence.c \
229 unpacker/unpack_fog.c \
230 unpacker/unpack_lights.c \
231 unpacker/unpack_map.c \
232 unpacker/unpack_materials.c \
233 unpacker/unpack_matrices.c \
234 unpacker/unpack_misc.c \
235 unpacker/unpack_pixelmap.c \
236 unpacker/unpack_point.c \
237 unpacker/unpack_program.c \
238 unpacker/unpack_readpixels.c \
239 unpacker/unpack_regcombiner.c \
240 unpacker/unpack_stipple.c \
241 unpacker/unpack_texture.c \
242 unpacker/unpack_writeback.c \
243 unpacker/unpack_visibleregion.c \
244 $(VBOX_PATH_CROGL_GENFILES)/unpack.c
245VBoxOGLcrunpacker_CLEAN = \
246 $(VBOX_PATH_CROGL_GENFILES)/unpack.c \
247 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h
248ifeq ($(KBUILD_TARGET),win)
249 VBoxOGLcrunpacker_LIBS = \
250 $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
251 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
252 $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB)
253else
254 VBoxOGLcrunpacker_LIBS = \
255 $(PATH_BIN)/VBoxOGLhostcrpacker$(VBOX_SUFF_DLL) \
256 $(PATH_BIN)/VBoxOGLhostspuload$(VBOX_SUFF_DLL) \
257 $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
258endif
259
260#
261# Generate files for VBoxOGLcrunpacker.
262#
263$(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 $$@)
264 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
265
266$(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h: $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack_extend.py unpacker_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
267 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
268
269
270#
271# VBoxOGLrenderspu
272#
273VBoxOGLrenderspu_TEMPLATE = VBOXOGLR3HOST
274VBoxOGLrenderspu_INTERMEDIATES = \
275 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
276 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
277VBoxOGLrenderspu_SOURCES = \
278 render/renderspu.c \
279 render/renderspu_config.c \
280 render/renderspu_init.c
281VBoxOGLrenderspu_SOURCES.win = render/renderspu_wgl.c render/render.def
282VBoxOGLrenderspu_SOURCES.linux = render/renderspu_glx.c
283VBoxOGLrenderspu_SOURCES.solaris = render/renderspu_glx.c
284VBoxOGLrenderspu_SOURCES.darwin = render/renderspu_agl.c
285
286VBoxOGLrenderspu_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLrenderspu.dylib
287ifeq ($(KBUILD_TARGET),win)
288 VBoxOGLrenderspu_LIBS += \
289 $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
290 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB)
291else
292 VBoxOGLrenderspu_LIBS += \
293 $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL) \
294 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB)
295endif
296VBoxOGLrenderspu_LIBS += \
297 $(LIB_RUNTIME)
298if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # the X11 gang
299 VBoxOGLrenderspu_LIBS += \
300 Xmu \
301 X11 \
302 Xext
303 VBoxOGLrenderspu_LIBPATH = \
304 $(VBOX_LIBPATH_X11)
305endif
306
307include $(KBUILD_PATH)/subfooter.kmk
308
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