# $Id: Makefile.kmk 38082 2011-07-20 14:26:24Z vboxsync $ ## @file # Makefile for the Wine D3D related dlls for VirtualBox. # # # Copyright (C) 2009 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 # @todo: get rid of libwine completely (currently used for xpdm.x86 builds only) DLLS.x86 += libWine libWine_TEMPLATE = VBOXGUESTR3NPDLL libWine_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=\"\" libWine_INCS := $(PATH_SUB_CURRENT)/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 DLLS += wined3d # @todo: all .amd64 and .x86 stuff below is to get rid of libwine for amd64 # and keep it for .x86 to avoid regressions # this should be generalized in the future wined3d_TEMPLATE = VBOXGUESTR3NPDLL wined3d_DEFS = __WINESRC__ WINE_UNICODE_API="" _REENTRANT WINE_NOWINSOCK USE_WIN32_OPENGL _USE_MATH_DEFINES\ DLLDIR=\"\" \ BINDIR=\"\" \ LIB_TO_BINDIR=\"\" \ LIB_TO_DLLDIR=\"\" \ BIN_TO_DLLDIR=\"\" \ LIB_TO_DATADIR=\"\" \ BIN_TO_DATADIR=\"\" wined3d_DEFS.x86 = __i386__ if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS) wined3d_DEFS += WINE_NO_DEBUG_MSGS endif wined3d_DEFS.amd64 += VBOX_WINE_WITHOUT_LIBWINE wined3d_INCS.x86 := $(PATH_SUB_CURRENT)/include wined3d_INCS.amd64 := 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/wined3d.def wined3d_SOURCES.amd64 = vbox/libWineStub/debug.c wined3d_LIBS.x86 = \ $(PATH_STAGE_LIB)/libWine$(VBOX_SUFF_LIB) wined3d_SDKS.amd64 = WINDDKWLH ifdef VBOX_WITH_WDDM DLLS += wined3dwddm wined3dwddm_EXTENDS = wined3d if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM) wined3dwddm_NOINST.win = true endif wined3dwddm_INCS = vbox/libWineStub/include wined3dwddm_INCS.x86 = $(NO_SUCH_VARIABLE) wined3dwddm_LIBS.x86 = $(NO_SUCH_VARIABLE) wined3dwddm_DEFS = $(subst __i386__,,$(wined3d_DEFS)) VBOX_WITH_WDDM VBOX_WINE_WITHOUT_LIBWINE wined3dwddm_DEFS.x86 = $(NO_SUCH_VARIABLE) wined3dwddm_SOURCES = $(subst wined3d.def,wined3dwddm.def,$(wined3d_SOURCES)) vbox/libWineStub/debug.c wined3dwddm_SOURCES.x86 = $(NO_SUCH_VARIABLE) wined3dwddm_SOURCES.amd64 = $(NO_SUCH_VARIABLE) wined3dwddm_SDKS = WINDDKWLH wined3dwddm_SDKS.amd64 = $(NO_SUCH_VARIABLE) #VBOX_WINE_WITH_IPRT is used for debugging currently to enable Assert & stuff ifdef VBOX_WINE_WITH_IPRT wined3dwddm_LIBS += \ $(VBOX_LIB_IPRT_GUEST_R3) \ $(VBOX_LIB_VBGL_R3) wined3dwddm_DEFS += VBOX_WINE_WITH_IPRT endif DLLS.amd64 += wined3dwddm-x86 wined3dwddm-x86_EXTENDS = wined3dwddm wined3dwddm-x86_BLD_TRG_ARCH = x86 ifdef VBOX_WINE_WITH_IPRT wined3dwddm-x86_LIBS = \ $(VBOX_LIB_IPRT_GUEST_R3_X86) \ $(VBOX_LIB_VBGL_R3_X86) endif wined3dwddm-x86_DEFS = $(wined3dwddm_DEFS) VBOX_WDDM_WOW64 endif DLLS += VBoxD3D8 VBoxD3D8_TEMPLATE = VBOXGUESTR3NPDLL VBoxD3D8_DEFS = __WINESRC__ WINE_UNICODE_API="" _REENTRANT WINE_NOWINSOCK USE_WIN32_OPENGL _USE_MATH_DEFINES\ DLLDIR=\"\" \ BINDIR=\"\" \ LIB_TO_BINDIR=\"\" \ LIB_TO_DLLDIR=\"\" \ BIN_TO_DLLDIR=\"\" \ LIB_TO_DATADIR=\"\" \ BIN_TO_DATADIR=\"\" VBoxD3D8_DEFS.x86 = __i386__ if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS) VBoxD3D8_DEFS += WINE_NO_DEBUG_MSGS endif VBoxD3D8_DEFS.amd64 += VBOX_WINE_WITHOUT_LIBWINE VBoxD3D8_INCS.x86 := $(PATH_SUB_CURRENT)/include VBoxD3D8_INCS.amd64 := 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 \ d3d8/d3d8.def VBoxD3D8_LIBS.x86 = \ $(PATH_STAGE_LIB)/libWine$(VBOX_SUFF_LIB) VBoxD3D8_LIBS = \ $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB) VBoxD3D8_SOURCES.amd64 = vbox/libWineStub/debug.c VBoxD3D8_SDKS.amd64 = WINDDKWLH DLLS += VBoxD3D9 VBoxD3D9_TEMPLATE = VBOXGUESTR3NPDLL VBoxD3D9_DEFS = __WINESRC__ WINE_UNICODE_API="" _REENTRANT WINE_NOWINSOCK USE_WIN32_OPENGL _USE_MATH_DEFINES\ DLLDIR=\"\" \ BINDIR=\"\" \ LIB_TO_BINDIR=\"\" \ LIB_TO_DLLDIR=\"\" \ BIN_TO_DLLDIR=\"\" \ LIB_TO_DATADIR=\"\" \ BIN_TO_DATADIR=\"\" VBoxD3D9_DEFS.x86 = __i386__ if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS) VBoxD3D9_DEFS += WINE_NO_DEBUG_MSGS endif VBoxD3D9_DEFS.amd64 += VBOX_WINE_WITHOUT_LIBWINE VBoxD3D9_INCS.x86 := $(PATH_SUB_CURRENT)/include VBoxD3D9_INCS.amd64 := 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 VBoxD3D9_SOURCES.x86 = \ d3d9/d3d9.def VBoxD3D9_SOURCES.amd64 = \ vbox/libWineStub/debug.c \ d3d9/d3d9xpdm.def VBoxD3D9_LIBS.x86 = \ $(PATH_STAGE_LIB)/libWine$(VBOX_SUFF_LIB) VBoxD3D9_LIBS = \ $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB) VBoxD3D9_SDKS.amd64 = WINDDKWLH ifdef VBOX_WITH_WDDM DLLS += VBoxD3D9wddm VBoxD3D9wddm_EXTENDS = VBoxD3D9 if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM) VBoxD3D9wddm_NOINST.win = true endif VBoxD3D9wddm_INCS = vbox/libWineStub/include VBoxD3D9wddm_INCS.x86 = $(NO_SUCH_VARIABLE) VBoxD3D9wddm_DEFS.x86 = $(NO_SUCH_VARIABLE) VBoxD3D9wddm_DEFS += $(subst __i386__,,$(VBoxD3D9_DEFS)) VBOX_WITH_WDDM VBOX_WINE_WITHOUT_LIBWINE IN_VBOXWINEEX VBoxD3D9wddm_SOURCES = $(VBoxD3D9_SOURCES) d3d9/d3d9wddm.def vbox/libWineStub/debug.c VBoxD3D9wddm_SOURCES.x86 = $(NO_SUCH_VARIABLE) VBoxD3D9wddm_SOURCES.amd64 = $(NO_SUCH_VARIABLE) VBoxD3D9wddm_LIBS = $(PATH_STAGE_LIB)/wined3dwddm$(VBOX_SUFF_LIB) VBoxD3D9wddm_LIBS.x86 = $(NO_SUCH_VARIABLE) VBoxD3D9wddm_SDKS = WINDDKWLH VBoxD3D9wddm_SDKS.amd64 = $(NO_SUCH_VARIABLE) DLLS.amd64 += VBoxD3D9wddm-x86 VBoxD3D9wddm-x86_EXTENDS = VBoxD3D9wddm VBoxD3D9wddm-x86_BLD_TRG_ARCH = x86 VBoxD3D9wddm-x86_LIBS = $(PATH_STAGE_LIB)/wined3dwddm-x86$(VBOX_SUFF_LIB) VBoxD3D9wddm-x86_DEFS = $(VBoxD3D9wddm_DEFS) VBOX_WDDM_WOW64 endif DLLS += d3d8 d3d8_TEMPLATE = VBOXGUESTR3NPDLL d3d8_DEFS.x86 = __i386__ d3d8_INCS.x86 := $(PATH_SUB_CURRENT)/include d3d8_SOURCES = \ switcher/d3d8_main.c \ switcher/sw_common.c \ switcher/sw_d3d8.def \ switcher/d3d8.rc d3d8_SDKS.amd64 = WINDDKWLH DLLS += d3d9 d3d9_TEMPLATE = VBOXGUESTR3NPDLL d3d9_DEFS.x86 = __i386__ d3d9_INCS.x86 := $(PATH_SUB_CURRENT)/include 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 d3d9_SDKS.amd64 = WINDDKWLH include $(KBUILD_PATH)/subfooter.kmk