1 | # $Id: Makefile.kmk 80372 2019-08-21 14:32:40Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the Windows guest display driver.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2011-2019 Oracle Corporation
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 |
|
---|
18 | SUB_DEPTH = ../../../../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | ifdef VBOX_WITH_MESA3D
|
---|
22 | ifndef VBOX_MESA3D_CONFIG_KMK_INCLUDED
|
---|
23 | include $(PATH_ROOT)/src/VBox/Additions/3D/Config.kmk
|
---|
24 | endif
|
---|
25 | endif
|
---|
26 |
|
---|
27 | #
|
---|
28 | # VBoxDisp - Windows Guest Additions XPDM Display Driver
|
---|
29 | #
|
---|
30 | # Note. This has to run on NT4! (*_NT4 => *_W2K3 when targeting 64-bit.)
|
---|
31 | #
|
---|
32 | SYSMODS += VBoxDisp
|
---|
33 | VBoxDisp_TEMPLATE = VBOXGUESTR0
|
---|
34 | VBoxDisp_SYSSUFF = .dll
|
---|
35 | VBoxDisp_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_NT4)
|
---|
36 | VBoxDisp_DEFS.x86 = _WIN32_WINNT=0x0501
|
---|
37 | VBoxDisp_DEFS = VBOX_WITH_DDRAW
|
---|
38 | VBoxDisp_DEFS += LOG_TO_BACKDOOR #LOG_ENABLED
|
---|
39 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
40 | VBoxDisp_DEFS += VBOX_WITH_VIDEOHWACCEL
|
---|
41 | endif
|
---|
42 | ifdef VBOX_WITH_CROGL
|
---|
43 | VBoxDisp_DEFS += VBOX_WITH_CROGL
|
---|
44 | endif
|
---|
45 | #VBoxDisp_DEFS += VBOX_VBVA_ADJUST_RECT
|
---|
46 | VBoxDisp_INCS = ../../../include .. $(VBOX_GRAPHICS_INCS)
|
---|
47 | VBoxDisp_LDFLAGS.x86 = /Entry:DrvEnableDriver@12
|
---|
48 | VBoxDisp_LDFLAGS.amd64 = /Entry:DrvEnableDriver
|
---|
49 | VBoxDisp_SOURCES = \
|
---|
50 | xpdm/VBoxDispDriver.cpp \
|
---|
51 | xpdm/VBoxDispMini.cpp \
|
---|
52 | xpdm/VBoxDispMouse.cpp \
|
---|
53 | xpdm/VBoxDispPalette.cpp \
|
---|
54 | xpdm/VBoxDispVBVA.cpp \
|
---|
55 | xpdm/VBoxDispDrawCmd.cpp \
|
---|
56 | xpdm/VBoxDispVRDP.cpp \
|
---|
57 | xpdm/VBoxDispVrdpBmp.cpp \
|
---|
58 | xpdm/VBoxDispVrdpTxt.cpp \
|
---|
59 | xpdm/VBoxDispDriverDDraw.cpp \
|
---|
60 | xpdm/VBoxDispDDraw.cpp \
|
---|
61 | xpdm/VBoxDisp.def \
|
---|
62 | xpdm/VBoxDisp.rc \
|
---|
63 | $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp \
|
---|
64 | $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBuffers.cpp \
|
---|
65 | $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIHostCmd.cpp \
|
---|
66 | $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp \
|
---|
67 | $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp
|
---|
68 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
69 | VBoxDisp_SOURCES += \
|
---|
70 | xpdm/VBoxDispVHWA.cpp \
|
---|
71 | xpdm/VBoxDispDDrawVHWA.cpp
|
---|
72 | endif
|
---|
73 | VBoxDisp_LIBS = \
|
---|
74 | $(PATH_SDK_$(VBOX_WINDDK_GST_NT4)_LIB)/win32k.lib \
|
---|
75 | $(VBOX_LIB_IPRT_GUEST_R0_NT4) \
|
---|
76 | $(VBOX_PATH_ADDITIONS_LIB)/HGSMIGuestR0Lib$(VBOX_SUFF_LIB)
|
---|
77 | VBoxDisp_USES.win += vboximportchecker
|
---|
78 | VBoxDisp_VBOX_IMPORT_CHECKER.win.x86 = nt4/r0
|
---|
79 | VBoxDisp_VBOX_IMPORT_CHECKER.win.amd64 = xp64/r0
|
---|
80 |
|
---|
81 | # Signing requires both miniport and display drivers
|
---|
82 | # so it'd be dealt with in the parent makefile.
|
---|
83 | ifdef VBOX_SIGN_ADDITIONS
|
---|
84 | VBoxDisp_INSTTYPE = none
|
---|
85 | VBoxDisp_DEBUG_INSTTYPE = both
|
---|
86 | ifdef VBOX_WITH_WDDM
|
---|
87 | VBoxDispD3D_INSTTYPE = none
|
---|
88 | VBoxDispD3D_DEBUG_INSTTYPE = both
|
---|
89 | endif
|
---|
90 | endif
|
---|
91 |
|
---|
92 | ifdef VBOX_WITH_WDDM
|
---|
93 | #
|
---|
94 | # VBoxDispD3D - Windows Guest Additions WDDM R3 Display Driver
|
---|
95 | #
|
---|
96 | DLLS += VBoxDispD3D
|
---|
97 | VBoxDispD3D_TEMPLATE = VBoxGuestR3DllMinVista
|
---|
98 | VBoxDispD3D_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
|
---|
99 | VBoxDispD3D_DEFS = UNICODE _UNICODE VBOX_WITH_WDDM VBOXWDDMDISP LOG_TO_BACKDOOR LOG_TO_BACKDOOR_DRV VBOX_WITH_HGCM
|
---|
100 | ifdef DEBUG_misha
|
---|
101 | VBoxDispD3D_DEFS += LOG_ENABLED
|
---|
102 | endif
|
---|
103 | ifdef VBOXWDDM_WITH_VBVA
|
---|
104 | VBoxDispD3D_DEFS += VBOXWDDM_WITH_VBVA
|
---|
105 | endif
|
---|
106 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
107 | VBoxDispD3D_DEFS += VBOX_WITH_VIDEOHWACCEL
|
---|
108 | endif
|
---|
109 | VBoxDispD3D_INCS = \
|
---|
110 | ../../../include \
|
---|
111 | .. \
|
---|
112 | $(VBOX_PATH_CROGL_INCLUDE) \
|
---|
113 | $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/shared \
|
---|
114 | $(VBOX_GRAPHICS_INCS)
|
---|
115 | VBoxDispD3D_SOURCES = \
|
---|
116 | wddm/VBoxDispD3D.cpp \
|
---|
117 | wddm/VBoxDispD3DIf.cpp \
|
---|
118 | wddm/VBoxDispDbg.cpp \
|
---|
119 | wddm/VBoxD3DIf.cpp \
|
---|
120 | wddm/VBoxDispD3D.rc \
|
---|
121 | wddm/VBoxDispD3D.def
|
---|
122 | VBoxDispD3D_LIBS = \
|
---|
123 | $(VBOX_LIB_IPRT_GUEST_R3) \
|
---|
124 | $(VBOX_LIB_VBGL_R3) \
|
---|
125 | Psapi.lib \
|
---|
126 | $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB) \
|
---|
127 | $(VBOX_PATH_ADDITIONS_LIB)/VBoxWddmUmKmt$(VBOX_SUFF_LIB)
|
---|
128 |
|
---|
129 | ifdef VBOX_WITH_MESA3D
|
---|
130 | VBoxDispD3D_DEFS += VBOX_WITH_MESA3D
|
---|
131 | VBoxDispD3D_INCS += \
|
---|
132 | $(VBOX_PATH_MESA)/src/gallium/include \
|
---|
133 | $(VBOX_PATH_MESA)/src \
|
---|
134 | $(VBOX_PATH_MESA)/include/c99 \
|
---|
135 | $(VBOX_PATH_MESA)/include \
|
---|
136 | $(VBOX_PATH_3D)/win/include \
|
---|
137 | $(VBOX_PATH_VMSVGA_INC)
|
---|
138 | VBoxDispD3D_SOURCES += \
|
---|
139 | wddm/gallium/GaDrvEnvWddm.cpp \
|
---|
140 | wddm/gallium/GaWddm.cpp \
|
---|
141 | wddm/gallium/GaDdi.cpp \
|
---|
142 | wddm/gallium/Present.cpp \
|
---|
143 | wddm/gallium/VBoxGallium.cpp \
|
---|
144 | wddm/gallium/VBoxGaD3DDevice9Ex.cpp \
|
---|
145 | wddm/gallium/VBoxD3DAdapter9.c
|
---|
146 |
|
---|
147 | ifdef VBOX_WITH_MESA3D_D3DTEST
|
---|
148 | VBoxDispD3D_DEFS += VBOX_WITH_MESA3D_D3DTEST
|
---|
149 | VBoxDispD3D_SOURCES += \
|
---|
150 | wddm/gallium/test/d3dhlp.cpp \
|
---|
151 | wddm/gallium/test/d3d9render.cpp \
|
---|
152 | wddm/gallium/GaDrvTest.cpp
|
---|
153 | endif
|
---|
154 | endif
|
---|
155 |
|
---|
156 | #
|
---|
157 | # 64-bit systems needs a 32-bit version of VBoxDispD3D.
|
---|
158 | #
|
---|
159 | DLLS.amd64 += VBoxDispD3D-x86
|
---|
160 | VBoxDispD3D-x86_EXTENDS = VBoxDispD3D
|
---|
161 | VBoxDispD3D-x86_BLD_TRG_ARCH = x86
|
---|
162 | VBoxDispD3D-x86_LIBS = \
|
---|
163 | $(VBOX_LIB_IPRT_GUEST_R3_X86) \
|
---|
164 | $(VBOX_LIB_VBGL_R3_X86) \
|
---|
165 | Psapi.lib \
|
---|
166 | $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \
|
---|
167 | $(VBOX_PATH_ADDITIONS_LIB)/VBoxWddmUmKmt-x86$(VBOX_SUFF_LIB)
|
---|
168 | VBoxDispD3D-x86_DEFS = $(VBoxDispD3D_DEFS) VBOX_WDDM_WOW64
|
---|
169 |
|
---|
170 | include $(PATH_SUB_CURRENT)/wddm/shared/Makefile.kmk
|
---|
171 |
|
---|
172 | endif #ifdef VBOX_WITH_WDDM
|
---|
173 |
|
---|
174 | ifdef VBOXVIDEOWINDBG
|
---|
175 | DLLS += vbvdbg
|
---|
176 | vbvdbg_TEMPLATE = VBOXR3STATIC
|
---|
177 | vbvdbg_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
|
---|
178 | vbvdbg_DEFS = UNICODE _UNICODE
|
---|
179 | vbvdbg_SOURCES = \
|
---|
180 | wddm/dbg/VBoxVideoWinDbg.cpp \
|
---|
181 | wddm/dbg/VBoxVideoWinDbg.def
|
---|
182 |
|
---|
183 | PROGRAMS += tstMvWnd
|
---|
184 | tstMvWnd_TEMPLATE = VBOXR3EXE
|
---|
185 | tstMvWnd_DEFS = UNICODE _UNICODE
|
---|
186 | tstMvWnd_SOURCES = \
|
---|
187 | wddm/dbg/tstMvWnd.cpp
|
---|
188 | tstMvWnd_LIBS = $(VBOX_LIB_IPRT_GUEST_R3)
|
---|
189 | tstMvWnd_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
190 |
|
---|
191 | PROGRAMS += DumpD3DCaps9
|
---|
192 | DumpD3DCaps9_TEMPLATE = VBOXR3EXE
|
---|
193 | DumpD3DCaps9_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
|
---|
194 | DumpD3DCaps9_DEFS = UNICODE _UNICODE
|
---|
195 | DumpD3DCaps9_SOURCES = \
|
---|
196 | wddm/dbg/DumpD3DCaps9.cpp
|
---|
197 | DumpD3DCaps9_LIBS = d3d9.lib
|
---|
198 | DumpD3DCaps9_LDFLAGS.win = /SUBSYSTEM:CONSOLE
|
---|
199 |
|
---|
200 | PROGRAMS += D3DFeatureLevel
|
---|
201 | D3DFeatureLevel_TEMPLATE = VBOXR3EXE
|
---|
202 | D3DFeatureLevel_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
|
---|
203 | D3DFeatureLevel_SOURCES = \
|
---|
204 | wddm/dbg/D3DFeatureLevel.cpp
|
---|
205 | D3DFeatureLevel_LIBS = $(VBOX_LIB_IPRT_GUEST_R3) d3d11.lib
|
---|
206 | D3DFeatureLevel_LDFLAGS.win = /SUBSYSTEM:CONSOLE
|
---|
207 |
|
---|
208 | endif #VBOXVIDEOWINDBG
|
---|
209 |
|
---|
210 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|