VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/Makefile.kmk@ 68890

Last change on this file since 68890 was 68261, checked in by vboxsync, 7 years ago

WDDM: helper libs. No code changes, just moved a couple of shared source files to a separate directory.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 12.2 KB
Line 
1# $Id: Makefile.kmk 68261 2017-08-02 21:45:09Z vboxsync $
2## @file
3# Makefile for the Wine D3D related dlls for VirtualBox.
4#
5
6#
7# Copyright (C) 2009-2016 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
19SUB_DEPTH = ../../../../../..
20include $(KBUILD_PATH)/subheader.kmk
21
22#
23# Template for building wine stuff.
24#
25TEMPLATE_VBoxGuestWineDLL = Template for building a wine DLL.
26TEMPLATE_VBoxGuestWineDLL_EXTENDS = VBoxGuestR3Dll
27TEMPLATE_VBoxGuestWineDLL_DEFS = $(TEMPLATE_VBoxGuestR3Dll_DEFS) \
28 __WINESRC__ \
29 WINE_UNICODE_API="" \
30 _REENTRANT \
31 WINE_NOWINSOCK \
32 USE_WIN32_OPENGL \
33 DLLDIR=\"\" \
34 BINDIR=\"\" \
35 LIB_TO_BINDIR=\"\" \
36 LIB_TO_DLLDIR=\"\" \
37 BIN_TO_DLLDIR=\"\" \
38 LIB_TO_DATADIR=\"\" \
39 BIN_TO_DATADIR=\"\"
40
41TEMPLATE_VBoxGuestWineDLL_DEFS.x86 = __i386__
42# -wd4100: unreferenced format parameter
43# -wd4204: nonstandard extension used : non-constant initializer
44# -wd4245: '=' : conversion from 'int' to 'DWORD', signed/unsigned mismatch
45# -wd4305: 'function' : truncation from 'double' to 'GLclampf'
46# -wd4305: 'function' : truncation from 'double' to 'GLclampf'
47# -wd4018: '>' : signed/unsigned mismatch
48# -wd4389: '!=' : signed/unsigned mismatch
49# -wd4221: nonstandard extension used : 'render_targets' : cannot be initialized using address of automatic variable 'dst_surface'
50# -wd4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
51# -wd4267: 'function' : conversion from 'size_t' to 'GLsizei', possible loss of data
52TEMPLATE_VBoxGuestWineDLL_CFLAGS = $(filter-out -WX,$(TEMPLATE_VBoxGuestR3Dll_CFLAGS)) \
53 -wd4100 -wd4204 -wd4245 -wd4305 -wd4018 -wd4389 -wd4221 -wd4334 -wd4267
54if1of ($(VBOX_VCC_TOOL_STEM), VCC120)
55 # -wd4005: v7.1\include\sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition
56 # -wd4133: swapchain.c(384) : warning C4133: 'function' : incompatible types - from 'IDirect3DSwapChain9 *' to 'IDirect3DSwapChain9Ex *'
57 TEMPLATE_VBoxGuestWineDLL_CFLAGS += -wd4005 -wd4133
58endif
59
60#
61# Template for building the D3D[89] stuff.
62#
63TEMPLATE_VBoxGuestWineD3DxDLL = Template for building the D3D8/9 stuff.
64TEMPLATE_VBoxGuestWineD3DxDLL_EXTENDS = VBoxGuestR3Dll
65TEMPLATE_VBoxGuestWineD3DxDLL_EXTENDS_BY = appending
66TEMPLATE_VBoxGuestWineD3DxDLL_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
67TEMPLATE_VBoxGuestWineD3DxDLL_DEFS = VBOX_USING_WINDDK_W7_OR_LATER
68TEMPLATE_VBoxGuestWineD3DxDLL_DEFS.x86 = __i386__
69#TEMPLATE_VBoxGuestWineD3DxDLL_INCS.x86 = vbox/libWineStub/include
70TEMPLATE_VBoxGuestWineD3DxDLL_DEFS = VBOX_WINE_WITH_IPRT
71TEMPLATE_VBoxGuestWineD3DxDLL_CFLAGS = -wd4100 -wd4204 -wd4245 -wd4305
72if1of ($(VBOX_VCC_TOOL_STEM), VCC120)
73 TEMPLATE_VBoxGuestWineD3DxDLL_CFLAGS += -wd4005
74endif
75TEMPLATE_VBoxGuestWineD3DxDLL_LIBS = \
76 $(VBOX_LIB_IPRT_GUEST_R3) \
77 $(VBOX_LIB_VBGL_R3)
78
79
80if 0
81#
82# libWine - ???.
83#
84DLLS.x86 += libWine
85libWine_TEMPLATE = VBoxGuestWineDLL
86libWine_INCS = \
87 include
88libWine_SOURCES := \
89 libWine/wine.def \
90 libWine/casemap.c \
91 libWine/collation.c \
92 libWine/compose.c \
93 libWine/config.c \
94 libWine/cptable.c \
95 libWine/debug.c \
96 libWine/fold.c \
97 libWine/ldt.c \
98 libWine/loader.c \
99 libWine/mbtowc.c \
100 libWine/mmap.c \
101 libWine/port.c \
102 libWine/sortkey.c \
103 libWine/string.c \
104 libWine/utf8.c \
105 libWine/wctomb.c \
106 libWine/wctype.c \
107 libWine/c_037.c \
108 libWine/c_424.c \
109 libWine/c_437.c \
110 libWine/c_500.c \
111 libWine/c_737.c \
112 libWine/c_775.c \
113 libWine/c_850.c \
114 libWine/c_852.c \
115 libWine/c_855.c \
116 libWine/c_856.c \
117 libWine/c_857.c \
118 libWine/c_860.c \
119 libWine/c_861.c \
120 libWine/c_862.c \
121 libWine/c_863.c \
122 libWine/c_864.c \
123 libWine/c_865.c \
124 libWine/c_866.c \
125 libWine/c_869.c \
126 libWine/c_874.c \
127 libWine/c_875.c \
128 libWine/c_878.c \
129 libWine/c_932.c \
130 libWine/c_936.c \
131 libWine/c_949.c \
132 libWine/c_950.c \
133 libWine/c_1006.c \
134 libWine/c_1026.c \
135 libWine/c_1250.c \
136 libWine/c_1251.c \
137 libWine/c_1252.c \
138 libWine/c_1253.c \
139 libWine/c_1254.c \
140 libWine/c_1255.c \
141 libWine/c_1256.c \
142 libWine/c_1257.c \
143 libWine/c_1258.c \
144 libWine/c_1361.c \
145 libWine/c_10000.c \
146 libWine/c_10006.c \
147 libWine/c_10007.c \
148 libWine/c_10029.c \
149 libWine/c_10079.c \
150 libWine/c_10081.c \
151 libWine/c_20127.c \
152 libWine/c_20866.c \
153 libWine/c_20932.c \
154 libWine/c_21866.c \
155 libWine/c_28591.c \
156 libWine/c_28592.c \
157 libWine/c_28593.c \
158 libWine/c_28594.c \
159 libWine/c_28595.c \
160 libWine/c_28596.c \
161 libWine/c_28597.c \
162 libWine/c_28598.c \
163 libWine/c_28599.c \
164 libWine/c_28600.c \
165 libWine/c_28603.c \
166 libWine/c_28604.c \
167 libWine/c_28605.c \
168 libWine/c_28606.c \
169 libWine/version.c
170endif # 0
171
172#
173# wined3d - ???.
174#
175DLLS += wined3d
176wined3d_TEMPLATE = VBoxGuestWineDLL
177wined3d_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
178wined3d_DEFS = \
179 _USE_MATH_DEFINES \
180 VBOX_USING_WINDDK_W7_OR_LATER \
181 VBOX_WINE_WITHOUT_LIBWINE \
182 VBOX_WINE_WITH_SINGLE_CONTEXT \
183 VBOX_WINE_WITH_IPRT
184# ^^^^ wined3d is now using iprt/asm.h, which includes iprt/assert.h, so iprt is required.
185if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
186 wined3d_DEFS += WINE_NO_DEBUG_MSGS
187endif
188wined3d_DEFS += \
189 VBOX_WITH_WINE_FIX_IBMTMR \
190 VBOX_WITH_WINE_FIX_BUFOFFSET \
191 VBOX_WITH_WINE_FIX_QUIRKS \
192 VBOX_WITH_WINE_FIX_PBOPSM \
193 VBOX_WITH_WINE_FIX_INITCLEAR \
194 VBOX_WITH_WINE_FIX_TEXCLEAR \
195 VBOX_WITH_WINE_FIX_STRINFOBUF \
196 VBOX_WITH_WINE_FIX_SHADERCLEANUP \
197 VBOX_WITH_WINE_FIX_SURFUPDATA \
198 VBOX_WITH_WINE_FIX_CURVBO \
199 VBOX_WITH_WINE_FIX_FTOA \
200 VBOX_WITH_WINE_FIX_SHADER_DECL \
201 VBOX_WITH_WINE_DBG
202#wined3d_DEFS += VBOX_WITH_WINE_FIXES
203wined3d_INCS := \
204 vbox/libWineStub/include \
205 $(VBOX_GRAPHICS_INCS)
206wined3d_SOURCES := \
207 wined3d/arb_program_shader.c \
208 wined3d/ati_fragment_shader.c \
209 wined3d/buffer.c \
210 wined3d/context.c \
211 wined3d/device.c \
212 wined3d/directx.c \
213 wined3d/drawprim.c \
214 wined3d/gl_compat.c \
215 wined3d/glsl_shader.c \
216 wined3d/nvidia_texture_shader.c \
217 wined3d/palette.c \
218 wined3d/query.c \
219 wined3d/resource.c \
220 wined3d/shader.c \
221 wined3d/shader_sm1.c \
222 wined3d/shader_sm4.c \
223 wined3d/state.c \
224 wined3d/stateblock.c \
225 wined3d/surface.c \
226 wined3d/swapchain.c \
227 wined3d/texture.c \
228 wined3d/utils.c \
229 wined3d/vertexdeclaration.c \
230 wined3d/view.c \
231 wined3d/volume.c \
232 wined3d/wined3d_main.c \
233 wined3d/vboxext.c \
234 wined3d/sampler.c \
235 vbox/libWineStub/debug.c \
236 vbox/VBoxDbgGl.c \
237 wined3d/wined3d.def \
238 vbox/wined3dxpdm.rc
239wined3d_LIBS = \
240 $(VBOX_LIB_IPRT_GUEST_R3) \
241 $(VBOX_LIB_VBGL_R3) \
242 $(PATH_STAGE_LIB)/VBoxOGL$(VBOX_SUFF_LIB)
243
244ifdef VBOX_WITH_WDDM
245 #
246 # wined3dwddm - ???
247 #
248 DLLS += wined3dwddm
249 wined3dwddm_EXTENDS = wined3d
250 if defined(VBOX_SIGNING_MODE)
251 wined3dwddm_INSTTYPE.win = none
252 wined3dwddm_DEBUG_INSTTYPE.win = both
253 endif
254 wined3dwddm_DEFS = $(wined3d_DEFS) \
255 VBOX_WITH_WDDM \
256 IN_VBOXLIBWINE \
257 VBOX_WINE_WITH_SHADER_CACHE
258ifdef VBOX_WINE_WITH_PROFILE
259 wined3dwddm_DEFS += VBOX_WINE_WITH_PROFILE
260endif
261 wined3dwddm_INCS = $(wined3d_INCS) \
262 $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/shared \
263 $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
264 wined3dwddm_SOURCES = $(subst wined3d.def,wined3dwddm.def,$(subst wined3dxpdm.rc,wined3dwddm.rc,$(wined3d_SOURCES)))
265 wined3dwddm_LIBS = $(wined3d_LIBS) \
266 $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB) \
267 $(VBOX_PATH_ADDITIONS_LIB)/VBoxWddmUmKmt$(VBOX_SUFF_LIB) \
268 $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi$(VBOX_SUFF_LIB)
269
270 #
271 # wined3dwddm-x86 - ???.
272 #
273 DLLS.amd64 += wined3dwddm-x86
274 wined3dwddm-x86_EXTENDS = wined3dwddm
275 wined3dwddm-x86_BLD_TRG_ARCH = x86
276 wined3dwddm-x86_DEFS = $(wined3dwddm_DEFS) VBOX_WDDM_WOW64
277 wined3dwddm-x86_LIBS = \
278 $(VBOX_LIB_IPRT_GUEST_R3_X86) \
279 $(VBOX_LIB_VBGL_R3_X86) \
280 $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \
281 $(VBOX_PATH_ADDITIONS_LIB)/VBoxWddmUmKmt-x86$(VBOX_SUFF_LIB) \
282 $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB) \
283 $(PATH_STAGE_LIB)/VBoxOGL-x86$(VBOX_SUFF_LIB)
284endif # ifdef VBOX_WITH_WDDM
285
286#
287# VBoxD3D8 - ???.
288#
289DLLS += VBoxD3D8
290VBoxD3D8_TEMPLATE = VBoxGuestWineDLL
291VBoxD3D8_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
292VBoxD3D8_DEFS = _USE_MATH_DEFINES \
293 VBOX_USING_WINDDK \
294 VBOX_WINE_WITHOUT_LIBWINE
295if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
296 VBoxD3D8_DEFS += WINE_NO_DEBUG_MSGS
297endif
298VBoxD3D8_INCS := \
299 vbox/libWineStub/include
300VBoxD3D8_SOURCES := \
301 d3d8/d3d8_main.c \
302 d3d8/buffer.c \
303 d3d8/device.c \
304 d3d8/directx.c \
305 d3d8/shader.c \
306 d3d8/surface.c \
307 d3d8/swapchain.c \
308 d3d8/texture.c \
309 d3d8/vertexdeclaration.c \
310 d3d8/volume.c \
311 vbox/libWineStub/debug.c \
312 d3d8/d3d8.def \
313 vbox/d3d8.rc
314VBoxD3D8_LIBS = \
315 $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB)
316VBoxD3D8_DEFS += VBOX_WINE_WITH_IPRT
317VBoxD3D8_LIBS += \
318 $(VBOX_LIB_IPRT_GUEST_R3) \
319 $(VBOX_LIB_VBGL_R3)
320
321#
322# VBoxD3D9 - ???.
323#
324DLLS += VBoxD3D9
325VBoxD3D9_TEMPLATE = VBoxGuestWineDLL
326VBoxD3D9_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
327VBoxD3D9_DEFS = _USE_MATH_DEFINES \
328 VBOX_USING_WINDDK \
329 VBOX_WINE_WITHOUT_LIBWINE
330if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
331 VBoxD3D9_DEFS += WINE_NO_DEBUG_MSGS
332endif
333#@todo: do we actually need this?
334#VBoxD3D9_DEFS += VBOX_WITH_WINE_FIX_NO9EX
335VBoxD3D9_INCS := \
336 vbox/libWineStub/include
337VBoxD3D9_SOURCES := \
338 d3d9/d3d9_main.c \
339 d3d9/buffer.c \
340 d3d9/device.c \
341 d3d9/directx.c \
342 d3d9/query.c \
343 d3d9/shader.c \
344 d3d9/stateblock.c \
345 d3d9/surface.c \
346 d3d9/swapchain.c \
347 d3d9/texture.c \
348 d3d9/vertexdeclaration.c \
349 d3d9/volume.c \
350 vbox/libWineStub/debug.c \
351 d3d9/d3d9xpdm.def \
352 vbox/d3d9xpdm.rc
353VBoxD3D9_SOURCES.amd64 = d3d9/vboxport.asm
354VBoxD3D9_LIBS = \
355 $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB)
356VBoxD3D9_DEFS += VBOX_WINE_WITH_IPRT
357VBoxD3D9_LIBS += \
358 $(VBOX_LIB_IPRT_GUEST_R3) \
359 $(VBOX_LIB_VBGL_R3)
360
361ifdef VBOX_WITH_WDDM
362 #
363 # VBoxD3D9wddm - ???.
364 #
365 DLLS += VBoxD3D9wddm
366 VBoxD3D9wddm_EXTENDS = VBoxD3D9
367 if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
368 VBoxD3D9wddm_INSTTYPE = none
369 VBoxD3D9wddm_DEBUG_INSTTYPE = both
370 endif
371 VBoxD3D9wddm_INCS = $(VBoxD3D9_INCS) \
372 $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/shared \
373 $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
374 VBoxD3D9wddm_DEFS += $(VBoxD3D9_DEFS) \
375 VBOX_WITH_WDDM \
376 IN_VBOXWINEEX \
377 VBOX_WINE_NO_LOCK
378 VBoxD3D9wddm_SOURCES = $(subst d3d9xpdm.def,d3d9wddm.def,$(subst d3d9xpdm.rc,d3d9wddm.rc,$(VBoxD3D9_SOURCES)))
379 VBoxD3D9wddm_LIBS = \
380 $(subst $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB),$(PATH_STAGE_LIB)/wined3dwddm$(VBOX_SUFF_LIB),$(VBoxD3D9_LIBS)) \
381 $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB) \
382 $(VBOX_PATH_ADDITIONS_LIB)/VBoxWddmUmKmt$(VBOX_SUFF_LIB) \
383 $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi$(VBOX_SUFF_LIB)
384
385 #
386 # VBoxD3D9wddm-x86 - For WOW64.
387 #
388 DLLS.amd64 += VBoxD3D9wddm-x86
389 VBoxD3D9wddm-x86_EXTENDS = VBoxD3D9wddm
390 VBoxD3D9wddm-x86_BLD_TRG_ARCH = x86
391 VBoxD3D9wddm-x86_DEFS = $(VBoxD3D9wddm_DEFS) VBOX_WDDM_WOW64
392 VBoxD3D9wddm-x86_LIBS = $(PATH_STAGE_LIB)/wined3dwddm-x86$(VBOX_SUFF_LIB)
393 VBoxD3D9wddm-x86_LIBS += \
394 $(VBOX_LIB_IPRT_GUEST_R3_X86) \
395 $(VBOX_LIB_VBGL_R3_X86)
396 VBoxD3D9wddm-x86_LIBS += \
397 $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \
398 $(VBOX_PATH_ADDITIONS_LIB)/VBoxWddmUmKmt-x86$(VBOX_SUFF_LIB) \
399 $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB)
400endif # VBOX_WITH_WDDM
401
402#
403# d3d8 - ???.
404#
405DLLS += d3d8
406d3d8_TEMPLATE = VBoxGuestWineD3DxDLL
407d3d8_SOURCES = \
408 switcher/d3d8_main.c \
409 switcher/sw_common.c \
410 switcher/sw_d3d8.def \
411 switcher/d3d8.rc
412
413#
414# d3d9 - ???.
415#
416DLLS += d3d9
417d3d9_TEMPLATE = VBoxGuestWineD3DxDLL
418d3d9_SOURCES = \
419 switcher/d3d9_main.c \
420 switcher/sw_common.c \
421 switcher/d3d9.rc
422d3d9_SOURCES.x86 = \
423 switcher/sw_d3d9.def
424d3d9_SOURCES.amd64 = \
425 switcher/sw_d3d9xpdm.def
426
427include $(FILE_KBUILD_SUB_FOOTER)
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette