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