VirtualBox

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

Last change on this file since 35424 was 35380, checked in by vboxsync, 14 years ago

Makefiles: The PATH_<target> variable is deprated, use <target>_0_OUTDIR instead.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.8 KB
Line 
1# $Id: Makefile.kmk 35380 2010-12-30 16:06:17Z 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
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21
22#
23# Target lists.
24#
25ifdef VBOX_WITH_MAIN
26DLLS += VBoxSharedCrOpenGL VBoxOGLrenderspu
27LIBRARIES += VBoxOGLcrserverlib VBoxOGLcrunpacker
28BLDDIRS += \
29 $(VBOX_PATH_CROGL_GENFILES)/
30endif
31
32ifeq ($(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))
44endif # darwin
45
46#
47# VBoxSharedCrOpenGL
48#
49VBoxSharedCrOpenGL_TEMPLATE = VBOXCROGLR3HOSTDLL
50ifdef VBOX_WITH_XPCOM
51 VBoxSharedCrOpenGL_DEFS = VBOX_WITH_XPCOM
52 VBoxSharedCrOpenGL_CXXFLAGS = -Wno-non-virtual-dtor
53endif
54VBoxSharedCrOpenGL_INTERMEDIATES = \
55 $(TEMPLATE_VBOXMAINEXE_INTERMEDIATES)
56VBoxSharedCrOpenGL_INCS.win = \
57 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \
58 $(VBOX_PATH_SDK)/bindings/mscom/include \
59## @todo r=bird: This does NOT work when running make from HostService or any of its subdirectories!
60VBoxSharedCrOpenGL_INCS = \
61 $(VBoxSVC_0_OUTDIR) \
62 $(VBoxCOM_0_OUTDIR)
63ifdef VBOX_WITH_XPCOM
64 VBoxSharedCrOpenGL_INCS += \
65 $(VBOX_XPCOM_INCS)
66endif
67VBoxSharedCrOpenGL_SOURCES = \
68 crserver/crservice.cpp
69VBoxSharedCrOpenGL_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedCrOpenGL.dylib
70VBoxSharedCrOpenGL_LIBS = \
71 $(PATH_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \
72 $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \
73 $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \
74 $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \
75 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
76 $(VBOX_LIB_OGL_HOSTCRUTIL) \
77 $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
78 $(LIB_RUNTIME) \
79 $(LIB_VMM)
80VBoxSharedCrOpenGL_LIBS.darwin = \
81 $(LIB_REM)
82ifeq ($(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)
86else
87 VBoxSharedCrOpenGL_LIBS += \
88 $(PATH_BIN)/VBoxOGLrenderspu$(VBOX_SUFF_DLL)
89endif
90ifdef VBOX_WITH_XPCOM
91 VBoxSharedCrOpenGL_LIBS += \
92 $(LIB_XPCOM)
93endif
94ifdef VBOX_WITH_CRHGSMI
95VBoxSharedCrOpenGL_DEFS += VBOX_WITH_CRHGSMI
96endif
97
98#
99# VBoxOGLcrserverlib
100#
101VBoxOGLcrserverlib_TEMPLATE = VBOXCROGLR3HOSTLIB
102VBoxOGLcrserverlib_INCS = \
103 . \
104 crserverlib
105VBoxOGLcrserverlib_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
110VBoxOGLcrserverlib_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 crserverlib/server_texture.c \
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
144VBoxOGLcrserverlib_CLEAN = \
145 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
146 $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
147 $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
148 $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c \
149 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h
150ifdef VBOXCR_LOGFPS
151VBoxOGLcrserverlib_DEFS += VBOXCR_LOGFPS
152endif
153
154#
155# Generate files for VBoxOGLcrserverlib
156#
157$(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 $$@)
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_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 $$@)
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_retval.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_retval.py server_special) $(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_get.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_get.py server_special get_components.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$(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_simpleget.py get_sizes.py) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
174 $(call MSG_GENERATE,python,$@,$<)
175 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
176
177
178#
179# VBoxOGLcrunpacker
180#
181VBoxOGLcrunpacker_TEMPLATE = VBOXCROGLR3HOSTLIB
182VBoxOGLcrunpacker_INCS = \
183 unpacker
184VBoxOGLcrunpacker_INTERMEDIATES = \
185 $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \
186 $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
187 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h \
188 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
189 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
190VBoxOGLcrunpacker_SOURCES = \
191 unpacker/unpack_arrays.c \
192 unpacker/unpack_bounds.c \
193 unpacker/unpack_bufferobject.c \
194 unpacker/unpack_calllists.c \
195 unpacker/unpack_clipplane.c \
196 unpacker/unpack_context.c \
197 unpacker/unpack_drawpixels.c \
198 unpacker/unpack_fence.c \
199 unpacker/unpack_fog.c \
200 unpacker/unpack_lights.c \
201 unpacker/unpack_map.c \
202 unpacker/unpack_materials.c \
203 unpacker/unpack_matrices.c \
204 unpacker/unpack_misc.c \
205 unpacker/unpack_pixelmap.c \
206 unpacker/unpack_point.c \
207 unpacker/unpack_program.c \
208 unpacker/unpack_readpixels.c \
209 unpacker/unpack_regcombiner.c \
210 unpacker/unpack_stipple.c \
211 unpacker/unpack_texture.c \
212 unpacker/unpack_writeback.c \
213 unpacker/unpack_visibleregion.c \
214 unpacker/unpack_shaders.c \
215 unpacker/unpack_framebuffer.c \
216 $(VBOX_PATH_CROGL_GENFILES)/unpack.c
217VBoxOGLcrunpacker_CLEAN = \
218 $(VBOX_PATH_CROGL_GENFILES)/unpack.c \
219 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h
220
221#
222# Generate files for VBoxOGLcrunpacker.
223#
224$(VBOX_PATH_CROGL_GENFILES)/unpack.c: \
225 $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack.py unpacker_special) \
226 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h \
227 $(VBOX_CROGL_API_FILES) \
228 | $$(dir $$@)
229 $(call MSG_GENERATE,python,$@,$<)
230 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
231
232$(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h: \
233 $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack_extend.py unpacker_special) \
234 $(VBOX_CROGL_API_FILES) \
235 | $$(dir $$@)
236 $(call MSG_GENERATE,python,$@,$<)
237 $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
238
239
240#
241# VBoxOGLrenderspu
242#
243VBoxOGLrenderspu_TEMPLATE = VBOXCROGLR3HOSTDLL
244VBoxOGLrenderspu_INTERMEDIATES = \
245 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
246 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
247VBoxOGLrenderspu_SOURCES = \
248 render/renderspu.c \
249 render/renderspu_config.c \
250 render/renderspu_init.c
251VBoxOGLrenderspu_SOURCES.win = render/renderspu_wgl.c render/render.def
252VBoxOGLrenderspu_SOURCES.linux = render/renderspu_glx.c
253VBoxOGLrenderspu_SOURCES.solaris = render/renderspu_glx.c
254VBoxOGLrenderspu_SOURCES.freebsd = render/renderspu_glx.c
255ifdef VBOX_WITH_COCOA_QT
256 VBoxOGLrenderspu_SOURCES.darwin = \
257 render/renderspu_cocoa.c \
258 render/renderspu_cocoa_helper.m
259else
260 VBoxOGLrenderspu_SOURCES.darwin = render/renderspu_agl.c
261endif
262VBoxOGLrenderspu_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLrenderspu.dylib
263VBoxOGLrenderspu_LIBS = \
264 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
265 $(VBOX_LIB_OGL_HOSTCRUTIL) \
266 $(LIB_RUNTIME)
267if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # the X11 gang
268 VBoxOGLrenderspu_LIBS += \
269 Xmu \
270 X11 \
271 Xext
272 VBoxOGLrenderspu_LIBPATH = \
273 $(VBOX_LIBPATH_X11)
274endif
275
276include $(KBUILD_PATH)/subfooter.kmk
277
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