# $Id: Makefile.kmk 15532 2008-12-15 18:53:11Z vboxsync $ ## @file # Sub-Makefile for the VirtualBox Windows Chromium OpenGL ICD. # # # Copyright (C) 2008 Sun Microsystems, Inc. # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; # you can redistribute it and/or modify it under the terms of the GNU # General Public License (GPL) as published by the Free Software # Foundation, in version 2 as it comes in the "COPYING" file of the # VirtualBox OSE distribution. VirtualBox OSE is distributed in the # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. # # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa # Clara, CA 95054 USA or visit http://www.sun.com if you need # additional information or have any questions. # SUB_DEPTH = ../../../.. include $(KBUILD_PATH)/subheader.kmk ifndef VBOX_BLD_PYTHON if1of ($(KBUILD_HOST), win) VBOX_BLD_PYTHON := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS)/win.x86/python/v*/python$(HOSTSUFF_EXE))) python-not-found.exe) else VBOX_BLD_PYTHON := python$(HOSTSUFF_EXE) endif endif GLAPI_PATH := $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/glapi_parser if1of ($(KBUILD_HOST), win) export PYTHONPATH := $(GLAPI_PATH);$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer;$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib else export PYTHONPATH := $(GLAPI_PATH):$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer:$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib endif APIFILES := $(GLAPI_PATH)/apiutil.py $(GLAPI_PATH)/APIspec.txt VBOXCROGL_GENFILES := VBoxOGLgen PATH_VBOXCROGL_GENFILES := $(PATH_OBJ)/$(VBOXCROGL_GENFILES) PATH_VBOXCROGL_HOST_GENFILES := $(PATH_TARGET)/$(VBOXCROGL_GENFILES) PATH_VBOXCROGL_INCLUDE := $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/include VBOX_OPENGL_HEADERS = gl.h glu.h VBOX_PATH_MACOSX_OPENGL = $(PATH_OBJ)/VBoxOGL/GL DLLS += VBoxSharedCrOpenGL DLLS += VBoxOGLrenderspu LIBRARIES += VBoxOGLcrserverlib LIBRARIES += VBoxOGLcrunpacker # We have to symlink the system headers of OpenGl cause they have some # different directory hierarchy on Mac OS X (no /GL sub directory). $(addprefix $(VBOX_PATH_MACOSX_OPENGL)/,$(VBOX_OPENGL_HEADERS)): \ $(VBOX_PATH_MACOSX_OPENGL)/%: $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/% | $$(dir $$@) $(LN) -s $< $@ ## VBOXOGLR3HOST ## TEMPLATE_VBOXOGLR3HOST = VBox OpenGL Host Libraries TEMPLATE_VBOXOGLR3HOST_EXTENDS = VBOXR3NP TEMPLATE_VBOXOGLR3HOST_DEFS = $(TEMPLATE_VBOXR3NP_DEFS) CHROMIUM_THREADSAFE VBOX_WITH_HGCM UNPACKS TEMPLATE_VBOXOGLR3HOST_DEFS.win = $(TEMPLATE_VBOXOGLR3HOST_DEFS) _WIN32_WINNT=0x0500 WINDOWS=1 TEMPLATE_VBOXOGLR3HOST_DEFS.linux = $(TEMPLATE_VBOXOGLR3HOST_DEFS) Linux TEMPLATE_VBOXOGLR3HOST_DEFS.solaris = $(TEMPLATE_VBOXOGLR3HOST_DEFS) SunOS TEMPLATE_VBOXOGLR3HOST_DEFS.darwin = $(TEMPLATE_VBOXOGLR3HOST_DEFS) DARWIN GL_GLEXT_LEGACY TEMPLATE_VBOXOGLR3HOST_INCS = $(PATH_VBOXCROGL_INCLUDE) $(PATH_VBOXCROGL_GENFILES) TEMPLATE_VBOXOGLR3HOST_DEPS.darwin = $(addprefix $(VBOX_PATH_MACOSX_OPENGL)/,$(VBOX_OPENGL_HEADERS)) TEMPLATE_VBOXOGLR3HOST_INCS.darwin = $(VBOX_PATH_MACOSX_OPENGL)/.. TEMPLATE_VBOXOGLR3HOST_BLDDIRS.darwin = $(VBOX_PATH_MACOSX_OPENGL) TEMPLATE_VBOXOGLR3HOST_LDFLAGS.linux = -Wl,--no-as-needed TEMPLATE_VBOXOGLR3HOST_LDFLAGS.darwin = -framework Carbon -framework OpenGL -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) TEMPLATE_VBOXOGLR3HOST_BLDDIRS = $(PATH_VBOXCROGL_HOST_GENFILES)/ # # VBoxSharedCrOpenGL # VBoxSharedCrOpenGL_TEMPLATE = VBOXOGLR3HOST VBoxSharedCrOpenGL_INCS := \ $(PATH_SUB_CURRENT) \ $(PATH_VBoxSVC) VBoxSharedCrOpenGL_INCS.win += \ $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \ $(VBOX_PATH_SDK)/bindings/mscom/include \ $(PATH_VBoxCOM) ifdef VBOX_WITH_XPCOM VBoxSharedCrOpenGL_DEFS += VBOX_WITH_XPCOM VBoxSharedCrOpenGL_INCS += $(VBOX_XPCOM_INCS) VBoxSharedCrOpenGL_INTERMEDIATES += $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h endif VBoxSharedCrOpenGL_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedCrOpenGL.dylib VBoxSharedCrOpenGL_SOURCES += crserver/crservice.cpp VBoxSharedCrOpenGL_LIBS.win = \ $(PATH_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLrenderspu$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \ $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_SUFF_LIB)\ $(LIB_RUNTIME) $(LIB_VMM) if1of ($(KBUILD_TARGET), linux solaris darwin) VBoxSharedCrOpenGL_LIBS += \ $(PATH_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \ $(PATH_BIN)/VBoxOGLrenderspu$(VBOX_SUFF_DLL) \ $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \ $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL) \ $(LIB_RUNTIME) $(LIB_VMM) endif VBoxSharedCrOpenGL_LIBS.darwin += $(LIB_REM) # # VBoxOGLcrserverlib # $(PATH_VBOXCROGL_HOST_GENFILES)/server_dispatch.h: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch_header.py server_special) $(APIFILES) | $$(dir $$@) $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $( $@ $(PATH_VBOXCROGL_HOST_GENFILES)/server_dispatch.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch.py server_special) $(APIFILES) | $$(dir $$@) $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $( $@ $(PATH_VBOXCROGL_HOST_GENFILES)/server_retval.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_retval.py server_special) $(APIFILES) | $$(dir $$@) $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $( $@ $(PATH_VBOXCROGL_HOST_GENFILES)/server_get.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_get.py server_special get_components.py) $(APIFILES) | $$(dir $$@) $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $( $@ $(PATH_VBOXCROGL_HOST_GENFILES)/server_simpleget.c: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_simpleget.py get_sizes.py) $(APIFILES) | $$(dir $$@) $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $( $@ GEN_C_FILES := server_dispatch.c \ server_retval.c \ server_get.c \ server_simpleget.c GEN_C_FILES := $(addprefix $(PATH_VBOXCROGL_HOST_GENFILES)/, $(GEN_C_FILES)) GEN_H_FILES := server_dispatch.h GEN_H_FILES := $(addprefix $(PATH_VBOXCROGL_HOST_GENFILES)/, $(GEN_H_FILES)) NORMAL_C_FILES := server_main.c \ server_boundsinfo.c \ server_bufferobject.c \ server_clear.c \ server_clip.c \ server_config.c \ server_context.c \ server_gentextures.c \ server_getmap.c \ server_getstring.c \ server_getpointer.c \ server_getpixelmap.c \ server_getteximage.c \ server_lists.c \ server_misc.c \ server_occlude.c \ server_papi.c \ server_projmatrix.c \ server_readpixels.c \ server_stream.c \ server_tiles.c \ server_viewport.c \ server_window.c \ server_winpos.c \ server_writeback.c NORMAL_C_FILES := $(addprefix crserverlib/, $(NORMAL_C_FILES)) VBoxOGLcrserverlib_TEMPLATE = VBOXOGLR3HOST VBoxOGLcrserverlib_INCS := \ $(PATH_SUB_CURRENT)/crserverlib \ $(PATH_VBOXCROGL_HOST_GENFILES) VBoxOGLcrserverlib_INTERMEDIATES = $(PATH_VBOXCROGL_GENFILES)/spu_dispatch_table.h VBoxOGLcrserverlib_SOURCES := $(NORMAL_C_FILES) $(GEN_C_FILES) #VBoxOGLcrserverlib_SOURCES.win = crserverlib.def VBoxOGLcrserverlib_DEPS := \ $(GEN_H_FILES) \ $(PATH_VBOXCROGL_GENFILES)/state/cr_currentpointers.h \ $(PATH_VBOXCROGL_GENFILES)/state/cr_statefuncs.h VBoxOGLcrserverlib_CLEAN := $(GEN_C_FILES) $(GEN_H_FILES) VBoxOGLcrserverlib_LIBS.win = \ $(PATH_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) if1of ($(KBUILD_TARGET), linux solaris darwin) VBoxOGLcrserverlib_LIBS += \ $(PATH_BIN)/VBoxOGLhostcrpacker$(VBOX_SUFF_DLL) \ $(PATH_BIN)/VBoxOGLhostspuload$(VBOX_SUFF_DLL) \ $(PATH_BIN)/VBoxOGLcrunpacker$(VBOX_SUFF_DLL) \ $(PATH_BIN)/VBoxOGLhostcrstate$(VBOX_SUFF_DLL) \ $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL) endif # # VBoxOGLcrunpacker # $(PATH_VBOXCROGL_HOST_GENFILES)/unpack.c: $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack.py unpacker_special) $(PATH_VBOXCROGL_HOST_GENFILES)/unpack_extend.h $(APIFILES) | $$(dir $$@) $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $( $@ $(PATH_VBOXCROGL_HOST_GENFILES)/unpack_extend.h: $(addprefix $(PATH_SUB_CURRENT)/unpacker/, unpack_extend.py unpacker_special) $(APIFILES) | $$(dir $$@) $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $( $@ GEN_C_FILES := unpack.c GEN_C_FILES := $(addprefix $(PATH_VBOXCROGL_HOST_GENFILES)/, $(GEN_C_FILES)) GEN_H_FILES := unpack_extend.h GEN_H_FILES := $(addprefix $(PATH_VBOXCROGL_HOST_GENFILES)/, $(GEN_H_FILES)) NORMAL_FILES := \ unpack_arrays \ unpack_bounds \ unpack_bufferobject \ unpack_calllists \ unpack_clipplane \ unpack_context \ unpack_drawpixels \ unpack_fence \ unpack_fog \ unpack_lights \ unpack_map \ unpack_materials \ unpack_matrices \ unpack_misc \ unpack_pixelmap \ unpack_point \ unpack_program \ unpack_readpixels \ unpack_regcombiner \ unpack_stipple \ unpack_texture \ unpack_writeback \ unpack_visibleregion NORMAL_C_FILES := $(addsuffix .c, $(NORMAL_FILES)) NORMAL_C_FILES := $(addprefix unpacker/, $(NORMAL_C_FILES)) VBoxOGLcrunpacker_TEMPLATE = VBOXOGLR3HOST VBoxOGLcrunpacker_INCS := \ $(PATH_SUB_CURRENT)/unpacker \ $(PATH_VBOXCROGL_HOST_GENFILES) VBoxOGLcrunpacker_INTERMEDIATES = \ $(PATH_VBOXCROGL_GENFILES)/spu_dispatch_table.h \ $(PATH_VBOXCROGL_GENFILES)/cr_opcodes.h VBoxOGLcrunpacker_SOURCES := $(NORMAL_C_FILES) $(GEN_C_FILES) #VBoxOGLcrunpacker_SOURCES.win = unpack.def VBoxOGLcrunpacker_DEPS := $(GEN_H_FILES) VBoxOGLcrunpacker_CLEAN := $(GEN_C_FILES) $(GEN_H_FILES) VBoxOGLcrunpacker_LIBS.win = \ $(PATH_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) if1of ($(KBUILD_TARGET), linux solaris darwin) VBoxOGLcrunpacker_LIBS += \ $(PATH_BIN)/VBoxOGLhostcrpacker$(VBOX_SUFF_DLL) \ $(PATH_BIN)/VBoxOGLhostspuload$(VBOX_SUFF_DLL) \ $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL) endif # # VBoxOGLrenderspu # VBoxOGLrenderspu_TEMPLATE = VBOXOGLR3HOST VBoxOGLrenderspu_LIBS += $(LIB_RUNTIME) VBoxOGLrenderspu_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLrenderspu.dylib VBoxOGLrenderspu_SOURCES := \ render/renderspu.c \ render/renderspu_config.c \ render/renderspu_init.c VBoxOGLrenderspu_SOURCES.win = render/renderspu_wgl.c render/render.def VBoxOGLrenderspu_SOURCES.linux = render/renderspu_glx.c VBoxOGLrenderspu_SOURCES.solaris = render/renderspu_glx.c VBoxOGLrenderspu_SOURCES.darwin = render/renderspu_agl.c VBoxOGLrenderspu_LIBS.win = \ $(PATH_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) if1of ($(KBUILD_TARGET), linux solaris darwin) VBoxOGLrenderspu_LIBS += \ $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL) \ $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) endif if1of ($(KBUILD_TARGET), linux solaris) VBoxOGLrenderspu_LIBPATH += $(VBOX_LIBPATH_X11) VBoxOGLrenderspu_LIBS += \ Xmu X11 Xext endif include $(KBUILD_PATH)/subfooter.kmk