# $Id: Makefile.kmk 17575 2009-03-09 13:34:28Z vboxsync $ ## @file # Sub-Makefile for the VirtualBox Guest OpenGL part # # # 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. # BLDDIRS += \ $(VBOX_PATH_CROGL_GENFILES)/ DLLS.win += \ VBoxOGL \ VBoxOGLarrayspu \ VBoxOGLpassthroughspu \ VBoxOGLpackspu \ VBoxOGLfeedbackspu ifndef VBOX_OSE ## @todo Solaris too? DLLS.linux += \ VBoxOGL \ VBoxOGLarrayspu \ VBoxOGLpassthroughspu \ VBoxOGLpackspu \ VBoxOGLfeedbackspu endif ifeq ($(KBUILD_TARGET),linux) VBoxOGL_DRI = 1 VBOX_PATH_MESA_SOURCE = $(VBOX_PATH_X11_ROOT)/mesa-7.2 endif # # VBoxOGL # VBoxOGL_TEMPLATE = VBOXCROGLR3GUESTDLL VBoxOGL_INCS = . VBoxOGL_INCS.linux = \ $(VBOX_PATH_X11_ROOT)/libXdamage-1.1 \ $(VBOX_PATH_X11_ROOT)/libXcomposite-0.4.0 \ $(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 ifdef VBoxOGL_DRI VBoxOGL_DEFS += VBOXOGL_DRI IN_DRI_DRIVER VBoxOGL_INCS += \ $(VBOX_PATH_MESA_SOURCE) \ $(VBOX_PATH_MESA_SOURCE)/include \ $(VBOX_PATH_MESA_SOURCE)/src/mesa/ \ $(VBOX_PATH_MESA_SOURCE)/src/mesa/glapi \ $(VBOX_PATH_MESA_SOURCE)/src/mesa/main \ $(PATH_ROOT)/src/VBox/Additions/x11/x11include/libdrm-2.4.5 endif ifeq ($(KBUILD_TARGET),win) #fixme?, INTERMEDIATES.win ain't working VBoxOGL_INTERMEDIATES += $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h endif ifdef VBoxOGL_DRI VBoxOGL_INTERMEDIATES += \ $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h \ $(VBOX_PATH_CROGL_GENFILES)/DD_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 VBoxOGL_SOURCES.linux = \ glx.c \ xfont.c \ $(VBOX_PATH_CROGL_GENFILES)/linux_exports.asm ifdef VBoxOGL_DRI VBoxOGL_SOURCES.linux += \ $(VBOX_PATH_CROGL_GENFILES)/DD_gl.c \ dri_drv.c 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.asm VBoxOGL_CLEAN.win = \ $(VBOX_PATH_CROGL_GENFILES)/windows_exports.asm \ $(VBOX_PATH_CROGL_GENFILES)/cropengl.def ifdef VBoxOGL_DRI VBoxOGL_CLEAN.linux += \ $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h \ $(VBOX_PATH_CROGL_GENFILES)/DD_gl.h \ $(VBOX_PATH_CROGL_GENFILES)/DD_gl.c endif VBoxOGL_LIBS = \ $(VBOX_LIB_IPRT_GUEST_R3) \ $(VBOX_LIB_VBGL_R3) \ $(VBOX_LIB_OGL_CRUTIL) \ $(PATH_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) if1of ($(KBUILD_TARGET),linux solaris) VBoxOGL_LIBS += \ Xcomposite endif # # Generate files for VBoxOGL. # $(VBOX_PATH_CROGL_GENFILES)/NULLfuncs.c: $(PATH_SUB_CURRENT)/NULLfuncs.py $(VBOX_CROGL_API_FILES) | $$(dir $$@) $(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 VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) ifeq ($(KBUILD_TARGET),win) $(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c: $(PATH_SUB_CURRENT)/windows_getprocaddress.py $(VBOX_CROGL_API_FILES) | $$(dir $$@) $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(VBOX_PATH_CROGL_GENFILES)/cropengl.def: $(PATH_SUB_CURRENT)/defs.py $(VBOX_CROGL_API_FILES) | $$(dir $$@) $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.py $(VBOX_CROGL_API_FILES) | $$(dir $$@) $(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 VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) else ifeq ($(KBUILD_TARGET),linux) ifndef VBoxOGL_DRI $(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c: $(PATH_SUB_CURRENT)/getprocaddress.py $(VBOX_CROGL_API_FILES) | $$(dir $$@) $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(VBOX_PATH_CROGL_GENFILES)/linux_exports.asm: \ $(PATH_SUB_CURRENT)/Linux_i386_exports.py \ $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ | $$(dir $$@) $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) else $(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c: $(PATH_SUB_CURRENT)/getprocaddress_dri.py $(VBOX_CROGL_API_FILES) | $$(dir $$@) $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.py $(VBOX_CROGL_API_FILES) | $$(dir $$@) $(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 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 VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(VBOX_PATH_CROGL_GENFILES)/linux_exports.asm: \ $(PATH_SUB_CURRENT)/Linux_i386_exports_dri.py \ $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ | $$(dir $$@) $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) endif endif # # VBoxOGLarrayspu # VBoxOGLarrayspu_TEMPLATE = VBOXCROGLR3GUESTDLL VBoxOGLarrayspu_INCS = \ array 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 VBoxOGLarrayspu_LIBS = \ $(VBOX_LIB_OGL_CRUTIL) \ $(PATH_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) \ $(PATH_LIB)/additions/VBoxOGLcrstate$(VBOX_SUFF_LIB) # # VBoxOGLpassthroughspu # VBoxOGLpassthroughspu_TEMPLATE = VBOXCROGLR3GUESTDLL VBoxOGLpassthroughspu_INCS = \ passthrough VBoxOGLpassthroughspu_SOURCES = \ passthrough/passthroughspu_init.c \ $(VBOX_PATH_CROGL_GENFILES)/passthroughspu.c VBoxOGLpassthroughspu_SOURCES.win = \ passthrough/passthrough.def VBoxOGLpassthroughspu_CLEAN = \ $(VBOX_PATH_CROGL_GENFILES)/passthroughspu.c VBoxOGLpassthroughspu_LIBS = \ $(VBOX_LIB_OGL_CRUTIL) # # Generate files for VBoxOGLpassthroughspu. # $(VBOX_PATH_CROGL_GENFILES)/passthroughspu.c: $(PATH_SUB_CURRENT)/passthrough/passthrough.py $(VBOX_CROGL_API_FILES) | $$(dir $$@) $(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 VBoxOGLpackspu_INTERMEDIATES = \ $(VBOX_PATH_CROGL_GENFILES)/packspu_proto.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 \ $(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 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_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) \ $(PATH_LIB)/additions/VBoxOGLcrstate$(VBOX_SUFF_LIB) \ $(PATH_LIB)/additions/VBoxOGLcrpacker$(VBOX_SUFF_LIB) # # 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 VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(