Makefile.kmk revision b3f6d0c73da7aa2a12f85cf9bbf81014d1cec574
# $Id$
## @file
# Sub-Makefile for the VirtualBox Guest/Host 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)/ \
$(VBOX_PATH_CROGL_GENFILES)/state/
ifdef VBOX_WITH_ADDITIONS
DLLS += VBoxOGLcrutil VBoxOGLerrorspu
LIBRARIES += VBoxOGLcrpacker VBoxOGLspuload VBoxOGLcrstate
endif
ifndef VBOX_ONLY_ADDITIONS
DLLS += VBoxOGLhostcrutil VBoxOGLhosterrorspu
LIBRARIES += VBoxOGLhostcrpacker VBoxOGLhostspuload VBoxOGLhostcrstate
endif
#
# Globals
#
if1of ($(KBUILD_HOST), win)
VBOX_CROGL_GUEST_HOST_PYTHONPATH := $(VBOX_PATH_CROGL_GLAPI);$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer;$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
else
VBOX_CROGL_GUEST_HOST_PYTHONPATH := $(VBOX_PATH_CROGL_GLAPI):$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer:$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
endif
#
# OpenGL templates.
#
## @todo r=bird: Most of the keywords are overridden here... check each and why. r42044 fixed did the wrong fix it seems - the cyclic refs were backres to the super class.
## VBOXCROGLR3HOST ##
TEMPLATE_VBOXCROGLR3HOST = VBox OpenGL Host DLLs/Libraries
TEMPLATE_VBOXCROGLR3HOST_EXTENDS = VBOXR3NP
TEMPLATE_VBOXCROGLR3HOST_DEFS = $(TEMPLATE_VBOXR3NP_DEFS) CHROMIUM_THREADSAFE VBOX_WITH_HGCM UNPACKS
TEMPLATE_VBOXCROGLR3HOST_DEFS.win = _WIN32_WINNT=0x0500 WINDOWS=1
TEMPLATE_VBOXCROGLR3HOST_DEFS.linux = Linux=1
TEMPLATE_VBOXCROGLR3HOST_DEFS.solaris = SunOS=1 GLEXT_64_TYPES_DEFINED
TEMPLATE_VBOXCROGLR3HOST_DEFS.darwin = DARWIN=1 GL_GLEXT_LEGACY
TEMPLATE_VBOXCROGLR3HOST_INCS = $(VBOX_PATH_CROGL_INCLUDE) $(VBOX_PATH_CROGL_GENFILES)
TEMPLATE_VBOXCROGLR3HOST_SDKS.darwin = $(VBOXR3NP_SDKS.darwin) DARWIN-OPENGL
TEMPLATE_VBOXCROGLR3HOST_LDFLAGS.darwin = -framework Carbon -framework OpenGL -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
TEMPLATE_VBOXCROGLR3HOST_LDFLAGS.linux = $(TEMPLATE_VBOXR3NP_LDFLAGS.linux) -Wl,--no-as-needed
TEMPLATE_VBOXCROGLR3HOST_BLDDIRS = $(VBOX_PATH_CROGL_GENFILES)/
## VBOXCROGLR3GUESTDLL ##
TEMPLATE_VBOXCROGLR3GUESTDLL = VBox OpenGL Guest DLLs
TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS = VBOXGUESTR3NPDLL
TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS = $(TEMPLATE_VBOXGUESTR3NPDLL_DEFS) CHROMIUM_THREADSAFE VBOX_WITH_HGCM
TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.win = _WIN32_WINNT=0x0500 WINDOWS=1
TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.linux = Linux=1
TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.solaris = SunOS=1 GLEXT_64_TYPES_DEFINED
TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.darwin = DARWIN=1 GL_GLEXT_LEGACY
TEMPLATE_VBOXCROGLR3GUESTDLL_INCS = $(VBOX_PATH_CROGL_INCLUDE) $(VBOX_PATH_CROGL_GENFILES)
TEMPLATE_VBOXCROGLR3GUESTDLL_SDKS.darwin = $(VBOXGUESTR3NPDLL_SDKS.darwin) DARWIN-OPENGL
TEMPLATE_VBOXCROGLR3GUESTDLL_LDFLAGS.darwin = -framework Carbon -framework OpenGL -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
TEMPLATE_VBOXCROGLR3GUESTDLL_BLDDIRS = $(VBOX_PATH_CROGL_GENFILES)/
## VBOXCROGLR3GUESTLIB ##
TEMPLATE_VBOXCROGLR3GUESTLIB = VBox OpenGL Guest Libraries
TEMPLATE_VBOXCROGLR3GUESTLIB_EXTENDS = VBOXCROGLR3GUESTDLL
TEMPLATE_VBOXCROGLR3GUESTLIB_INST = $(INST_ADDITIONS_LIB)
#
# VBoxOGLcrutil
#
VBoxOGLcrutil_TEMPLATE = VBOXCROGLR3GUESTDLL
VBoxOGLcrutil_SDKS.win = DXSDK
VBoxOGLcrutil_INTERMEDIATES = $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h
VBoxOGLcrutil_SOURCES = \
$(VBOX_PATH_CROGL_GENFILES)/debug_opcodes.c
$(PATH_SDK_DXSDK_LIB)/ddraw.lib \
$(PATH_SDK_DXSDK_LIB)/dxguid.lib
VBoxOGLcrutil_CLEAN = \
$(VBOX_PATH_CROGL_GENFILES)/debug_opcodes.c
# vc7 hangs during compilation of this file when optimizations are enabled.
#
# VBoxOGLhostcrutil
#
VBoxOGLhostcrutil_EXTENDS = VBoxOGLcrutil
VBoxOGLhostcrutil_TEMPLATE = VBOXCROGLR3HOST
-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLhostcrutil.dylib \
-current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
## @todo kBuild bug, possibly same as ticket #51: PATH_SDK_DXSDK_LIB is expanded too early.
# Update. bug 51 was fixed.
# Still fails as PATH_SDK_DXSDK_LIB is empty.
## @todo kBuild: recheck this (note to self).
VBoxOGLhostcrutil_LIBS = $(LIB_RUNTIME)
#
# 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 VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
#
# VBoxOGLcrpacker
#
VBoxOGLcrpacker_TEMPLATE = VBOXCROGLR3GUESTLIB
VBoxOGLcrpacker_INCS = \
packer
VBoxOGLcrpacker_INTERMEDIATES = \
$(VBOX_PATH_CROGL_GENFILES)/cr_packfunctions.h \
$(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
$(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
$(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h
VBoxOGLcrpacker_SOURCES = \
$(VBOX_PATH_CROGL_GENFILES)/pack_arrays_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_bounds_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_bufferobject_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_client_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_clipplane_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_fog_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_lights_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_materials_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_matrices_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_misc_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_pixels_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_point_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_program_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_regcombiner_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_stipple_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_bbox.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_current.c \
$(VBOX_PATH_CROGL_GENFILES)/packer.c
VBoxOGLcrpacker_CLEAN = \
$(VBOX_PATH_CROGL_GENFILES)/pack_arrays_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_bounds_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_bufferobject_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_client_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_clipplane_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_fog_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_lights_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_materials_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_matrices_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_misc_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_pixels_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_point_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_program_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_regcombiner_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_stipple_swap.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_bbox.c \
$(VBOX_PATH_CROGL_GENFILES)/pack_current.c \
$(VBOX_PATH_CROGL_GENFILES)/packer.c \
$(VBOX_PATH_CROGL_GENFILES)/cr_packfunctions.h \
$(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
$(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h
## @todo r=bird: Why does a library target have LIBS?
ifeq ($(KBUILD_TARGET),win)
VBoxOGLcrpacker_LIBS = \
$(PATH_OBJ)/VBoxOGLcrutil/VBoxOGLcrutil$(VBOX_SUFF_LIB)
else
VBoxOGLcrpacker_LIBS = \
$(VBOX_PATH_ADDITIONS)/VBoxOGLcrutil$(VBOX_SUFF_DLL)
endif
#
# VBoxOGLhostcrpacker
#
VBoxOGLhostcrpacker_EXTENDS = VBoxOGLcrpacker
VBoxOGLhostcrpacker_TEMPLATE = VBOXCROGLR3HOST
## @todo r=bird: Why does a library target have LIBS?
ifeq ($(KBUILD_TARGET),win)
VBoxOGLhostcrpacker_LIBS = \
$(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB)
else
VBoxOGLhostcrpacker_LIBS = \
$(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
endif
#
# Generate files for VBoxOGLcrpacker and VBoxOGLhostcrpacker.
#
$(VBOX_PATH_CROGL_GENFILES)/packer.def: $(PATH_SUB_CURRENT)/packer/packer_defs.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
$(VBOX_PATH_CROGL_GENFILES)/cr_packfunctions.h: $(PATH_SUB_CURRENT)/packer/pack_header.py $(PATH_SUB_CURRENT)/packer/packer_special $(API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
$(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h: $(PATH_SUB_CURRENT)/packer/opcodes.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
$(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h: $(PATH_SUB_CURRENT)/packer/pack_currentheader.py $(PATH_SUB_CURRENT)/packer/pack_currenttypes.py | $$(dir $(VBOX_PATH_CROGL_GENFILES)) $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $<
$(VBOX_PATH_CROGL_GENFILES)/packer.c: $(PATH_SUB_CURRENT)/packer/packer.py $(PATH_SUB_CURRENT)/packer/packer_special $(VBOX_CROGL_API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
$(VBOX_PATH_CROGL_GENFILES)/pack_bbox.c: $(PATH_SUB_CURRENT)/packer/packer_bbox.py | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
$(VBOX_PATH_CROGL_GENFILES)/pack_current.c: $(PATH_SUB_CURRENT)/packer/pack_current.py $(PATH_SUB_CURRENT)/packer/pack_currenttypes.py | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $<
$(VBOX_PATH_CROGL_GENFILES)/%_swap.c: $(PATH_SUB_CURRENT)/packer/%.c $(PATH_SUB_CURRENT)/packer/pack_swap.py | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/pack_swap.py $<
#
# VBoxOGLspuload
#
VBoxOGLspuload_TEMPLATE = VBOXCROGLR3GUESTLIB
## @todo r=bird: Why is this not an INTERMEDIATE?
VBoxOGLspuload_DEPS = \
$(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h
VBoxOGLspuload_SOURCES = \
$(VBOX_PATH_CROGL_GENFILES)/spuchange.c \
$(VBOX_PATH_CROGL_GENFILES)/spucopy.c \
$(VBOX_PATH_CROGL_GENFILES)/dispatch.c \
$(VBOX_PATH_CROGL_GENFILES)/glloader.c
VBoxOGLspuload_CLEAN = \
$(VBOX_PATH_CROGL_GENFILES)/spuchange.c \
$(VBOX_PATH_CROGL_GENFILES)/spucopy.c \
$(VBOX_PATH_CROGL_GENFILES)/dispatch.c \
$(VBOX_PATH_CROGL_GENFILES)/glloader.c \
$(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h
ifeq ($(KBUILD_TARGET),win)
VBoxOGLspuload_LIBS = \
$(PATH_OBJ)/VBoxOGLcrutil/VBoxOGLcrutil$(VBOX_SUFF_LIB)
else
VBoxOGLspuload_LIBS = \
$(VBOX_PATH_ADDITIONS)/VBoxOGLcrutil$(VBOX_SUFF_DLL)
endif
#
# VBoxOGLspuload
#
VBoxOGLhostspuload_EXTENDS = VBoxOGLspuload
VBoxOGLhostspuload_TEMPLATE = VBOXCROGLR3HOST
ifeq ($(KBUILD_TARGET),win)
$(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB)
else
VBoxOGLhostspuload_LIBS += \
$(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
endif
#
# Generate files for VBoxOGLspuload and VBoxOGLspuload.
#
$(VBOX_PATH_CROGL_GENFILES)/dispatch.c: $(PATH_SUB_CURRENT)/spu_loader/dispatch.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
$(VBOX_PATH_CROGL_GENFILES)/spucopy.c: $(PATH_SUB_CURRENT)/spu_loader/spucopy.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
$(VBOX_PATH_CROGL_GENFILES)/spuchange.c: $(PATH_SUB_CURRENT)/spu_loader/spuchange.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
$(VBOX_PATH_CROGL_GENFILES)/glloader.c: $(PATH_SUB_CURRENT)/spu_loader/glloader.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
$(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h: $(PATH_SUB_CURRENT)/spu_loader/dispatchheader.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
#
# VBoxOGLcrstate
#
VBoxOGLcrstate_TEMPLATE = VBOXCROGLR3GUESTLIB
VBoxOGLcrstate_INCS = \
state_tracker
VBoxOGLcrstate_INTERMEDIATES = \
$(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
VBoxOGLcrstate_SOURCES = \
$(VBOX_PATH_CROGL_GENFILES)/state_buffer_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_current_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_fog_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_hint_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_lighting_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_line_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_multisample_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_point_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_polygon_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_regcombiner_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_stencil_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_viewport_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_get.c \
$(VBOX_PATH_CROGL_GENFILES)/state_isenabled.c
VBoxOGLcrstate_CLEAN = \
$(VBOX_PATH_CROGL_GENFILES)/state_buffer_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_current_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_fog_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_hint_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_lighting_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_line_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_multisample_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_point_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_polygon_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_regcombiner_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_stencil_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_viewport_gen.c \
$(VBOX_PATH_CROGL_GENFILES)/state_get.c \
$(VBOX_PATH_CROGL_GENFILES)/state_isenabled.c \
$(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
ifeq ($(KBUILD_TARGET),win)
VBoxOGLcrstate_LIBS = \
$(PATH_OBJ)/VBoxOGLcrutil/VBoxOGLcrutil$(VBOX_SUFF_LIB) \
$(PATH_LIB)/VBoxOGLspuload$(VBOX_SUFF_LIB)
else
VBoxOGLcrstate_LIBS = \
$(VBOX_PATH_ADDITIONS)/VBoxOGLcrutil$(VBOX_SUFF_DLL) \
$(VBOX_PATH_ADDITIONS)/VBoxOGLspuload$(VBOX_SUFF_DLL)
endif
#
# VBoxOGLhostcrstate
#
VBoxOGLhostcrstate_EXTENDS = VBoxOGLcrstate
VBoxOGLhostcrstate_TEMPLATE = VBOXCROGLR3HOST
VBoxOGLhostcrstate_SOURCES = \
$(VBoxOGLcrstate_SOURCES) \
ifeq ($(KBUILD_TARGET),win)
VBoxOGLhostcrstate_LIBS = \
$(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB) \
$(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
$(LIB_VMM)
else
VBoxOGLhostcrstate_LIBS = \
$(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL) \
$(PATH_BIN)/VBoxOGLhostspuload$(VBOX_SUFF_DLL) \
$(LIB_VMM)
endif
#
# Generate files for VBoxOGLcrstate and VBoxOGLhostcrstate.
#
$(VBOX_PATH_CROGL_GENFILES)/state_buffer_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_buffer.txt gendiffcode.py) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py buffer Buffer $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state_client_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_client.txt gendiffcode.py) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py client Client $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state_current_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_current.py convert.py) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/state_current.py
$(VBOX_PATH_CROGL_GENFILES)/state_fog_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_fog.txt gendiffcode.py) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py fog Fog $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state_hint_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_hint.txt gendiffcode.py) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py hint Hint $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state_lighting_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_lighting.txt gendiffcode.py) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py lighting Lighting $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state_line_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_line.txt gendiffcode.py) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py line Line $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state_multisample_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_multisample.txt gendiffcode.py) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py multisample Multisample $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state_point_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_point.txt gendiffcode.py) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py point Point $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state_polygon_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_polygon.txt gendiffcode.py) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py polygon Polygon $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state_regcombiner_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_regcombiner.txt gendiffcode.py) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py regcombiner RegCombiner $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state_stencil_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_stencil.txt gendiffcode.py) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py stencil Stencil $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state_viewport_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_viewport.txt gendiffcode.py) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py viewport Viewport $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state_get.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_get.py state_get.txt state_extensions_get.txt) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/state_get.py $(VBOX_PATH_CROGL_GLAPI) $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state_isenabled.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_isenabled.py state_isenabled.txt state_extensions_isenabled.txt) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/state_isenabled.py $(VBOX_PATH_CROGL_GLAPI) $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state.def: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_defs.py state_special state_select_special state_feedback_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/state_defs.py $(VBOX_PATH_CROGL_GLAPI) $(<D)
$(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_funcs.py state_special state_feedback_special state_select_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/state_funcs.py $(VBOX_PATH_CROGL_GLAPI) $(<D)
#
# VBoxOGLerrorspu
# @remark See HostServices/OpenGL/Makefile for and explanation of the gl.h
# and glu.h intermediate files on darwin.
#
VBoxOGLerrorspu_TEMPLATE = VBOXCROGLR3GUESTDLL
VBoxOGLerrorspu_INTERMEDIATES = \
$(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h
VBoxOGLerrorspu_SOURCES = \
$(VBOX_PATH_CROGL_GENFILES)/errorspu.c \
VBoxOGLerrorspu_CLEAN = \
$(VBOX_PATH_CROGL_GENFILES)/errorspu.c
ifeq ($(KBUILD_TARGET),win)
VBoxOGLerrorspu_LIBS = \
$(PATH_OBJ)/VBoxOGLcrutil/VBoxOGLcrutil$(VBOX_SUFF_LIB)
else
VBoxOGLerrorspu_LIBS = \
$(VBOX_PATH_ADDITIONS)/VBoxOGLcrutil$(VBOX_SUFF_DLL)
endif
#
# VBoxOGLhosterrorspu
#
VBoxOGLhosterrorspu_EXTENDS = VBoxOGLerrorspu
VBoxOGLhosterrorspu_TEMPLATE = VBOXCROGLR3HOST
-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLhosterrorspu.dylib \
-current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
ifeq ($(KBUILD_TARGET),win)
VBoxOGLhosterrorspu_LIBS = \
$(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB)
else
VBoxOGLhosterrorspu_LIBS = \
$(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
endif
VBoxOGLhosterrorspu_LIBS += \
$(LIB_RUNTIME)
#
# Generate files for VBoxOGLerrorspu and VBoxOGLerrorspu.
#
$(VBOX_PATH_CROGL_GENFILES)/errorspu.c: $(PATH_SUB_CURRENT)/error/error.py $(VBOX_CROGL_API_FILES)
$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
include $(KBUILD_PATH)/subfooter.kmk