# $Id: Makefile.kmk 78457 2019-05-09 11:03:50Z vboxsync $ ## @file # Sub-Makefile for the Shared OpenGL Host Service. # # # Copyright (C) 2008-2019 Oracle Corporation # # 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. # SUB_DEPTH = ../../../.. include $(KBUILD_PATH)/subheader.kmk # # Target lists. # ifdef VBOX_WITH_MAIN DLLS += VBoxSharedCrOpenGL LIBRARIES += VBoxOGLcrserverlib VBoxOGLcrunpacker VBoxOGLrenderspu BLDDIRS += \ $(VBOX_PATH_CROGL_GENFILES)/ endif 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 = VBOXCROGLR3HOSTDLL ifdef VBOX_WITH_XPCOM VBoxSharedCrOpenGL_DEFS = VBOX_WITH_XPCOM VBoxSharedCrOpenGL_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar $(VBOX_GCC_std) endif VBoxSharedCrOpenGL_INTERMEDIATES = \ $(TEMPLATE_VBOXMAINEXE_INTERMEDIATES) VBoxSharedCrOpenGL_INCS = $(VBOX_GRAPHICS_INCS) VBoxSharedCrOpenGL_INCS.win = \ $(VBOX_PATH_SDK)/bindings/mscom/include ifdef VBOX_WITH_XPCOM VBoxSharedCrOpenGL_INCS += \ $(VBOX_XPCOM_INCS) endif VBoxSharedCrOpenGL_SOURCES = \ crserver/crservice.cpp VBoxSharedCrOpenGL_SOURCES.win = \ crserver/VBoxSharedCrOpenGL.rc VBoxSharedCrOpenGL_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSharedCrOpenGL.dylib -framework IOKit VBoxSharedCrOpenGL_LIBS = \ $(PATH_STAGE_LIB)/VBoxOGLcrserverlib$(VBOX_SUFF_LIB) \ $(PATH_STAGE_LIB)/VBoxOGLrenderspu$(VBOX_SUFF_LIB) \ $(PATH_STAGE_LIB)/VBoxOGLhosterrorspu$(VBOX_SUFF_LIB) \ $(PATH_STAGE_LIB)/VBoxOGLhostcrstate$(VBOX_SUFF_LIB) \ $(PATH_STAGE_LIB)/VBoxOGLcrunpacker$(VBOX_SUFF_LIB) \ $(PATH_STAGE_LIB)/VBoxOGLhostcrpacker$(VBOX_SUFF_LIB) \ $(PATH_STAGE_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \ $(PATH_STAGE_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \ $(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \ $(LIB_RUNTIME) \ $(LIB_VMM) VBoxSharedCrOpenGL_LIBS.darwin = \ $(LIB_REM) ifdef VBOX_WITH_XPCOM VBoxSharedCrOpenGL_LIBS += \ $(LIB_XPCOM) endif if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # the X11 gang VBoxSharedCrOpenGL_LIBS += \ Xmu \ X11 \ Xext VBoxSharedCrOpenGL_LIBPATH = \ $(VBOX_LIBPATH_X11) endif ifdef VBOX_WITH_CRHGSMI VBoxSharedCrOpenGL_DEFS += VBOX_WITH_CRHGSMI endif # # VBoxOGLcrserverlib # VBoxOGLcrserverlib_TEMPLATE = VBOXCROGLR3HOSTLIB VBoxOGLcrserverlib_INCS = \ . \ crserverlib \ $(VBOX_GRAPHICS_INCS) VBoxOGLcrserverlib_INTERMEDIATES = \ $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h \ $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h \ $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \ $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \ $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h VBoxOGLcrserverlib_SOURCES := \ crserverlib/server_main.cpp \ crserverlib/server_boundsinfo.cpp \ crserverlib/server_bufferobject.cpp \ crserverlib/server_clear.cpp \ crserverlib/server_clip.cpp \ crserverlib/server_config.cpp \ crserverlib/server_context.cpp \ crserverlib/server_gentextures.cpp \ crserverlib/server_getmap.cpp \ crserverlib/server_getstring.cpp \ crserverlib/server_getpointer.cpp \ crserverlib/server_getpixelmap.cpp \ crserverlib/server_getteximage.cpp \ crserverlib/server_lists.cpp \ crserverlib/server_misc.cpp \ crserverlib/server_occlude.cpp \ crserverlib/server_papi.cpp \ crserverlib/server_projmatrix.cpp \ crserverlib/server_readpixels.cpp \ crserverlib/server_stream.cpp \ crserverlib/server_viewport.cpp \ crserverlib/server_window.cpp \ crserverlib/server_winpos.cpp \ crserverlib/server_writeback.cpp \ crserverlib/server_getshaders.cpp \ crserverlib/server_framebuffer.cpp \ crserverlib/server_glsl.cpp \ crserverlib/server_muralfbo.cpp \ crserverlib/server_texture.cpp \ crserverlib/presenter/server_presenter.cpp \ crserverlib/presenter/display_base.cpp \ crserverlib/presenter/display_composite.cpp \ crserverlib/presenter/window.cpp \ crserverlib/presenter/display_window.cpp \ crserverlib/presenter/display_window_rootvr.cpp \ crserverlib/presenter/display_vrdp.cpp \ crserverlib/server_rpw.cpp \ $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.cpp \ $(VBOX_PATH_CROGL_GENFILES)/server_retval.cpp \ $(VBOX_PATH_CROGL_GENFILES)/server_get.cpp \ $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.cpp VBoxOGLcrserverlib_CLEAN = \ $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.cpp \ $(VBOX_PATH_CROGL_GENFILES)/server_retval.cpp \ $(VBOX_PATH_CROGL_GENFILES)/server_get.cpp \ $(VBOX_PATH_CROGL_GENFILES)/server_simpleget.cpp \ $(VBOX_PATH_CROGL_GENFILES)/server_dispatch.h ifdef VBOXCR_LOGFPS VBoxOGLcrserverlib_DEFS += VBOXCR_LOGFPS endif ifdef VBOX_WITH_CRHGSMI VBoxOGLcrserverlib_DEFS += ifdef VBOX_WITH_CRHGSMI endif ifdef VBOX_WITH_CRDUMPER VBoxOGLcrserverlib_DEFS += VBOX_WITH_CRDUMPER endif ifdef VBOX_WITH_CRSERVER_DUMPER VBoxOGLcrserverlib_DEFS += VBOX_WITH_CRSERVER_DUMPER 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) $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/state_tracker/state_special | $$(dir $$@) $(call MSG_GENERATE,python,$@,$<) $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(