Makefile.kmk revision ac7e45442a6e3b7c01faa0cdc1c48daee049ff59
# $Id$
## @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 := \
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_SOURCES := \
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 wined3d/vboxext.c vbox/VBoxDbgGl.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
wined3dwddm_DEFS += VBOX_WINE_WITH_SINGLE_CONTEXT
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_SOURCES := \
$(PATH_STAGE_LIB)/libWine$(VBOX_SUFF_LIB)
VBoxD3D8_LIBS = \
$(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB)
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_SOURCES := \
$(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)
ifdef VBOX_WINE_WITH_IPRT
VBoxD3D9wddm_LIBS += \
$(VBOX_LIB_IPRT_GUEST_R3) \
$(VBOX_LIB_VBGL_R3)
VBoxD3D9wddm_DEFS += VBOX_WINE_WITH_IPRT
endif
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
ifdef VBOX_WINE_WITH_IPRT
VBoxD3D9wddm-x86_LIBS += \
$(VBOX_LIB_IPRT_GUEST_R3_X86) \
$(VBOX_LIB_VBGL_R3_X86)
endif
endif
DLLS += d3d8
d3d8_TEMPLATE = VBOXGUESTR3NPDLL
d3d8_DEFS.x86 = __i386__
d3d8_INCS.x86 := $(PATH_SUB_CURRENT)/include
d3d8_SOURCES = \
d3d8_SDKS.amd64 = WINDDKWLH
DLLS += d3d9
d3d9_TEMPLATE = VBOXGUESTR3NPDLL
d3d9_DEFS.x86 = __i386__
d3d9_INCS.x86 := $(PATH_SUB_CURRENT)/include
d3d9_SOURCES = \
d3d9_SOURCES.x86 = \
d3d9_SDKS.amd64 = WINDDKWLH
include $(KBUILD_PATH)/subfooter.kmk