# $Id: Makefile.kmk 43488 2012-10-01 11:54:33Z vboxsync $ ## @file # Makefile for the Wine D3D related dlls for VirtualBox. # # # Copyright (C) 2009-2012 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 # # Template for building wine stuff. # TEMPLATE_VBoxGuestWineDLL = Template for building a wine DLL. TEMPLATE_VBoxGuestWineDLL_EXTENDS = VBOXGUESTR3NPDLL TEMPLATE_VBoxGuestWineDLL_DEFS = $(TEMPLATE_VBOXGUESTR3NPDLL_DEFS) \ __WINESRC__ \ WINE_UNICODE_API="" \ _REENTRANT \ WINE_NOWINSOCK \ USE_WIN32_OPENGL \ __i386__ \ DLLDIR=\"\" \ BINDIR=\"\" \ LIB_TO_BINDIR=\"\" \ LIB_TO_DLLDIR=\"\" \ BIN_TO_DLLDIR=\"\" \ LIB_TO_DATADIR=\"\" \ BIN_TO_DATADIR=\"\" # # Template for building the D3D[89] stuff. # TEMPLATE_VBoxGuestWineD3DxDLL = Template for building the D3D8/9 stuff. TEMPLATE_VBoxGuestWineD3DxDLL_EXTENDS = VBOXGUESTR3NPDLL TEMPLATE_VBoxGuestWineD3DxDLL_EXTENDS_BY = appending TEMPLATE_VBoxGuestWineD3DxDLL_SDKS.amd64 = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH) TEMPLATE_VBoxGuestWineD3DxDLL_DEFS.amd64 = VBOX_USING_WINDDK_W7_OR_LATER TEMPLATE_VBoxGuestWineD3DxDLL_DEFS.x86 = __i386__ TEMPLATE_VBoxGuestWineD3DxDLL_INCS.x86 = include ifdef VBOX_WINE_WITH_IPRT TEMPLATE_VBoxGuestWineD3DxDLL_DEFS = VBOX_WINE_WITH_IPRT TEMPLATE_VBoxGuestWineD3DxDLL_LIBS = \ $(VBOX_LIB_IPRT_GUEST_R3) \ $(VBOX_LIB_VBGL_R3) endif if 0 # # libWine - ???. # DLLS.x86 += libWine libWine_TEMPLATE = VBoxGuestWineDLL libWine_INCS = \ include libWine_SOURCES := \ libWine/wine.def \ libWine/casemap.c \ libWine/collation.c \ libWine/compose.c \ libWine/config.c \ libWine/cptable.c \ libWine/debug.c \ libWine/fold.c \ libWine/ldt.c \ libWine/loader.c \ libWine/mbtowc.c \ libWine/mmap.c \ libWine/port.c \ libWine/sortkey.c \ libWine/string.c \ libWine/utf8.c \ libWine/wctomb.c \ libWine/wctype.c \ libWine/c_037.c \ libWine/c_424.c \ libWine/c_437.c \ libWine/c_500.c \ libWine/c_737.c \ libWine/c_775.c \ libWine/c_850.c \ libWine/c_852.c \ libWine/c_855.c \ libWine/c_856.c \ libWine/c_857.c \ libWine/c_860.c \ libWine/c_861.c \ libWine/c_862.c \ libWine/c_863.c \ libWine/c_864.c \ libWine/c_865.c \ libWine/c_866.c \ libWine/c_869.c \ libWine/c_874.c \ libWine/c_875.c \ libWine/c_878.c \ libWine/c_932.c \ libWine/c_936.c \ libWine/c_949.c \ libWine/c_950.c \ libWine/c_1006.c \ libWine/c_1026.c \ libWine/c_1250.c \ libWine/c_1251.c \ libWine/c_1252.c \ libWine/c_1253.c \ libWine/c_1254.c \ libWine/c_1255.c \ libWine/c_1256.c \ libWine/c_1257.c \ libWine/c_1258.c \ libWine/c_1361.c \ libWine/c_10000.c \ libWine/c_10006.c \ libWine/c_10007.c \ libWine/c_10029.c \ libWine/c_10079.c \ libWine/c_10081.c \ libWine/c_20127.c \ libWine/c_20866.c \ libWine/c_20932.c \ libWine/c_21866.c \ libWine/c_28591.c \ libWine/c_28592.c \ libWine/c_28593.c \ libWine/c_28594.c \ libWine/c_28595.c \ libWine/c_28596.c \ libWine/c_28597.c \ libWine/c_28598.c \ libWine/c_28599.c \ libWine/c_28600.c \ libWine/c_28603.c \ libWine/c_28604.c \ libWine/c_28605.c \ libWine/c_28606.c \ libWine/version.c endif # 0 # # wined3d - ???. # DLLS += wined3d wined3d_TEMPLATE = VBoxGuestWineDLL wined3d_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH) wined3d_DEFS = \ _USE_MATH_DEFINES \ VBOX_USING_WINDDK_W7_OR_LATER \ VBOX_WINE_WITHOUT_LIBWINE \ VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT \ VBOX_WINE_WITH_IPRT # ^^^^ wined3d is now using iprt/asm.h, which includes iprt/assert.h, so iprt is required. if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS) wined3d_DEFS += WINE_NO_DEBUG_MSGS endif wined3d_INCS := \ vbox/libWineStub/include wined3d_SOURCES := \ wined3d/arb_program_shader.c \ wined3d/ati_fragment_shader.c \ wined3d/basetexture.c \ wined3d/buffer.c \ wined3d/clipper.c \ wined3d/context.c \ wined3d/cubetexture.c \ wined3d/device.c \ wined3d/directx.c \ wined3d/drawprim.c \ wined3d/gl_compat.c \ wined3d/glsl_shader.c \ wined3d/nvidia_texture_shader.c \ wined3d/palette.c \ wined3d/query.c \ wined3d/resource.c \ wined3d/shader.c \ wined3d/shader_sm1.c \ wined3d/shader_sm4.c \ wined3d/state.c \ wined3d/stateblock.c \ wined3d/surface_base.c \ wined3d/surface.c \ wined3d/surface_gdi.c \ wined3d/swapchain.c \ wined3d/swapchain_gdi.c \ wined3d/swapchain_base.c \ wined3d/texture.c \ wined3d/utils.c \ wined3d/vertexdeclaration.c \ wined3d/view.c \ wined3d/volume.c \ wined3d/volumetexture.c \ wined3d/wined3d_main.c \ wined3d/vboxext.c \ vbox/libWineStub/debug.c \ wined3d/wined3d.def wined3d_LIBS = \ $(VBOX_LIB_IPRT_GUEST_R3) \ $(VBOX_LIB_VBGL_R3) ifdef VBOX_WITH_WDDM # # wined3dwddm - ??? # DLLS += wined3dwddm wined3dwddm_EXTENDS = wined3d if defined(VBOX_SIGNING_MODE) wined3dwddm_INSTTYPE.win = none wined3dwddm_DEBUG_INSTTYPE.win = both endif wined3dwddm_DEFS = $(subst VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT,,$(wined3d_DEFS)) \ VBOX_WITH_WDDM \ VBOX_WINE_WITH_SINGLE_CONTEXT \ IN_VBOXLIBWINE \ VBOX_WINE_WITH_SHADER_CACHE ifdef VBOX_WINE_WITH_PROFILE wined3dwddm_DEFS += VBOX_WINE_WITH_PROFILE endif wined3dwddm_INCS = $(wined3d_INCS) \ $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm wined3dwddm_SOURCES = $(subst wined3d.def,wined3dwddm.def,$(wined3d_SOURCES)) \ vbox/VBoxDbgGl.c wined3dwddm_LIBS = $(wined3d_LIBS) \ $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB) \ $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi$(VBOX_SUFF_LIB) # # wined3dwddm-x86 - ???. # DLLS.amd64 += wined3dwddm-x86 wined3dwddm-x86_EXTENDS = wined3dwddm wined3dwddm-x86_BLD_TRG_ARCH = x86 wined3dwddm-x86_DEFS = $(wined3dwddm_DEFS) VBOX_WDDM_WOW64 wined3dwddm-x86_LIBS = \ $(VBOX_LIB_IPRT_GUEST_R3_X86) \ $(VBOX_LIB_VBGL_R3_X86) \ $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \ $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB) endif # ifdef VBOX_WITH_WDDM # # VBoxD3D8 - ???. # DLLS += VBoxD3D8 VBoxD3D8_TEMPLATE = VBoxGuestWineDLL VBoxD3D8_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH) VBoxD3D8_DEFS = _USE_MATH_DEFINES \ VBOX_USING_WINDDK \ VBOX_WINE_WITHOUT_LIBWINE if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS) VBoxD3D8_DEFS += WINE_NO_DEBUG_MSGS endif VBoxD3D8_INCS := \ vbox/libWineStub/include VBoxD3D8_SOURCES := \ d3d8/cubetexture.c \ d3d8/d3d8_main.c \ d3d8/device.c \ d3d8/directx.c \ d3d8/indexbuffer.c \ d3d8/pixelshader.c \ d3d8/surface.c \ d3d8/swapchain.c \ d3d8/texture.c \ d3d8/vertexbuffer.c \ d3d8/vertexdeclaration.c \ d3d8/vertexshader.c \ d3d8/volume.c \ d3d8/volumetexture.c \ vbox/libWineStub/debug.c \ d3d8/d3d8.def VBoxD3D8_LIBS = \ $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB) ifdef VBOX_WINE_WITH_IPRT VBoxD3D8_DEFS += VBOX_WINE_WITH_IPRT VBoxD3D8_LIBS += \ $(VBOX_LIB_IPRT_GUEST_R3) \ $(VBOX_LIB_VBGL_R3) endif # # VBoxD3D9 - ???. # DLLS += VBoxD3D9 VBoxD3D9_TEMPLATE = VBoxGuestWineDLL VBoxD3D9_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH) VBoxD3D9_DEFS = _USE_MATH_DEFINES \ VBOX_USING_WINDDK \ VBOX_WINE_WITHOUT_LIBWINE if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS) VBoxD3D9_DEFS += WINE_NO_DEBUG_MSGS endif VBoxD3D9_INCS := \ vbox/libWineStub/include VBoxD3D9_SOURCES := \ d3d9/cubetexture.c \ d3d9/d3d9_main.c \ d3d9/device.c \ d3d9/directx.c \ d3d9/indexbuffer.c \ d3d9/pixelshader.c \ d3d9/query.c \ d3d9/stateblock.c \ d3d9/surface.c \ d3d9/swapchain.c \ d3d9/texture.c \ d3d9/vertexbuffer.c \ d3d9/vertexdeclaration.c \ d3d9/vertexshader.c \ d3d9/volume.c \ d3d9/volumetexture.c \ vbox/libWineStub/debug.c \ d3d9/d3d9xpdm.def VBoxD3D9_LIBS = \ $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB) ifdef VBOX_WINE_WITH_IPRT VBoxD3D9_DEFS += VBOX_WINE_WITH_IPRT VBoxD3D9_LIBS += \ $(VBOX_LIB_IPRT_GUEST_R3) \ $(VBOX_LIB_VBGL_R3) endif ifdef VBOX_WITH_WDDM # # VBoxD3D9wddm - ???. # DLLS += VBoxD3D9wddm VBoxD3D9wddm_EXTENDS = VBoxD3D9 if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM) VBoxD3D9wddm_INSTTYPE = none VBoxD3D9wddm_DEBUG_INSTTYPE = both endif VBoxD3D9wddm_INCS = $(VBoxD3D9_INCS) \ $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm VBoxD3D9wddm_DEFS += $(VBoxD3D9_DEFS) \ VBOX_WITH_WDDM \ VBOX_WINE_WITHOUT_LIBWINE \ IN_VBOXWINEEX \ VBOX_WINE_NO_LOCK VBoxD3D9wddm_SOURCES = $(subst d3d9xpdm.def,d3d9wddm.def,$(VBoxD3D9_SOURCES)) VBoxD3D9wddm_LIBS = \ $(subst $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB),$(PATH_STAGE_LIB)/wined3dwddm$(VBOX_SUFF_LIB),$(VBoxD3D9_LIBS)) \ $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB) \ $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi$(VBOX_SUFF_LIB) # # VBoxD3D9wddm-x86 - For WOW64. # DLLS.amd64 += VBoxD3D9wddm-x86 VBoxD3D9wddm-x86_EXTENDS = VBoxD3D9wddm VBoxD3D9wddm-x86_BLD_TRG_ARCH = x86 VBoxD3D9wddm-x86_DEFS = $(VBoxD3D9wddm_DEFS) VBOX_WDDM_WOW64 VBoxD3D9wddm-x86_LIBS = $(PATH_STAGE_LIB)/wined3dwddm-x86$(VBOX_SUFF_LIB) ifdef VBOX_WINE_WITH_IPRT VBoxD3D9wddm-x86_LIBS += \ $(VBOX_LIB_IPRT_GUEST_R3_X86) \ $(VBOX_LIB_VBGL_R3_X86) endif VBoxD3D9wddm-x86_LIBS += \ $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \ $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB) endif # VBOX_WITH_WDDM # # d3d8 - ???. # DLLS += d3d8 d3d8_TEMPLATE = VBoxGuestWineD3DxDLL d3d8_SOURCES = \ switcher/d3d8_main.c \ switcher/sw_common.c \ switcher/sw_d3d8.def \ switcher/d3d8.rc # # d3d9 - ???. # DLLS += d3d9 d3d9_TEMPLATE = VBoxGuestWineD3DxDLL d3d9_SOURCES = \ switcher/d3d9_main.c \ switcher/sw_common.c \ switcher/d3d9.rc d3d9_SOURCES.x86 = \ switcher/sw_d3d9.def d3d9_SOURCES.amd64 = \ switcher/sw_d3d9xpdm.def include $(FILE_KBUILD_SUB_FOOTER)