# $Id: Makefile.kmk 16685 2009-02-11 16:51:07Z vboxsync $ ## @file # Sub-Makefile for the VirtualBox HGCM Service. # # # 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 # # Target lists. # DLLS += VBoxSharedCrOpenGL VBoxOGLrenderspu LIBRARIES += VBoxOGLcrserverlib VBoxOGLcrunpacker BLDDIRS += \ $(VBOX_PATH_CROGL_GENFILES)/ # # Globals # if1of ($(KBUILD_HOST), os2 win) VBOX_CROGL_HOST_PYTHONPATH := $(VBOX_PATH_CROGL_GLAPI);$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer;$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib else VBOX_CROGL_HOST_PYTHONPATH := $(VBOX_PATH_CROGL_GLAPI):$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer:$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib endif # # The VBOXOGLR3HOST template. # TEMPLATE_VBOXOGLR3HOST = VBox OpenGL Host Libraries TEMPLATE_VBOXOGLR3HOST_EXTENDS = VBOXR3NP TEMPLATE_VBOXOGLR3HOST_EXTENDS_BY = prepending TEMPLATE_VBOXOGLR3HOST_DEFS = CHROMIUM_THREADSAFE VBOX_WITH_HGCM UNPACKS TEMPLATE_VBOXOGLR3HOST_DEFS.win = _WIN32_WINNT=0x0500 WINDOWS=1 TEMPLATE_VBOXOGLR3HOST_DEFS.linux = Linux TEMPLATE_VBOXOGLR3HOST_DEFS.solaris = SunOS TEMPLATE_VBOXOGLR3HOST_DEFS.darwin = DARWIN GL_GLEXT_LEGACY TEMPLATE_VBOXOGLR3HOST_SDKS.darwin += DARWIN-OPENGL TEMPLATE_VBOXOGLR3HOST_INCS = \ $(VBOX_PATH_CROGL_INCLUDE) \ $(VBOX_PATH_CROGL_GENFILES) 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) ifeq ($(KBUILD_TARGET),darwin) # # We have to symlink the system headers of OpenGl cause they have some # different directory hierarchy on Mac OS X (no /GL sub directory). # # See Config.kmk for the global variables. # INSTALLS += DarwinOpenGLHdrs DarwinOpenGLHdrs_INST = $(VBOX_DARWIN_OPENGL_INST) DarwinOpenGLHdrs_SYMLINKS = \ $(foreach hdr, $(VBOX_DARWIN_OPENGL_HEADERS),\ $(hdr)=>$(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/$(hdr)) endif # darwin # # VBoxSharedCrOpenGL # VBoxSharedCrOpenGL_TEMPLATE = VBOXOGLR3HOST ifdef VBOX_WITH_XPCOM VBoxSharedCrOpenGL_DEFS = VBOX_WITH_XPCOM endif VBoxSharedCrOpenGL_INTERMEDIATES = \ $(TEMPLATE_VBOXMAINEXE_INTERMEDIATES) VBoxSharedCrOpenGL_INCS.win = \ $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \ $(VBOX_PATH_SDK)/bindings/mscom/include \ $(PATH_VBoxCOM) VBoxSharedCrOpenGL_INCS = \ . \ $(PATH_VBoxSVC) ifdef VBOX_WITH_XPCOM VBoxSharedCrOpenGL_INCS += \ $(VBOX_XPCOM_INCS) endif VBoxSharedCrOpenGL_SOURCES = \ crserver/crservice.cpp VBoxSharedCrOpenGL_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedCrOpenGL.dylib VBoxSharedCrOpenGL_LIBS.darwin = \ $(LIB_REM) ifeq ($(KBUILD_TARGET),win) VBoxSharedCrOpenGL_LIBS = \ $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \ $(PATH_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \ $(PATH_OBJ)/VBoxOGLrenderspu/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) else 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) endif VBoxSharedCrOpenGL_LIBS += \ $(LIB_RUNTIME) \ $(LIB_VMM) # # VBoxOGLcrserverlib # VBoxOGLcrserverlib_TEMPLATE = VBOXOGLR3HOST VBoxOGLcrserverlib_INCS = \ crserverlib VBoxOGLcrserverlib_INTERMEDIATES = \ $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \ $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h \ $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \ $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h VBoxOGLcrserverlib_SOURCES := \ crserverlib/server_main.c \ crserverlib/server_boundsinfo.c \ crserverlib/server_bufferobject.c \ crserverlib/server_clear.c \ crserverlib/server_clip.c \ crserverlib/server_config.c \ crserverlib/server_context.c \ crserverlib/server_gentextures.c \ crserverlib/server_getmap.c \ crserverlib/server_getstring.c \ crserverlib/server_getpointer.c \ crserverlib/server_getpixelmap.c \ crserverlib/server_getteximage.c \ crserverlib/server_lists.c \ crserverlib/server_misc.c \ crserverlib/server_occlude.c \ crserverlib/server_papi.c \ crserverlib/server_projmatrix.c \ crserverlib/server_readpixels.c \ crserverlib/server_stream.c \ crserverlib/server_tiles.c \ crserverlib/server_viewport.c \ crserverlib/server_window.c \ crserverlib/server_winpos.c \ crserverlib/server_writeback.c \ $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \ $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \ $(VBOX_PATH_CROGL_GENFILES)/server_get.c \ $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c VBoxOGLcrserverlib_CLEAN = \ $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.c \ $(VBOX_PATH_CROGL_GENFILES)/server_retval.c \ $(VBOX_PATH_CROGL_GENFILES)/server_get.c \ $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.c \ $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h ifeq ($(KBUILD_HOST),win) VBoxOGLcrserverlib_LIBS = \ $(PATH_OBJ)/VBoxOGLhostcrutil/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) else 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 # # Generate files for VBoxOGLcrserverlib # $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h: $(addprefix $(PATH_SUB_CURRENT)/crserverlib/, server_dispatch_header.py server_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@) $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(