1 | # $Id: Makefile.kmk 27889 2010-03-31 12:57:09Z 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 |
|
---|
22 | SUB_DEPTH = ../../../..
|
---|
23 | include $(KBUILD_PATH)/subheader.kmk
|
---|
24 |
|
---|
25 |
|
---|
26 | #
|
---|
27 | # Target lists.
|
---|
28 | #
|
---|
29 | ifdef VBOX_WITH_MAIN
|
---|
30 | DLLS += VBoxSharedCrOpenGL VBoxOGLrenderspu
|
---|
31 | LIBRARIES += VBoxOGLcrserverlib VBoxOGLcrunpacker
|
---|
32 | BLDDIRS += \
|
---|
33 | $(VBOX_PATH_CROGL_GENFILES)/
|
---|
34 | endif
|
---|
35 |
|
---|
36 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
37 | #
|
---|
38 | # We have to symlink the system headers of OpenGl cause they have some
|
---|
39 | # different directory hierarchy on Mac OS X (no /GL sub directory).
|
---|
40 | #
|
---|
41 | # See Config.kmk for the global variables.
|
---|
42 | #
|
---|
43 | INSTALLS += DarwinOpenGLHdrs
|
---|
44 | DarwinOpenGLHdrs_INST = $(VBOX_DARWIN_OPENGL_INST)
|
---|
45 | DarwinOpenGLHdrs_SYMLINKS = \
|
---|
46 | $(foreach hdr, $(VBOX_DARWIN_OPENGL_HEADERS),\
|
---|
47 | $(hdr)=>$(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/$(hdr))
|
---|
48 | endif # darwin
|
---|
49 |
|
---|
50 | #
|
---|
51 | # VBoxSharedCrOpenGL
|
---|
52 | #
|
---|
53 | VBoxSharedCrOpenGL_TEMPLATE = VBOXCROGLR3HOSTDLL
|
---|
54 | ifdef VBOX_WITH_XPCOM
|
---|
55 | VBoxSharedCrOpenGL_DEFS = VBOX_WITH_XPCOM
|
---|
56 | VBoxSharedCrOpenGL_CXXFLAGS = -Wno-non-virtual-dtor
|
---|
57 | endif
|
---|
58 | VBoxSharedCrOpenGL_INTERMEDIATES = \
|
---|
59 | $(TEMPLATE_VBOXMAINEXE_INTERMEDIATES)
|
---|
60 | VBoxSharedCrOpenGL_INCS.win = \
|
---|
61 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \
|
---|
62 | $(VBOX_PATH_SDK)/bindings/mscom/include \
|
---|
63 | VBoxSharedCrOpenGL_INCS = \
|
---|
64 | $(PATH_VBoxSVC) \
|
---|
65 | $(PATH_VBoxCOM)
|
---|
66 | ifdef VBOX_WITH_XPCOM
|
---|
67 | VBoxSharedCrOpenGL_INCS += \
|
---|
68 | $(VBOX_XPCOM_INCS)
|
---|
69 | endif
|
---|
70 | VBoxSharedCrOpenGL_SOURCES = \
|
---|
71 | crserver/crservice.cpp
|
---|
72 | VBoxSharedCrOpenGL_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedCrOpenGL.dylib
|
---|
73 | VBoxSharedCrOpenGL_LIBS = \
|
---|
74 | $(PATH_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \
|
---|
75 | $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \
|
---|
76 | $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
|
---|
77 | $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
|
---|
78 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
|
---|
79 | $(VBOX_LIB_OGL_HOSTCRUTIL) \
|
---|
80 | $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
|
---|
81 | $(LIB_RUNTIME) \
|
---|
82 | $(LIB_VMM)
|
---|
83 | VBoxSharedCrOpenGL_LIBS.darwin = \
|
---|
84 | $(LIB_REM)
|
---|
85 | ifeq ($(KBUILD_TARGET),win)
|
---|
86 | VBoxSharedCrOpenGL_LIBS += \
|
---|
87 | $(PATH_OBJ)/VBoxOGLrenderspu/VBoxOGLrenderspu$(VBOX_SUFF_LIB) \
|
---|
88 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_SUFF_LIB)
|
---|
89 | else
|
---|
90 | VBoxSharedCrOpenGL_LIBS += \
|
---|
91 | $(PATH_BIN)/VBoxOGLrenderspu$(VBOX_SUFF_DLL)
|
---|
92 | endif
|
---|
93 | ifdef VBOX_WITH_XPCOM
|
---|
94 | VBoxSharedCrOpenGL_LIBS += \
|
---|
95 | $(LIB_XPCOM)
|
---|
96 | endif
|
---|
97 |
|
---|
98 | #
|
---|
99 | # VBoxOGLcrserverlib
|
---|
100 | #
|
---|
101 | VBoxOGLcrserverlib_TEMPLATE = VBOXCROGLR3HOSTLIB
|
---|
102 | VBoxOGLcrserverlib_INCS = \
|
---|
103 | . \
|
---|
104 | crserverlib
|
---|
105 | VBoxOGLcrserverlib_INTERMEDIATES = \
|
---|
106 | $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \
|
---|
107 | $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h \
|
---|
108 | $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
|
---|
109 | $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
|
---|
110 | VBoxOGLcrserverlib_SOURCES := \
|
---|
111 | crserverlib/server_main.c \
|
---|
112 | crserverlib/server_boundsinfo.c \
|
---|
113 | crserverlib/server_bufferobject.c \
|
---|
114 | crserverlib/server_clear.c \
|
---|
115 | crserverlib/server_clip.c \
|
---|
116 | crserverlib/server_config.c \
|
---|
117 | crserverlib/server_context.c \
|
---|
118 | crserverlib/server_gentextures.c \
|
---|
119 | crserverlib/server_getmap.c \
|
---|
120 | crserverlib/server_getstring.c \
|
---|
121 | crserverlib/server_getpointer.c \
|
---|
122 | crserverlib/server_getpixelmap.c \
|
---|
123 | crserverlib/server_getteximage.c \
|
---|
124 | crserverlib/server_lists.c \
|
---|
125 | crserverlib/server_misc.c \
|
---|
126 | crserverlib/server_occlude.c \
|
---|
127 | crserverlib/server_papi.c \
|
---|
128 | crserverlib/server_projmatrix.c \
|
---|
129 | crserverlib/server_readpixels.c \
|
---|
130 | crserverlib/server_stream.c \
|
---|
131 | crserverlib/server_viewport.c \
|
---|
132 | crserverlib/server_window.c \
|
---|
133 | crserverlib/server_winpos.c \
|
---|
134 | crserverlib/server_writeback.c \
|
---|
135 | crserverlib/server_getshaders.c \
|
---|
136 | crserverlib/server_framebuffer.c \
|
---|
137 | crserverlib/server_glsl.c \
|
---|
138 | crserverlib/server_muralfbo.c \
|
---|
139 | $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
|
---|
140 | $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
|
---|
141 | $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
|
---|
142 | $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c
|
---|
143 | VBoxOGLcrserverlib_CLEAN = \
|
---|
144 | $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
|
---|
145 | $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
|
---|
146 | $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
|
---|
147 | $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c \
|
---|
148 | $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h
|
---|
149 |
|
---|
150 | #
|
---|
151 | # Generate files for VBoxOGLcrserverlib
|
---|
152 | #
|
---|
153 | $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch_header.py server_special) $(VBOX_CROGL_API_FILES) $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/state_tracker/state_special | $$(dir $$@)
|
---|
154 | $(call MSG_GENERATE,python,$@,$<)
|
---|
155 | $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
156 |
|
---|
157 | $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch.py server_special) $(VBOX_CROGL_API_FILES) $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/state_tracker/state_special | $$(dir $$@)
|
---|
158 | $(call MSG_GENERATE,python,$@,$<)
|
---|
159 | $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
160 |
|
---|
161 | $(VBOX_PATH_CROGL_GENFILES)/server_retval.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_retval.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
|
---|
162 | $(call MSG_GENERATE,python,$@,$<)
|
---|
163 | $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
164 |
|
---|
165 | $(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 $$@)
|
---|
166 | $(call MSG_GENERATE,python,$@,$<)
|
---|
167 | $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
168 |
|
---|
169 | $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_simpleget.py get_sizes.py) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
|
---|
170 | $(call MSG_GENERATE,python,$@,$<)
|
---|
171 | $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
172 |
|
---|
173 |
|
---|
174 | #
|
---|
175 | # VBoxOGLcrunpacker
|
---|
176 | #
|
---|
177 | VBoxOGLcrunpacker_TEMPLATE = VBOXCROGLR3HOSTLIB
|
---|
178 | VBoxOGLcrunpacker_INCS = \
|
---|
179 | unpacker
|
---|
180 | VBoxOGLcrunpacker_INTERMEDIATES = \
|
---|
181 | $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \
|
---|
182 | $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
|
---|
183 | $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h \
|
---|
184 | $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
|
---|
185 | $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
|
---|
186 | VBoxOGLcrunpacker_SOURCES = \
|
---|
187 | unpacker/unpack_arrays.c \
|
---|
188 | unpacker/unpack_bounds.c \
|
---|
189 | unpacker/unpack_bufferobject.c \
|
---|
190 | unpacker/unpack_calllists.c \
|
---|
191 | unpacker/unpack_clipplane.c \
|
---|
192 | unpacker/unpack_context.c \
|
---|
193 | unpacker/unpack_drawpixels.c \
|
---|
194 | unpacker/unpack_fence.c \
|
---|
195 | unpacker/unpack_fog.c \
|
---|
196 | unpacker/unpack_lights.c \
|
---|
197 | unpacker/unpack_map.c \
|
---|
198 | unpacker/unpack_materials.c \
|
---|
199 | unpacker/unpack_matrices.c \
|
---|
200 | unpacker/unpack_misc.c \
|
---|
201 | unpacker/unpack_pixelmap.c \
|
---|
202 | unpacker/unpack_point.c \
|
---|
203 | unpacker/unpack_program.c \
|
---|
204 | unpacker/unpack_readpixels.c \
|
---|
205 | unpacker/unpack_regcombiner.c \
|
---|
206 | unpacker/unpack_stipple.c \
|
---|
207 | unpacker/unpack_texture.c \
|
---|
208 | unpacker/unpack_writeback.c \
|
---|
209 | unpacker/unpack_visibleregion.c \
|
---|
210 | unpacker/unpack_shaders.c \
|
---|
211 | unpacker/unpack_framebuffer.c \
|
---|
212 | $(VBOX_PATH_CROGL_GENFILES)/unpack.c
|
---|
213 | VBoxOGLcrunpacker_CLEAN = \
|
---|
214 | $(VBOX_PATH_CROGL_GENFILES)/unpack.c \
|
---|
215 | $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h
|
---|
216 |
|
---|
217 | #
|
---|
218 | # Generate files for VBoxOGLcrunpacker.
|
---|
219 | #
|
---|
220 | $(VBOX_PATH_CROGL_GENFILES)/unpack.c: \
|
---|
221 | $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack.py unpacker_special) \
|
---|
222 | $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h \
|
---|
223 | $(VBOX_CROGL_API_FILES) \
|
---|
224 | | $$(dir $$@)
|
---|
225 | $(call MSG_GENERATE,python,$@,$<)
|
---|
226 | $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
227 |
|
---|
228 | $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h: \
|
---|
229 | $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack_extend.py unpacker_special) \
|
---|
230 | $(VBOX_CROGL_API_FILES) \
|
---|
231 | | $$(dir $$@)
|
---|
232 | $(call MSG_GENERATE,python,$@,$<)
|
---|
233 | $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
|
---|
234 |
|
---|
235 |
|
---|
236 | #
|
---|
237 | # VBoxOGLrenderspu
|
---|
238 | #
|
---|
239 | VBoxOGLrenderspu_TEMPLATE = VBOXCROGLR3HOSTDLL
|
---|
240 | VBoxOGLrenderspu_INTERMEDIATES = \
|
---|
241 | $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
|
---|
242 | $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
|
---|
243 | VBoxOGLrenderspu_SOURCES = \
|
---|
244 | render/renderspu.c \
|
---|
245 | render/renderspu_config.c \
|
---|
246 | render/renderspu_init.c
|
---|
247 | VBoxOGLrenderspu_SOURCES.win = render/renderspu_wgl.c render/render.def
|
---|
248 | VBoxOGLrenderspu_SOURCES.linux = render/renderspu_glx.c
|
---|
249 | VBoxOGLrenderspu_SOURCES.solaris = render/renderspu_glx.c
|
---|
250 | VBoxOGLrenderspu_SOURCES.freebsd = render/renderspu_glx.c
|
---|
251 | ifdef VBOX_WITH_COCOA_QT
|
---|
252 | VBoxOGLrenderspu_SOURCES.darwin = \
|
---|
253 | render/renderspu_cocoa.c \
|
---|
254 | render/renderspu_cocoa_helper.m
|
---|
255 | else
|
---|
256 | VBoxOGLrenderspu_SOURCES.darwin = render/renderspu_agl.c
|
---|
257 | endif
|
---|
258 | VBoxOGLrenderspu_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLrenderspu.dylib
|
---|
259 | VBoxOGLrenderspu_LIBS = \
|
---|
260 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
|
---|
261 | $(VBOX_LIB_OGL_HOSTCRUTIL) \
|
---|
262 | $(LIB_RUNTIME)
|
---|
263 | if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # the X11 gang
|
---|
264 | VBoxOGLrenderspu_LIBS += \
|
---|
265 | Xmu \
|
---|
266 | X11 \
|
---|
267 | Xext
|
---|
268 | VBoxOGLrenderspu_LIBPATH = \
|
---|
269 | $(VBOX_LIBPATH_X11)
|
---|
270 | endif
|
---|
271 |
|
---|
272 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
273 |
|
---|