# $Id: Makefile.kmk 78408 2019-05-06 21:31:01Z vboxsync $ ## @file # Sub-Makefile for the VirtualBox Guest/Host OpenGL part # # # 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. # 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 LIBRARIES += VBoxOGLcrpacker VBoxOGLspuload VBoxOGLcrstate VBoxOGLcrutil VBoxOGLerrorspu endif ifndef VBOX_ONLY_ADDITIONS LIBRARIES += VBoxOGLhostcrpacker VBoxOGLhostspuload VBoxOGLhostcrstate VBoxOGLhostcrutil VBoxOGLhosterrorspu endif # # VBoxOGLcrutil # VBoxOGLcrutil_TEMPLATE = VBOXCROGLR3GUESTLIB 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 VBoxOGLcrutil_INCS += \ $(VBOX_GRAPHICS_INCS) if1of ($(KBUILD_TARGET), linux solaris freebsd) VBoxOGLcrutil_INCS += \ $(VBOX_GL_INCS) endif VBoxOGLcrutil_SOURCES = \ util/bufpool.c \ util/dll.c \ util/error.c \ util/hash.c \ util/matrix.c \ util/mem.c \ util/net.c \ util/pixel.c \ util/process.c \ util/string.c \ util/threads.c \ util/vreg.cpp \ util/blitter.cpp \ util/compositor.cpp \ util/htable.cpp \ util/bmpscale.cpp \ util/vboxhgcm.c 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) ifeq ($(KBUILD_TARGET),linux) VBoxOGLcrutil_LIBS += crypt endif # 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)/VBoxWddmUmKmt$(VBOX_SUFF_LIB) \ $(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 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 # LIBRARIES.win.amd64 += VBoxOGLcrutil-x86 VBoxOGLcrutil-x86_TEMPLATE = VBOXCROGLR3GUESTLIB 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)/VBoxWddmUmKmt-x86$(VBOX_SUFF_LIB) \ $(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 = VBOXCROGLR3HOSTLIB 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_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. # 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) $(