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