diff options
Diffstat (limited to '')
-rw-r--r-- | src/VBox/Additions/common/crOpenGL/Makefile.kmk | 734 |
1 files changed, 734 insertions, 0 deletions
diff --git a/src/VBox/Additions/common/crOpenGL/Makefile.kmk b/src/VBox/Additions/common/crOpenGL/Makefile.kmk new file mode 100644 index 00000000..4d0011d8 --- /dev/null +++ b/src/VBox/Additions/common/crOpenGL/Makefile.kmk @@ -0,0 +1,734 @@ +# $Id: Makefile.kmk $ +## @file +# Sub-Makefile for the VirtualBox Guest 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)/ + +if1of ($(KBUILD_TARGET), win linux solaris freebsd) + DLLS += \ + VBoxOGL \ + VBoxOGLarrayspu \ + VBoxOGLpassthroughspu \ + VBoxOGLpackspu \ + VBoxOGLfeedbackspu +endif + +VBOX_OGL_X86_GUEST_DLLS = \ + VBoxOGL-x86 \ + VBoxOGLarrayspu-x86 \ + VBoxOGLpassthroughspu-x86 \ + VBoxOGLpackspu-x86 \ + VBoxOGLfeedbackspu-x86 + +ifdef VBOX_WITH_WDDM + DLLS.win.amd64 += $(VBOX_OGL_X86_GUEST_DLLS) +endif + +if1of ($(KBUILD_TARGET), linux solaris freebsd) + #VBoxOGL_DRI = 1 + DLLS += VBoxEGL + ifn1of ($(KBUILD_TARGET),linux solaris) # No DRI on Solaris yet + VBoxOGL_FAKEDRI = 1 + endif + + # Only Solaris right now needs C stubs because I can't figure out how to + # generate the GOT based relocation ASM yet. + ifdef VBoxOGL_FAKEDRI + if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),solaris.x86 solaris.amd64 linux.x86 linux.amd64 freebsd.x86 freebsd.amd64) + VBOX_OGL_GLX_USE_CSTUBS = 1 + endif + endif +endif + + +# +# VBoxOGL +# +VBoxOGL_TEMPLATE = VBOXCROGLR3GUESTDLL +VBoxOGL_INCS = . $(VBOX_GRAPHICS_INCS) +if1of ($(KBUILD_TARGET), linux solaris freebsd) + ifndef VBOX_USE_SYSTEM_GL_HEADERS + VBoxOGL_INCS += \ + $(VBOX_PATH_X11_ROOT)/libXdamage-1.1 \ + $(VBOX_PATH_X11_ROOT)/libXcomposite-0.4.0 \ + $(VBOX_PATH_X11_ROOT)/libXext-1.3.1 \ + $(VBOX_PATH_X11_ROOT)/libXfixes-4.0.3 \ + $(VBOX_PATH_X11_ROOT)/damageproto-1.1.0 \ + $(VBOX_PATH_X11_ROOT)/compositeproto-0.4 \ + $(VBOX_PATH_X11_ROOT)/fixesproto-4.0 \ + $(VBOX_PATH_X11_ROOT)/libx11-1.1.5-other \ + $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \ + $(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \ + $(VBOX_GL_INCS) + endif + VBoxOGL_DEFS += VBOX_NO_NATIVEGL +endif + +ifdef VBoxOGL_DRI + VBoxOGL_DEFS += VBOXOGL_DRI IN_DRI_DRIVER +else ifdef VBoxOGL_FAKEDRI + VBoxOGL_DEFS += VBOXOGL_FAKEDRI + ifdef VBOX_OGL_GLX_USE_CSTUBS + VBoxOGL_DEFS += VBOX_OGL_GLX_USE_CSTUBS + endif +endif + +ifdef VBOX_WITH_WDDM + VBoxOGL_DEFS.win += VBOX_WITH_WDDM + VBoxOGL_SDKS.win += $(VBOX_WINDDK_GST_WLH) +endif + +ifeq ($(KBUILD_TARGET),win) +#fixme?, INTERMEDIATES.win ain't working + VBoxOGL_INTERMEDIATES += $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h + if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM) + VBoxOGL_INSTTYPE.win = none + VBoxOGL_DEBUG_INSTTYPE.win = both + endif +endif +ifdef VBoxOGL_DRI + VBoxOGL_INTERMEDIATES += \ + $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h \ + $(VBOX_PATH_CROGL_GENFILES)/DD_gl.h +else ifdef VBoxOGL_FAKEDRI + VBoxOGL_INTERMEDIATES += \ + $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h +endif +VBoxOGL_SOURCES += \ + load.c \ + stub.c \ + context.c \ + $(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c \ + $(VBOX_PATH_CROGL_GENFILES)/NULLfuncs.c \ + $(VBOX_PATH_CROGL_GENFILES)/tsfuncs.c + +if1of ($(KBUILD_TARGET), linux solaris freebsd) + VBoxOGL_SOURCES += \ + glx.c \ + xfont.c + ifdef VBOX_OGL_GLX_USE_CSTUBS + VBoxOGL_SOURCES += glx_c_exports.c + endif + + ifdef VBoxOGL_DRI + VBoxOGL_SOURCES += \ + $(VBOX_PATH_CROGL_GENFILES)/DD_gl.c \ + dri_drv.c + VBoxOGL_SOURCES.linux += \ + $(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm + VBoxOGL_SOURCES.solaris += \ + $(VBOX_PATH_CROGL_GENFILES)/solaris_exports_dri.asm + VBoxOGL_SOURCES.freebsd += \ + $(VBOX_PATH_CROGL_GENFILES)/freebsd_exports_dri.asm + else ifdef VBoxOGL_FAKEDRI + VBoxOGL_SOURCES += \ + fakedri_drv.c + ifndef VBOX_OGL_GLX_USE_CSTUBS + VBoxOGL_SOURCES.solaris += \ + $(VBOX_PATH_CROGL_GENFILES)/solaris_glxapi_exports.asm \ + $(VBOX_PATH_CROGL_GENFILES)/solaris_exports_dri.asm + VBoxOGL_SOURCES.linux += \ + $(VBOX_PATH_CROGL_GENFILES)/linux_glxapi_exports.asm \ + $(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm + VBoxOGL_SOURCES.freebsd += \ + $(VBOX_PATH_CROGL_GENFILES)/freebsd_glxapi_exports.asm \ + $(VBOX_PATH_CROGL_GENFILES)/freebsd_exports_dri.asm + else + VBoxOGL_SOURCES.solaris += \ + $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c + VBoxOGL_SOURCES.linux += \ + $(VBOX_PATH_CROGL_GENFILES)/linux_exports.c + VBoxOGL_SOURCES.freebsd += \ + $(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c + endif + else + VBoxOGL_SOURCES.linux += \ + $(VBOX_PATH_CROGL_GENFILES)/linux_exports.c + VBoxOGL_SOURCES.solaris += \ + $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c + VBoxOGL_SOURCES.freebsd += \ + $(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c + endif +endif + +VBoxOGL_SOURCES.win = \ + wgl.c \ + icd_drv.c \ + VBoxCROGL.rc \ + $(VBOX_PATH_CROGL_GENFILES)/windows_exports.asm \ + $(VBOX_PATH_CROGL_GENFILES)/cropengl.def +VBoxOGL_CLEAN = \ + $(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c \ + $(VBOX_PATH_CROGL_GENFILES)/NULLfuncs.c \ + $(VBOX_PATH_CROGL_GENFILES)/tsfuncs.c +VBoxOGL_CLEAN.linux += \ + $(VBOX_PATH_CROGL_GENFILES)/linux_exports.c +VBoxOGL_CLEAN.solaris += \ + $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c +VBoxOGL_CLEAN.win = \ + $(VBOX_PATH_CROGL_GENFILES)/windows_exports.asm \ + $(VBOX_PATH_CROGL_GENFILES)/cropengl.def +if1of ($(KBUILD_TARGET), linux solaris) + ifdef VBoxOGL_DRI + VBoxOGL_CLEAN += \ + $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h \ + $(VBOX_PATH_CROGL_GENFILES)/DD_gl.h \ + $(VBOX_PATH_CROGL_GENFILES)/DD_gl.c + else ifdef VBoxOGL_FAKEDRI + VBoxOGL_CLEAN += \ + $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h + VBoxOGL_CLEAN.linux += \ + $(VBOX_PATH_CROGL_GENFILES)/linux_glxapi_exports.asm + VBoxOGL_CLEAN.solaris += \ + $(VBOX_PATH_CROGL_GENFILES)/solaris_glxapi_exports.asm + endif +endif +# VBoxOGL_LIBS = \ # VBOX_LIB_OGL_CRUTIL includes these and caused an interesting conflict. +# $(VBOX_LIB_IPRT_GUEST_R3_SHARED) \ +# $(VBOX_LIB_VBGL_R3_SHARED) \ + +VBoxOGL_LIBS = \ + $(VBOX_LIB_OGL_CRUTIL) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) + +VBoxOGL_LIBS.win += \ + $(PATH_STAGE_LIB)/additions/VBoxDispMpLogger$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxWddmUmKmt$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxCrHgsmi$(VBOX_SUFF_LIB) + +if1of ($(KBUILD_TARGET), linux solaris freebsd) + ifdef VBOX_USE_SYSTEM_GL_HEADERS + VBoxOGL_LIBS += Xcomposite Xdamage Xfixes Xext + else + VBoxOGL_LIBS += \ + $(PATH_STAGE_LIB)/libXcomposite.so \ + $(PATH_STAGE_LIB)/libXdamage.so \ + $(PATH_STAGE_LIB)/libXfixes.so \ + $(PATH_STAGE_LIB)/libXext.so + endif + ifdef VBoxOGL_FAKEDRI + ifeq ($(KBUILD_TARGET), freebsd) + VBoxOGL_LIBS += \ + elf + else + VBoxOGL_LIBS += \ + dl + endif + else + VBoxOGL_SONAME.linux = libGL.so.1 + VBoxOGL_LDFLAGS.linux += -Wl,-e,LibMain + endif +endif +ifdef VBOX_WITH_CRHGSMI +VBoxOGL_DEFS.win += VBOX_WITH_CRHGSMI +endif +ifdef VBOX_WITH_WDDM +VBoxOGL_DEFS.win += VBOX_WITH_WDDM +endif +if1of ($(KBUILD_TARGET), linux) +VBoxOGL_LDFLAGS += -Wl,-z,nodelete +endif +ifdef VBOX_WITH_WDDM +# +# VBoxOGL-x86 - x86 VBoxOGL version built for amd64 build +# +VBoxOGL-x86_EXTENDS = VBoxOGL +VBoxOGL-x86_BLD_TRG_ARCH = x86 +VBoxOGL-x86_LIBS = $(VBOX_LIB_IPRT_GUEST_R3_SHARED_X86) \ + $(VBOX_LIB_VBGL_R3_SHARED_X86) \ + $(VBOX_LIB_OGL_CRUTIL_X86) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLspuload-x86$(VBOX_SUFF_LIB) + +VBoxOGL-x86_LIBS.win += \ + $(PATH_STAGE_LIB)/additions/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxWddmUmKmt-x86$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB) + + +VBoxOGL-x86_SOURCES.win = $(subst cropengl.def,cropengl-x86.def,$(VBoxOGL_SOURCES.win)) +VBoxOGL-x86_CLEAN.win = $(subst cropengl.def,cropengl-x86.def,$(VBoxOGL_CLEAN.win)) +VBoxOGL-x86_DEFS = $(VBoxOGL_DEFS) VBOX_WDDM_WOW64 +endif + +# +# Generate files for VBoxOGL. +# +$(VBOX_PATH_CROGL_GENFILES)/NULLfuncs.c: $(PATH_SUB_CURRENT)/NULLfuncs.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) + +$(VBOX_PATH_CROGL_GENFILES)/tsfuncs.c: $(PATH_SUB_CURRENT)/tsfuncs.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) + + +ifeq ($(KBUILD_TARGET),win) + # Windows +$(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c: $(PATH_SUB_CURRENT)/windows_getprocaddress.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) + + ifeq ($(KBUILD_TARGET_ARCH),amd64) +$(VBOX_PATH_CROGL_GENFILES)/cropengl.def: $(PATH_SUB_CURRENT)/defs64.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) + else +$(VBOX_PATH_CROGL_GENFILES)/cropengl.def: $(PATH_SUB_CURRENT)/defs.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) + endif + +$(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.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) + +$(VBOX_PATH_CROGL_GENFILES)/windows_exports.asm: \ + $(PATH_SUB_CURRENT)/windows_i386_exports.py \ + $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ + | $$(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_WDDM + ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64) +$(VBOX_PATH_CROGL_GENFILES)/cropengl-x86.def: $(PATH_SUB_CURRENT)/defs.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) + endif #ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64) + endif #ifdef VBOX_WITH_WDDM + + +else if1of ($(KBUILD_TARGET), freebsd linux solaris) + # FreeBSD, Linux, Solaris +$(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c: $(PATH_SUB_CURRENT)/getprocaddress.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) + + if !defined(VBoxOGL_DRI) && !defined(VBoxOGL_FAKEDRI) + ifeq ($(KBUILD_TARGET),solaris) +$(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c: \ + $(PATH_SUB_CURRENT)/SunOS_exports.py \ + $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ + | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) + + else ifeq ($(KBUILD_TARGET),freebsd) +$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c: \ + $(PATH_SUB_CURRENT)/FreeBSD_exports.py \ + $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ + | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) + + else +$(VBOX_PATH_CROGL_GENFILES)/linux_exports.c: \ + $(PATH_SUB_CURRENT)/Linux_exports.py \ + $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ + | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) + endif + + else ifdef VBoxOGL_DRI +$(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.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) + +$(VBOX_PATH_CROGL_GENFILES)/DD_gl.h: $(PATH_SUB_CURRENT)/DD_glh.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) + +$(VBOX_PATH_CROGL_GENFILES)/DD_gl.c: $(PATH_SUB_CURRENT)/DD_glc.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) + + ifeq ($(KBUILD_TARGET),solaris) +$(VBOX_PATH_CROGL_GENFILES)/solaris_exports_dri.asm: \ + $(PATH_SUB_CURRENT)/SunOS_i386_exports_dri.py \ + $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ + | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) + + else ifeq ($(KBUILD_TARGET),freebsd) +$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports_dri.asm: \ + $(PATH_SUB_CURRENT)/FreeBSD_i386_exports_dri.py \ + $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ + | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) + + else +$(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm: \ + $(PATH_SUB_CURRENT)/Linux_i386_exports_dri.py \ + $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ + | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) + endif + + else ifdef VBoxOGL_FAKEDRI +$(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.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) + + ifndef VBOX_OGL_GLX_USE_CSTUBS + ifeq ($(KBUILD_TARGET),solaris) +$(VBOX_PATH_CROGL_GENFILES)/solaris_exports_dri.asm: \ + $(PATH_SUB_CURRENT)/SunOS_i386_exports_dri.py \ + $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ + | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) +$(VBOX_PATH_CROGL_GENFILES)/solaris_glxapi_exports.asm: $(PATH_SUB_CURRENT)/SunOS_i386_glxapi_exports.py | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< + + else +$(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm: \ + $(PATH_SUB_CURRENT)/Linux_i386_exports_dri.py \ + $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ + | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) +$(VBOX_PATH_CROGL_GENFILES)/linux_glxapi_exports.asm: $(PATH_SUB_CURRENT)/Linux_i386_glxapi_exports.py | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< + endif + + else + ifeq ($(KBUILD_TARGET),solaris) +$(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c: \ + $(PATH_SUB_CURRENT)/SunOS_exports.py \ + $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ + | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) + + else ifeq ($(KBUILD_TARGET),freebsd) +$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c: \ + $(PATH_SUB_CURRENT)/FreeBSD_exports.py \ + $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ + | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) + else +$(VBOX_PATH_CROGL_GENFILES)/linux_exports.c: \ + $(PATH_SUB_CURRENT)/Linux_exports.py \ + $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ + | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) + endif + + endif # VBOX_OGL_GLX_USE_CSTUBS + endif +endif + +# +# VBoxOGLarrayspu +# +VBoxOGLarrayspu_TEMPLATE = VBOXCROGLR3GUESTDLL +VBoxOGLarrayspu_INCS = \ + array \ + $(VBOX_GRAPHICS_INCS) +if1of ($(KBUILD_TARGET), linux solaris freebsd) + VBoxOGLarrayspu_INCS += \ + $(VBOX_GL_INCS) +endif +if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM) + VBoxOGLarrayspu_INSTTYPE.win = none + VBoxOGLarrayspu_DEBUG_INSTTYPE.win = both +endif +VBoxOGLarrayspu_INCS.darwin += $(PATH_OUT)/obj/VBoxOGL +VBoxOGLarrayspu_INTERMEDIATES = \ + $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \ + $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h +VBoxOGLarrayspu_SOURCES = \ + array/arrayspu.c \ + array/arrayspu_config.c \ + array/arrayspu_init.c +VBoxOGLarrayspu_SOURCES.win = \ + array/arrayspu.def \ + array/arrayspu.rc +VBoxOGLarrayspu_LIBS = \ + $(VBOX_LIB_OGL_CRUTIL) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate$(VBOX_SUFF_LIB) +ifdef VBOX_WITH_CRHGSMI +VBoxOGLarrayspu_DEFS.win += VBOX_WITH_CRHGSMI +endif +ifdef VBOX_WITH_WDDM +VBoxOGLarrayspu_DEFS.win += VBOX_WITH_WDDM +endif + +ifdef VBOX_WITH_WDDM +# +# VBoxOGLarrayspu-x86 - x86 version of VBoxOGLarrayspu built for amd64 build +# +VBoxOGLarrayspu-x86_EXTENDS = VBoxOGLarrayspu +VBoxOGLarrayspu-x86_BLD_TRG_ARCH = x86 +VBoxOGLarrayspu-x86_LIBS = $(VBOX_LIB_OGL_CRUTIL_X86) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLspuload-x86$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate-x86$(VBOX_SUFF_LIB) +VBoxOGLarrayspu-x86_DEFS = $(VBoxOGLarrayspu_DEFS) VBOX_WDDM_WOW64 +endif + +# +# VBoxOGLpassthroughspu +# +VBoxOGLpassthroughspu_TEMPLATE = VBOXCROGLR3GUESTDLL +VBoxOGLpassthroughspu_INCS = \ + passthrough \ + $(VBOX_GRAPHICS_INCS) +if1of ($(KBUILD_TARGET), linux solaris freebsd) + VBoxOGLpassthroughspu_INCS += \ + $(VBOX_GL_INCS) +endif +if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM) + VBoxOGLpassthroughspu_INSTTYPE.win = none + VBoxOGLpassthroughspu_DEBUG_INSTTYPE.win = both +endif +VBoxOGLpassthroughspu_SOURCES = \ + passthrough/passthroughspu_init.c \ + $(VBOX_PATH_CROGL_GENFILES)/passthroughspu.c +VBoxOGLpassthroughspu_SOURCES.win = \ + passthrough/passthrough.def \ + passthrough/passthroughspu.rc +VBoxOGLpassthroughspu_CLEAN = \ + $(VBOX_PATH_CROGL_GENFILES)/passthroughspu.c +VBoxOGLpassthroughspu_LIBS = \ + $(VBOX_LIB_OGL_CRUTIL) +ifdef VBOX_WITH_CRHGSMI +VBoxOGLpassthroughspu_DEFS.win += VBOX_WITH_CRHGSMI +endif +ifdef VBOX_WITH_WDDM +VBoxOGLpassthroughspu_DEFS.win += VBOX_WITH_WDDM +endif + +ifdef VBOX_WITH_WDDM +# +# VBoxOGLpassthroughspu-x86 - x86 version of VBoxOGLpassthroughspu built for amd64 build +# +VBoxOGLpassthroughspu-x86_EXTENDS = VBoxOGLpassthroughspu +VBoxOGLpassthroughspu-x86_BLD_TRG_ARCH = x86 +VBoxOGLpassthroughspu-x86_LIBS = $(VBOX_LIB_OGL_CRUTIL_X86) +VBoxOGLpassthroughspu-x86_DEFS = $(VBoxOGLpassthroughspu_DEFS) VBOX_WDDM_WOW64 +endif + +# +# Generate files for VBoxOGLpassthroughspu. +# +$(VBOX_PATH_CROGL_GENFILES)/passthroughspu.c: $(PATH_SUB_CURRENT)/passthrough/passthrough.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) + +# +# VBoxOGLpackspu +# +VBoxOGLpackspu_TEMPLATE = VBOXCROGLR3GUESTDLL +VBoxOGLpackspu_DEFS = TRACKS_STATE=1 PACKS=1 +VBoxOGLpackspu_INCS = \ + pack \ + $(VBOX_GRAPHICS_INCS) +if1of ($(KBUILD_TARGET), linux solaris freebsd) + VBoxOGLpackspu_INCS += \ + $(VBOX_GL_INCS) +endif +if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM) + VBoxOGLpackspu_INSTTYPE.win = none + VBoxOGLpackspu_DEBUG_INSTTYPE.win = both +endif +VBoxOGLpackspu_INTERMEDIATES = \ + $(VBOX_PATH_CROGL_GENFILES)/packspu_proto.h \ + $(VBOX_PATH_CROGL_GENFILES)/cr_packfunctions.h +VBoxOGLpackspu_SOURCES = \ + pack/packspu_bufferobject.c \ + pack/packspu_client.c \ + pack/packspu_config.c \ + pack/packspu_context.c \ + pack/packspu_getstring.c \ + pack/packspu_init.c \ + pack/packspu_misc.c \ + pack/packspu_net.c \ + pack/packspu_swapbuf.c \ + pack/packspu_pixel.c \ + pack/packspu_texture.c \ + pack/packspu_getshaders.c \ + pack/packspu_glsl.c \ + pack/packspu_framebuffer.c \ + $(VBOX_PATH_CROGL_GENFILES)/packspu.c \ + $(VBOX_PATH_CROGL_GENFILES)/packspu_get.c \ + $(VBOX_PATH_CROGL_GENFILES)/packspu_flush.c \ + $(VBOX_PATH_CROGL_GENFILES)/packspu_beginend.c +VBoxOGLpackspu_SOURCES.win = \ + pack/pack.def \ + pack/packspu.rc +VBoxOGLpackspu_CLEAN = \ + $(VBOX_PATH_CROGL_GENFILES)/packspu_proto.h \ + $(VBOX_PATH_CROGL_GENFILES)/packspu.c \ + $(VBOX_PATH_CROGL_GENFILES)/packspu_get.c \ + $(VBOX_PATH_CROGL_GENFILES)/packspu_flush.c \ + $(VBOX_PATH_CROGL_GENFILES)/packspu_beginend.c +VBoxOGLpackspu_LIBS = \ + $(VBOX_LIB_OGL_CRUTIL) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLcrpacker$(VBOX_SUFF_LIB) +VBoxOGLpackspu_LIBS.win += \ + $(PATH_STAGE_LIB)/additions/VBoxDispMpLogger$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxWddmUmKmt$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxCrHgsmi$(VBOX_SUFF_LIB) + +ifdef VBOX_WITH_CRHGSMI +VBoxOGLpackspu_DEFS.win += VBOX_WITH_CRHGSMI +endif +ifdef VBOX_WITH_CRDUMPER +VBoxOGLpackspu_DEFS += VBOX_WITH_CRDUMPER +endif +ifdef VBOX_WITH_CRPACKSPU_DUMPER +VBoxOGLpackspu_DEFS += VBOX_WITH_CRPACKSPU_DUMPER +endif +ifdef VBOX_WITH_WDDM +VBoxOGLpackspu_DEFS.win += VBOX_WITH_WDDM +endif + +ifdef VBOX_WITH_WDDM +# +# VBoxOGLpackspu-x86 - x86 version of VBoxOGLpackspu built for amd64 build +# +VBoxOGLpackspu-x86_EXTENDS = VBoxOGLpackspu +VBoxOGLpackspu-x86_BLD_TRG_ARCH = x86 +VBoxOGLpackspu-x86_LIBS = $(VBOX_LIB_OGL_CRUTIL_X86) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLspuload-x86$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate-x86$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLcrpacker-x86$(VBOX_SUFF_LIB) +VBoxOGLpackspu-x86_LIBS.win += \ + $(PATH_STAGE_LIB)/additions/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxWddmUmKmt-x86$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB) +VBoxOGLpackspu-x86_DEFS = $(VBoxOGLpackspu_DEFS) VBOX_WDDM_WOW64 +endif + +# +# Generate files for VBoxOGLpackspu. +# +$(VBOX_PATH_CROGL_GENFILES)/packspu.c: $(addprefix $(PATH_SUB_CURRENT)/pack/,pack.py packspu_special packspu_unimplemented_special) $(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) $(<D) + +$(VBOX_PATH_CROGL_GENFILES)/packspu_get.c: $(PATH_SUB_CURRENT)/pack/packspu_get.py $(PATH_SUB_CURRENT)/pack/packspu_special $(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib/get_sizes.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) $(<D) + +$(VBOX_PATH_CROGL_GENFILES)/packspu_flush.c: $(PATH_SUB_CURRENT)/pack/packspu_flush.py $(PATH_SUB_CURRENT)/pack/packspu_flush_special $(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) $(<D) + +$(VBOX_PATH_CROGL_GENFILES)/packspu_beginend.c: $(PATH_SUB_CURRENT)/pack/packspu_beginend.py $(PATH_SUB_CURRENT)/pack/packspu_vertex_special $(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) $(<D) + +$(VBOX_PATH_CROGL_GENFILES)/packspu_proto.h: $(addprefix $(PATH_SUB_CURRENT)/pack/,packspu_proto.py packspu_special packspu_unimplemented_special) $(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) $(<D) + +# +# VBoxOGLfeedbackspu +# +VBoxOGLfeedbackspu_TEMPLATE = VBOXCROGLR3GUESTDLL +VBoxOGLfeedbackspu_INCS = \ + feedback \ + $(VBOX_GRAPHICS_INCS) +if1of ($(KBUILD_TARGET), linux solaris freebsd) + VBoxOGLfeedbackspu_INCS += \ + $(VBOX_GL_INCS) +endif +if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM) + VBoxOGLfeedbackspu_INSTTYPE.win = none + VBoxOGLfeedbackspu_DEBUG_INSTTYPE.win = both +endif +VBoxOGLarrayspu_INTERMEDIATES = \ + $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_proto.h +VBoxOGLfeedbackspu_SOURCES = \ + feedback/feedbackspu_config.c \ + feedback/feedbackspu_init.c \ + feedback/feedback_context.c \ + $(VBOX_PATH_CROGL_GENFILES)/feedbackspu.c \ + $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_state.c +VBoxOGLfeedbackspu_SOURCES.win = \ + feedback/feedback.def \ + feedback/feedbackspu.rc +VBoxOGLfeedbackspu_CLEAN = \ + $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_proto.h \ + $(VBOX_PATH_CROGL_GENFILES)/feedbackspu.c \ + $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_state.c +VBoxOGLfeedbackspu_LIBS = \ + $(VBOX_LIB_OGL_CRUTIL) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate$(VBOX_SUFF_LIB) +ifdef VBOX_WITH_CRHGSMI +VBoxOGLfeedbackspu_DEFS.win += VBOX_WITH_CRHGSMI +endif +ifdef VBOX_WITH_WDDM +VBoxOGLfeedbackspu_DEFS.win += VBOX_WITH_WDDM +endif + +ifdef VBOX_WITH_WDDM +# +# VBoxOGLfeedbackspu-x86 - x86 version of VBoxOGLfeedbackspu built for amd64 build +# +VBoxOGLfeedbackspu-x86_EXTENDS = VBoxOGLfeedbackspu +VBoxOGLfeedbackspu-x86_BLD_TRG_ARCH = x86 +VBoxOGLfeedbackspu-x86_LIBS = $(VBOX_LIB_OGL_CRUTIL_X86) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLspuload-x86$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/additions/VBoxOGLcrstate-x86$(VBOX_SUFF_LIB) +VBoxOGLfeedbackspu-x86_DEFS = $(VBoxOGLfeedbackspu_DEFS) VBOX_WDDM_WOW64 +endif + +# +# Generate files for VBoxOGLfeedbackspu. +# +$(VBOX_PATH_CROGL_GENFILES)/feedbackspu.c: $(addprefix $(PATH_SUB_CURRENT)/feedback/,feedback.py feedback_special select_special feedback_state_special) $(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) $(<D) + +$(VBOX_PATH_CROGL_GENFILES)/feedbackspu_state.c: $(addprefix $(PATH_SUB_CURRENT)/feedback/,feedback_state.py feedback_state_special) $(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) $(<D) + +$(VBOX_PATH_CROGL_GENFILES)/feedbackspu_proto.h: $(addprefix $(PATH_SUB_CURRENT)/feedback/,feedbackspu_proto.py feedback_special select_special feedback_state_special) $(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) $(<D) + +VBoxEGL_TEMPLATE = VBOXCROGLR3GUESTDLL +VBoxEGL_SOURCES = egl.c +ifndef VBOX_USE_SYSTEM_GL_HEADERS + VBoxEGL_INCS = $(VBOX_PATH_X11_ROOT)/mesa-11.0.7 +endif +VBoxEGL_LIBS = $(VBOX_LIB_OGL) # $(VBOX_LIB_IPRT_GUEST_R3_SHARED) +VBoxEGL_SONAME.linux = libEGL.so.1 + +include $(FILE_KBUILD_SUB_FOOTER) + |