# $Id: Makefile.kmk 28800 2010-04-27 08:22:32Z vboxsync $ ## @file # Sub-Makefile for the VirtualBox Guest/Host OpenGL part # # # Copyright (C) 2008 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 DLLS += VBoxOGLcrutil VBoxOGLerrorspu LIBRARIES += VBoxOGLcrpacker VBoxOGLspuload VBoxOGLcrstate endif ifndef VBOX_ONLY_ADDITIONS DLLS += VBoxOGLhostcrutil VBoxOGLhosterrorspu LIBRARIES += VBoxOGLhostcrpacker VBoxOGLhostspuload VBoxOGLhostcrstate endif # # VBoxOGLcrutil # VBoxOGLcrutil_TEMPLATE = VBOXCROGLR3GUESTDLL VBoxOGLcrutil_SDKS.win = DXSDK 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/vboxhgcm.c \ $(VBOX_PATH_CROGL_GENFILES)/debug_opcodes.c VBoxOGLcrutil_SOURCES.win.x86 = \ util/util.def \ util/util.rc VBoxOGLcrutil_LIBS.win = \ $(PATH_SDK_DXSDK_LIB)/ddraw.lib \ $(PATH_SDK_DXSDK_LIB)/dxguid.lib VBoxOGLcrutil_LIBS = \ $(VBOX_LIB_IPRT_GUEST_R3) \ $(VBOX_LIB_VBGL_R3_SHARED) \ $(VBOX_LIB_IPRT_GUEST_R3) VBoxOGLcrutil_CLEAN = \ $(VBOX_PATH_CROGL_GENFILES)/debug_opcodes.c # 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 # # VBoxOGLhostcrutil # VBoxOGLhostcrutil_EXTENDS = VBoxOGLcrutil VBoxOGLhostcrutil_TEMPLATE = VBOXCROGLR3HOSTDLL VBoxOGLhostcrutil_LDFLAGS.darwin = $(VBoxOGLcrutil_LDFLAGS.darwin) \ -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLhostcrutil.dylib ## @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.win = $(VBoxOGLcrutil_LIBS.win) 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 MSG_GENERATE,python,$@,$<) $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) # # VBoxOGLcrpacker # VBoxOGLcrpacker_TEMPLATE = VBOXCROGLR3GUESTLIB VBoxOGLcrpacker_INCS = \ packer if1of ($(KBUILD_TARGET), linux solaris freebsd) VBoxOGLcrpacker_INCS += \ $(VBOX_MESA_INCS) endif 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)/state/cr_statefuncs.h \ $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h VBoxOGLcrpacker_SOURCES = \ packer/pack_arrays.c \ packer/pack_beginend.c \ packer/pack_bounds.c \ packer/pack_buffer.c \ packer/pack_bufferobject.c \ packer/pack_client.c \ packer/pack_clipplane.c \ packer/pack_context.c \ packer/pack_error.c \ packer/pack_extensions.c \ packer/pack_feedback.c \ packer/pack_fence.c \ packer/pack_fog.c \ packer/pack_init.c \ packer/pack_lights.c \ packer/pack_lists.c \ packer/pack_swap_lists.c \ packer/pack_map.c \ packer/pack_point.c \ packer/pack_swap_map.c \ packer/pack_misc.c \ packer/pack_materials.c \ packer/pack_matrices.c \ packer/pack_pixels.c \ packer/pack_pixelmap.c \ packer/pack_swap_pixelmap.c \ packer/pack_program.c \ packer/pack_regcombiner.c \ packer/pack_stipple.c \ packer/pack_texture.c \ packer/pack_swap_texture.c \ packer/pack_visibleregion.c \ packer/pack_shaders.c \ packer/pack_framebuffer.c \ $(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 # # VBoxOGLhostcrpacker # VBoxOGLhostcrpacker_EXTENDS = VBoxOGLcrpacker VBoxOGLhostcrpacker_TEMPLATE = VBOXCROGLR3HOSTLIB # # 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 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)/cr_packfunctions.h: $(PATH_SUB_CURRENT)/packer/pack_header.py $(PATH_SUB_CURRENT)/packer/packer_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) $(