VirtualBox

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

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

SharedOpenGL: Missing dependency (windows).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 11.4 KB
Line 
1# $Id: Makefile.kmk 16685 2009-02-11 16:51:07Z 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#
48TEMPLATE_VBOXOGLR3HOST = VBox OpenGL Host Libraries
49TEMPLATE_VBOXOGLR3HOST_EXTENDS = VBOXR3NP
50TEMPLATE_VBOXOGLR3HOST_EXTENDS_BY = prepending
51TEMPLATE_VBOXOGLR3HOST_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 += 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 = \
62 -framework Carbon \
63 -framework OpenGL \
64 -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
65
66
67ifeq ($(KBUILD_TARGET),darwin)
68 #
69 # We have to symlink the system headers of OpenGl cause they have some
70 # different directory hierarchy on Mac OS X (no /GL sub directory).
71 #
72 # See Config.kmk for the global variables.
73 #
74 INSTALLS += DarwinOpenGLHdrs
75 DarwinOpenGLHdrs_INST = $(VBOX_DARWIN_OPENGL_INST)
76 DarwinOpenGLHdrs_SYMLINKS = \
77 $(foreach hdr, $(VBOX_DARWIN_OPENGL_HEADERS),\
78 $(hdr)=>$(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/$(hdr))
79endif # darwin
80
81#
82# VBoxSharedCrOpenGL
83#
84VBoxSharedCrOpenGL_TEMPLATE = VBOXOGLR3HOST
85ifdef VBOX_WITH_XPCOM
86 VBoxSharedCrOpenGL_DEFS = VBOX_WITH_XPCOM
87endif
88VBoxSharedCrOpenGL_INTERMEDIATES = \
89 $(TEMPLATE_VBOXMAINEXE_INTERMEDIATES)
90VBoxSharedCrOpenGL_INCS.win = \
91 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \
92 $(VBOX_PATH_SDK)/bindings/mscom/include \
93 $(PATH_VBoxCOM)
94VBoxSharedCrOpenGL_INCS = \
95 . \
96 $(PATH_VBoxSVC)
97ifdef VBOX_WITH_XPCOM
98 VBoxSharedCrOpenGL_INCS += \
99 $(VBOX_XPCOM_INCS)
100endif
101VBoxSharedCrOpenGL_SOURCES = \
102 crserver/crservice.cpp
103VBoxSharedCrOpenGL_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedCrOpenGL.dylib
104VBoxSharedCrOpenGL_LIBS.darwin = \
105 $(LIB_REM)
106ifeq ($(KBUILD_TARGET),win)
107VBoxSharedCrOpenGL_LIBS = \
108 $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
109 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
110 $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \
111 $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
112 $(PATH_OBJ)/VBoxOGLrenderspu/VBoxOGLrenderspu$(VBOX_SUFF_LIB) \
113 $(PATH_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \
114 $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
115 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_SUFF_LIB)
116else
117 VBoxSharedCrOpenGL_LIBS += \
118 $(PATH_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \
119 $(PATH_BIN)/VBoxOGLrenderspu$(VBOX_SUFF_DLL) \
120 $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
121 $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
122 $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \
123 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
124 $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
125endif
126VBoxSharedCrOpenGL_LIBS += \
127 $(LIB_RUNTIME) \
128 $(LIB_VMM)
129
130
131#
132# VBoxOGLcrserverlib
133#
134VBoxOGLcrserverlib_TEMPLATE = VBOXOGLR3HOST
135VBoxOGLcrserverlib_INCS = \
136 crserverlib
137VBoxOGLcrserverlib_INTERMEDIATES = \
138 $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \
139 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h \
140 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
141 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
142VBoxOGLcrserverlib_SOURCES := \
143 crserverlib/server_main.c \
144 crserverlib/server_boundsinfo.c \
145 crserverlib/server_bufferobject.c \
146 crserverlib/server_clear.c \
147 crserverlib/server_clip.c \
148 crserverlib/server_config.c \
149 crserverlib/server_context.c \
150 crserverlib/server_gentextures.c \
151 crserverlib/server_getmap.c \
152 crserverlib/server_getstring.c \
153 crserverlib/server_getpointer.c \
154 crserverlib/server_getpixelmap.c \
155 crserverlib/server_getteximage.c \
156 crserverlib/server_lists.c \
157 crserverlib/server_misc.c \
158 crserverlib/server_occlude.c \
159 crserverlib/server_papi.c \
160 crserverlib/server_projmatrix.c \
161 crserverlib/server_readpixels.c \
162 crserverlib/server_stream.c \
163 crserverlib/server_tiles.c \
164 crserverlib/server_viewport.c \
165 crserverlib/server_window.c \
166 crserverlib/server_winpos.c \
167 crserverlib/server_writeback.c \
168 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
169 $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
170 $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
171 $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c
172VBoxOGLcrserverlib_CLEAN = \
173 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
174 $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
175 $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
176 $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c \
177 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h
178ifeq ($(KBUILD_HOST),win)
179 VBoxOGLcrserverlib_LIBS = \
180 $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
181 $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
182 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
183 $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
184 $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB)
185else
186 VBoxOGLcrserverlib_LIBS = \
187 $(PATH_BIN)/VBoxOGLhostcrpacker$(VBOX_SUFF_DLL) \
188 $(PATH_BIN)/VBoxOGLhostspuload$(VBOX_SUFF_DLL) \
189 $(PATH_BIN)/VBoxOGLcrunpacker$(VBOX_SUFF_DLL) \
190 $(PATH_BIN)/VBoxOGLhostcrstate$(VBOX_SUFF_DLL) \
191 $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
192endif
193
194#
195# Generate files for VBoxOGLcrserverlib
196#
197$(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch_header.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_dispatch.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch.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_retval.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_retval.py server_special) $(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_get.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_get.py server_special get_components.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$(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_simpleget.py get_sizes.py) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
210 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
211
212
213#
214# VBoxOGLcrunpacker
215#
216VBoxOGLcrunpacker_TEMPLATE = VBOXOGLR3HOST
217VBoxOGLcrunpacker_INCS = \
218 unpacker
219VBoxOGLcrunpacker_INTERMEDIATES = \
220 $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \
221 $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
222 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h
223VBoxOGLcrunpacker_SOURCES = \
224 unpacker/unpack_arrays.c \
225 unpacker/unpack_bounds.c \
226 unpacker/unpack_bufferobject.c \
227 unpacker/unpack_calllists.c \
228 unpacker/unpack_clipplane.c \
229 unpacker/unpack_context.c \
230 unpacker/unpack_drawpixels.c \
231 unpacker/unpack_fence.c \
232 unpacker/unpack_fog.c \
233 unpacker/unpack_lights.c \
234 unpacker/unpack_map.c \
235 unpacker/unpack_materials.c \
236 unpacker/unpack_matrices.c \
237 unpacker/unpack_misc.c \
238 unpacker/unpack_pixelmap.c \
239 unpacker/unpack_point.c \
240 unpacker/unpack_program.c \
241 unpacker/unpack_readpixels.c \
242 unpacker/unpack_regcombiner.c \
243 unpacker/unpack_stipple.c \
244 unpacker/unpack_texture.c \
245 unpacker/unpack_writeback.c \
246 unpacker/unpack_visibleregion.c \
247 $(VBOX_PATH_CROGL_GENFILES)/unpack.c
248VBoxOGLcrunpacker_CLEAN = \
249 $(VBOX_PATH_CROGL_GENFILES)/unpack.c \
250 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h
251ifeq ($(KBUILD_TARGET),win)
252 VBoxOGLcrunpacker_LIBS = \
253 $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
254 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
255 $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB)
256else
257 VBoxOGLcrunpacker_LIBS = \
258 $(PATH_BIN)/VBoxOGLhostcrpacker$(VBOX_SUFF_DLL) \
259 $(PATH_BIN)/VBoxOGLhostspuload$(VBOX_SUFF_DLL) \
260 $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
261endif
262
263#
264# Generate files for VBoxOGLcrunpacker.
265#
266$(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 $$@)
267 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
268
269$(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h: $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack_extend.py unpacker_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
270 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
271
272
273#
274# VBoxOGLrenderspu
275#
276VBoxOGLrenderspu_TEMPLATE = VBOXOGLR3HOST
277VBoxOGLrenderspu_INTERMEDIATES = \
278 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
279 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
280VBoxOGLrenderspu_SOURCES = \
281 render/renderspu.c \
282 render/renderspu_config.c \
283 render/renderspu_init.c
284VBoxOGLrenderspu_SOURCES.win = render/renderspu_wgl.c render/render.def
285VBoxOGLrenderspu_SOURCES.linux = render/renderspu_glx.c
286VBoxOGLrenderspu_SOURCES.solaris = render/renderspu_glx.c
287VBoxOGLrenderspu_SOURCES.darwin = render/renderspu_agl.c
288
289VBoxOGLrenderspu_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLrenderspu.dylib
290ifeq ($(KBUILD_TARGET),win)
291 VBoxOGLrenderspu_LIBS += \
292 $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
293 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB)
294else
295 VBoxOGLrenderspu_LIBS += \
296 $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL) \
297 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB)
298endif
299VBoxOGLrenderspu_LIBS += \
300 $(LIB_RUNTIME)
301if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # the X11 gang
302 VBoxOGLrenderspu_LIBS += \
303 Xmu \
304 X11 \
305 Xext
306 VBoxOGLrenderspu_LIBPATH = \
307 $(VBOX_LIBPATH_X11)
308endif
309
310include $(KBUILD_PATH)/subfooter.kmk
311
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