VirtualBox

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

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

crOpenGL: fix linking on linux hosts

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.6 KB
Line 
1# $Id: Makefile.kmk 17254 2009-03-02 15:36:48Z 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
34ifeq ($(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))
46endif # darwin
47
48#
49# VBoxSharedCrOpenGL
50#
51VBoxSharedCrOpenGL_TEMPLATE = VBOXCROGLR3HOSTDLL
52ifdef VBOX_WITH_XPCOM
53 VBoxSharedCrOpenGL_DEFS = VBOX_WITH_XPCOM
54endif
55VBoxSharedCrOpenGL_INTERMEDIATES = \
56 $(TEMPLATE_VBOXMAINEXE_INTERMEDIATES)
57VBoxSharedCrOpenGL_INCS.win = \
58 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \
59 $(VBOX_PATH_SDK)/bindings/mscom/include \
60 $(PATH_VBoxCOM)
61VBoxSharedCrOpenGL_INCS = \
62 . \
63 $(PATH_VBoxSVC)
64ifdef VBOX_WITH_XPCOM
65 VBoxSharedCrOpenGL_INCS += \
66 $(VBOX_XPCOM_INCS)
67endif
68VBoxSharedCrOpenGL_SOURCES = \
69 crserver/crservice.cpp
70VBoxSharedCrOpenGL_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedCrOpenGL.dylib
71VBoxSharedCrOpenGL_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)
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
90
91#
92# VBoxOGLcrserverlib
93#
94VBoxOGLcrserverlib_TEMPLATE = VBOXCROGLR3HOSTLIB
95VBoxOGLcrserverlib_INCS = \
96 crserverlib
97VBoxOGLcrserverlib_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
102VBoxOGLcrserverlib_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 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
129 $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
130 $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
131 $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c
132VBoxOGLcrserverlib_CLEAN = \
133 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \
134 $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \
135 $(VBOX_PATH_CROGL_GENFILES)/server_get.c \
136 $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c \
137 $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h
138
139#
140# Generate files for VBoxOGLcrserverlib
141#
142$(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch_header.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
143 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
144
145$(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
146 $(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_retval.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_retval.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
149 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
150
151$(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 $$@)
152 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
153
154$(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_simpleget.py get_sizes.py) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
155 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
156
157
158#
159# VBoxOGLcrunpacker
160#
161VBoxOGLcrunpacker_TEMPLATE = VBOXCROGLR3HOSTLIB
162VBoxOGLcrunpacker_INCS = \
163 unpacker
164VBoxOGLcrunpacker_INTERMEDIATES = \
165 $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \
166 $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
167 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h
168VBoxOGLcrunpacker_SOURCES = \
169 unpacker/unpack_arrays.c \
170 unpacker/unpack_bounds.c \
171 unpacker/unpack_bufferobject.c \
172 unpacker/unpack_calllists.c \
173 unpacker/unpack_clipplane.c \
174 unpacker/unpack_context.c \
175 unpacker/unpack_drawpixels.c \
176 unpacker/unpack_fence.c \
177 unpacker/unpack_fog.c \
178 unpacker/unpack_lights.c \
179 unpacker/unpack_map.c \
180 unpacker/unpack_materials.c \
181 unpacker/unpack_matrices.c \
182 unpacker/unpack_misc.c \
183 unpacker/unpack_pixelmap.c \
184 unpacker/unpack_point.c \
185 unpacker/unpack_program.c \
186 unpacker/unpack_readpixels.c \
187 unpacker/unpack_regcombiner.c \
188 unpacker/unpack_stipple.c \
189 unpacker/unpack_texture.c \
190 unpacker/unpack_writeback.c \
191 unpacker/unpack_visibleregion.c \
192 $(VBOX_PATH_CROGL_GENFILES)/unpack.c
193VBoxOGLcrunpacker_CLEAN = \
194 $(VBOX_PATH_CROGL_GENFILES)/unpack.c \
195 $(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h
196
197#
198# Generate files for VBoxOGLcrunpacker.
199#
200$(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 $$@)
201 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
202
203$(VBOX_PATH_CROGL_GENFILES)/unpack_extend.h: $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack_extend.py unpacker_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
204 $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
205
206
207#
208# VBoxOGLrenderspu
209#
210VBoxOGLrenderspu_TEMPLATE = VBOXCROGLR3HOSTDLL
211VBoxOGLrenderspu_INTERMEDIATES = \
212 $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
213 $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
214VBoxOGLrenderspu_SOURCES = \
215 render/renderspu.c \
216 render/renderspu_config.c \
217 render/renderspu_init.c
218VBoxOGLrenderspu_SOURCES.win = render/renderspu_wgl.c render/render.def
219VBoxOGLrenderspu_SOURCES.linux = render/renderspu_glx.c
220VBoxOGLrenderspu_SOURCES.solaris = render/renderspu_glx.c
221VBoxOGLrenderspu_SOURCES.darwin = render/renderspu_agl.c
222VBoxOGLrenderspu_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLrenderspu.dylib
223VBoxOGLrenderspu_LIBS = \
224 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
225 $(VBOX_LIB_OGL_HOSTCRUTIL) \
226 $(LIB_RUNTIME)
227if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # the X11 gang
228 VBoxOGLrenderspu_LIBS += \
229 Xmu \
230 X11 \
231 Xext
232 VBoxOGLrenderspu_LIBPATH = \
233 $(VBOX_LIBPATH_X11)
234endif
235
236include $(KBUILD_PATH)/subfooter.kmk
237
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