# $Id: Makefile.kmk 58764 2015-11-19 10:52:46Z vboxsync $ ## @file # Sub-Makefile for the VirtualBox Guest/Host OpenGL part # # # Copyright (C) 2008-2015 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. # BLDDIRS += \ $(VBOX_PATH_CROGL_GENFILES)/ \ $(VBOX_PATH_CROGL_GENFILES)/state/ ifdef VBOX_WITH_ADDITIONS ifn1of ($(KBUILD_TARGET), darwin os2) VBOX_WITH_CROGL_ADDITIONS = 1 endif endif ifdef VBOX_WITH_CROGL_ADDITIONS DLLS += VBoxOGLcrutil VBoxOGLerrorspu LIBRARIES += VBoxOGLcrpacker VBoxOGLspuload VBoxOGLcrstate endif ifndef VBOX_ONLY_ADDITIONS DLLS += VBoxOGLhostcrutil VBoxOGLhosterrorspu LIBRARIES += VBoxOGLhostcrpacker VBoxOGLhostspuload VBoxOGLhostcrstate endif # # VBoxOGLcrutil # VBoxOGLcrutil_TEMPLATE = VBOXCROGLR3GUESTDLL if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM) VBoxOGLcrutil_INSTTYPE.win = none VBoxOGLcrutil_DEBUG_INSTTYPE.win = both endif VBoxOGLcrutil_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBoxOGLcrutil_INTERMEDIATES = $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h if1of ($(KBUILD_TARGET), linux solaris freebsd) VBoxOGLcrutil_INCS += \ $(VBOX_MESA_INCS) endif VBoxOGLcrutil_SOURCES = \ util/bbox.c \ util/bufpool.c \ util/calllists.c \ util/devnull.c \ util/dll.c \ util/endian.c \ util/environment.c \ util/error.c \ util/filenet.c \ util/hash.c \ util/hull.c \ util/list.c \ util/matrix.c \ util/mem.c \ util/net.c \ util/pixel.c \ util/process.c \ util/rand.c \ util/string.c \ util/threads.c \ util/tcpip.c \ util/udptcpip.c \ util/timer.c \ util/url.c \ util/warp.c \ util/vreg.cpp \ util/blitter.cpp \ util/compositor.cpp \ util/htable.cpp \ util/bmpscale.cpp \ util/vboxhgcm.c \ $(VBOX_PATH_CROGL_GENFILES)/debug_opcodes.c VBoxOGLcrutil_SOURCES.win = \ util/VBoxOGLcrutil.rc VBoxOGLcrutil_SOURCES.win.x86 = \ util/util.def VBoxOGLcrutil_LIBS.win = \ $(PATH_SDK_$(VBOX_WINDDK)_LIB)/ddraw.lib \ $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib \ $(PATH_SDK_$(VBOX_WINDDK)_LIB)/shlwapi.lib VBoxOGLcrutil_LIBS = \ $(VBOX_LIB_IPRT_GUEST_R3_SHARED) \ $(VBOX_LIB_VBGL_R3_SHARED) # Needed by GDEbuger ifdef CR_NO_GL_SYSTEM_PATH VBoxOGLcrutil_DEFS += CR_NO_GL_SYSTEM_PATH endif ifdef VBOX_WITH_CRHGSMI VBoxOGLcrutil_DEFS.win += VBOX_WITH_CRHGSMI VBoxOGLcrutil_LIBS.win += $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi$(VBOX_SUFF_LIB) endif ifdef VBOX_WITH_WDDM VBoxOGLcrutil_DEFS.win += VBOX_WITH_WDDM VBoxOGLcrutil_DEFS.win += CR_DEBUG_BACKDOOR_ENABLE VBoxOGLcrutil_INCS.win += $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm VBoxOGLcrutil_LIBS.win += $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB) endif VBoxOGLcrutil_CLEAN = \ $(VBOX_PATH_CROGL_GENFILES)/debug_opcodes.c if1of ($(KBUILD_TARGET), linux) VBoxOGLcrutil_LDFLAGS += -Wl,-z,nodelete endif # vc7 hangs during compilation of this file when optimizations are enabled. #VBoxOGLcrutil_pixel.c_CFLAGS.win.x86 += -Od #VBoxOGLhostcrutil_pixel.c_CFLAGS.win.x86 += -Od if defined(VBOX_WITH_WDDM) && defined(VBOX_WITH_CROGL_ADDITIONS) # # VBoxOGLcrutil-x86 - x86 VBoxOGLcrutil version built for amd64 build # DLLS.win.amd64 += VBoxOGLcrutil-x86 VBoxOGLcrutil-x86_TEMPLATE = VBOXCROGLR3GUESTDLL VBoxOGLcrutil-x86_EXTENDS = VBoxOGLcrutil VBoxOGLcrutil-x86_BLD_TRG_ARCH = x86 VBoxOGLcrutil-x86_LIBS = $(VBOX_LIB_IPRT_GUEST_R3_SHARED_X86) \ $(VBOX_LIB_VBGL_R3_SHARED_X86) VBoxOGLcrutil-x86_LIBS.win = \ $(PATH_SDK_$(VBOX_WINDDK)_LIB.x86)/ddraw.lib \ $(PATH_SDK_$(VBOX_WINDDK)_LIB.x86)/dxguid.lib ifdef VBOX_WITH_CRHGSMI # VBOX_WITH_CRHGSMI define is inherited from VBoxOGLcrutil VBoxOGLcrutil-x86_LIBS.win += $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB) endif VBoxOGLcrutil-x86_DEFS = $(VBoxOGLcrutil_DEFS) VBOX_WDDM_WOW64 ifdef VBOX_WITH_WDDM # CR_DEBUG_BACKDOOR_ENABLE define is inherited from VBoxOGLcrutil VBoxOGLcrutil-x86_INCS.win += $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm VBoxOGLcrutil-x86_LIBS.win += $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) endif # vc7 hangs during compilation of this file when optimizations are enabled. #VBoxOGLcrutil-x86_pixel.c_CFLAGS += -Od #VBoxOGLcrutil-x86_pixel.c_CFLAGS += -Od endif # # VBoxOGLhostcrutil # VBoxOGLhostcrutil_EXTENDS = VBoxOGLcrutil VBoxOGLhostcrutil_TEMPLATE = VBOXCROGLR3HOSTDLL if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM) VBoxOGLhostcrutil_INSTTYPE.win = both endif if1of ($(KBUILD_TARGET), linux) VBoxOGLhostcrutil_LDFLAGS = $(NO_SUCH_VARIABLE) endif VBoxOGLhostcrutil_LDFLAGS.darwin = $(VBoxOGLcrutil_LDFLAGS.darwin) \ -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLhostcrutil.dylib VBoxOGLhostcrutil_LIBS.win = \ $(PATH_SDK_$(VBOX_WINDDK)_LIB)/ddraw.lib \ $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib VBoxOGLhostcrutil_LIBS = $(LIB_RUNTIME) ifdef VBOX_WITH_CRHGSMI VBoxOGLhostcrutil_DEFS += VBOX_WITH_CRHGSMI endif ifdef VBOX_WITH_WDDM VBoxOGLhostcrutil_INCS.win = $(NO_SUCH_VARIABLE) VBoxOGLhostcrutil_DEFS.win = $(NO_SUCH_VARIABLE) endif # # Generate files for VBoxOGLcrutil and VBoxOGLhostcrutil. # $(VBOX_PATH_CROGL_GENFILES)/debug_opcodes.c: $(PATH_SUB_CURRENT)/util/debug_opcodes.py $(VBOX_CROGL_API_FILES) | $$(dir $$@) $(call MSG_GENERATE,python,$@,$<) $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) ifdef VBOX_WITH_CRDUMPER $(VBOX_PATH_CROGL_GENFILES)/dump_gen.cpp: $(PATH_SUB_CURRENT)/state_tracker/dump_gen.py $(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib/get_sizes.py $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_isenabled.txt state_extensions_isenabled.txt) $(VBOX_CROGL_API_FILES) | $$(dir $$@) $(call MSG_GENERATE,python,$@,$<) $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(