1 | # $Id: Makefile.kmk 47061 2013-07-09 17:26:01Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the Wine D3D related dlls for VirtualBox.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2009-2012 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 |
|
---|
19 | SUB_DEPTH = ../../../../../..
|
---|
20 | include $(KBUILD_PATH)/subheader.kmk
|
---|
21 |
|
---|
22 | #
|
---|
23 | # Template for building wine stuff.
|
---|
24 | #
|
---|
25 | TEMPLATE_VBoxGuestWineDLL = Template for building a wine DLL.
|
---|
26 | TEMPLATE_VBoxGuestWineDLL_EXTENDS = VBOXGUESTR3NPDLL
|
---|
27 | TEMPLATE_VBoxGuestWineDLL_DEFS = $(TEMPLATE_VBOXGUESTR3NPDLL_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 |
|
---|
41 | TEMPLATE_VBoxGuestWineDLL_DEFS.x86 = __i386__
|
---|
42 |
|
---|
43 | #
|
---|
44 | # Template for building the D3D[89] stuff.
|
---|
45 | #
|
---|
46 | TEMPLATE_VBoxGuestWineD3DxDLL = Template for building the D3D8/9 stuff.
|
---|
47 | TEMPLATE_VBoxGuestWineD3DxDLL_EXTENDS = VBOXGUESTR3NPDLL
|
---|
48 | TEMPLATE_VBoxGuestWineD3DxDLL_EXTENDS_BY = appending
|
---|
49 | TEMPLATE_VBoxGuestWineD3DxDLL_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
|
---|
50 | TEMPLATE_VBoxGuestWineD3DxDLL_DEFS = VBOX_USING_WINDDK_W7_OR_LATER
|
---|
51 | TEMPLATE_VBoxGuestWineD3DxDLL_DEFS.x86 = __i386__
|
---|
52 | #TEMPLATE_VBoxGuestWineD3DxDLL_INCS.x86 = vbox/libWineStub/include
|
---|
53 | TEMPLATE_VBoxGuestWineD3DxDLL_DEFS = VBOX_WINE_WITH_IPRT
|
---|
54 | TEMPLATE_VBoxGuestWineD3DxDLL_LIBS = \
|
---|
55 | $(VBOX_LIB_IPRT_GUEST_R3) \
|
---|
56 | $(VBOX_LIB_VBGL_R3)
|
---|
57 |
|
---|
58 |
|
---|
59 | if 0
|
---|
60 | #
|
---|
61 | # libWine - ???.
|
---|
62 | #
|
---|
63 | DLLS.x86 += libWine
|
---|
64 | libWine_TEMPLATE = VBoxGuestWineDLL
|
---|
65 | libWine_INCS = \
|
---|
66 | include
|
---|
67 | libWine_SOURCES := \
|
---|
68 | libWine/wine.def \
|
---|
69 | libWine/casemap.c \
|
---|
70 | libWine/collation.c \
|
---|
71 | libWine/compose.c \
|
---|
72 | libWine/config.c \
|
---|
73 | libWine/cptable.c \
|
---|
74 | libWine/debug.c \
|
---|
75 | libWine/fold.c \
|
---|
76 | libWine/ldt.c \
|
---|
77 | libWine/loader.c \
|
---|
78 | libWine/mbtowc.c \
|
---|
79 | libWine/mmap.c \
|
---|
80 | libWine/port.c \
|
---|
81 | libWine/sortkey.c \
|
---|
82 | libWine/string.c \
|
---|
83 | libWine/utf8.c \
|
---|
84 | libWine/wctomb.c \
|
---|
85 | libWine/wctype.c \
|
---|
86 | libWine/c_037.c \
|
---|
87 | libWine/c_424.c \
|
---|
88 | libWine/c_437.c \
|
---|
89 | libWine/c_500.c \
|
---|
90 | libWine/c_737.c \
|
---|
91 | libWine/c_775.c \
|
---|
92 | libWine/c_850.c \
|
---|
93 | libWine/c_852.c \
|
---|
94 | libWine/c_855.c \
|
---|
95 | libWine/c_856.c \
|
---|
96 | libWine/c_857.c \
|
---|
97 | libWine/c_860.c \
|
---|
98 | libWine/c_861.c \
|
---|
99 | libWine/c_862.c \
|
---|
100 | libWine/c_863.c \
|
---|
101 | libWine/c_864.c \
|
---|
102 | libWine/c_865.c \
|
---|
103 | libWine/c_866.c \
|
---|
104 | libWine/c_869.c \
|
---|
105 | libWine/c_874.c \
|
---|
106 | libWine/c_875.c \
|
---|
107 | libWine/c_878.c \
|
---|
108 | libWine/c_932.c \
|
---|
109 | libWine/c_936.c \
|
---|
110 | libWine/c_949.c \
|
---|
111 | libWine/c_950.c \
|
---|
112 | libWine/c_1006.c \
|
---|
113 | libWine/c_1026.c \
|
---|
114 | libWine/c_1250.c \
|
---|
115 | libWine/c_1251.c \
|
---|
116 | libWine/c_1252.c \
|
---|
117 | libWine/c_1253.c \
|
---|
118 | libWine/c_1254.c \
|
---|
119 | libWine/c_1255.c \
|
---|
120 | libWine/c_1256.c \
|
---|
121 | libWine/c_1257.c \
|
---|
122 | libWine/c_1258.c \
|
---|
123 | libWine/c_1361.c \
|
---|
124 | libWine/c_10000.c \
|
---|
125 | libWine/c_10006.c \
|
---|
126 | libWine/c_10007.c \
|
---|
127 | libWine/c_10029.c \
|
---|
128 | libWine/c_10079.c \
|
---|
129 | libWine/c_10081.c \
|
---|
130 | libWine/c_20127.c \
|
---|
131 | libWine/c_20866.c \
|
---|
132 | libWine/c_20932.c \
|
---|
133 | libWine/c_21866.c \
|
---|
134 | libWine/c_28591.c \
|
---|
135 | libWine/c_28592.c \
|
---|
136 | libWine/c_28593.c \
|
---|
137 | libWine/c_28594.c \
|
---|
138 | libWine/c_28595.c \
|
---|
139 | libWine/c_28596.c \
|
---|
140 | libWine/c_28597.c \
|
---|
141 | libWine/c_28598.c \
|
---|
142 | libWine/c_28599.c \
|
---|
143 | libWine/c_28600.c \
|
---|
144 | libWine/c_28603.c \
|
---|
145 | libWine/c_28604.c \
|
---|
146 | libWine/c_28605.c \
|
---|
147 | libWine/c_28606.c \
|
---|
148 | libWine/version.c
|
---|
149 | endif # 0
|
---|
150 |
|
---|
151 | #
|
---|
152 | # wined3d - ???.
|
---|
153 | #
|
---|
154 | DLLS += wined3d
|
---|
155 | wined3d_TEMPLATE = VBoxGuestWineDLL
|
---|
156 | wined3d_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
|
---|
157 | wined3d_DEFS = \
|
---|
158 | _USE_MATH_DEFINES \
|
---|
159 | VBOX_USING_WINDDK_W7_OR_LATER \
|
---|
160 | VBOX_WINE_WITHOUT_LIBWINE \
|
---|
161 | VBOX_WINE_WITH_SINGLE_CONTEXT \
|
---|
162 | VBOX_WINE_WITH_IPRT
|
---|
163 | # ^^^^ wined3d is now using iprt/asm.h, which includes iprt/assert.h, so iprt is required.
|
---|
164 | if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
|
---|
165 | wined3d_DEFS += WINE_NO_DEBUG_MSGS
|
---|
166 | endif
|
---|
167 | wined3d_DEFS += \
|
---|
168 | VBOX_WITH_WINE_FIX_IBMTMR \
|
---|
169 | VBOX_WITH_WINE_FIX_BUFOFFSET \
|
---|
170 | VBOX_WITH_WINE_FIX_QUIRKS \
|
---|
171 | VBOX_WITH_WINE_FIX_PBOPSM \
|
---|
172 | VBOX_WITH_WINE_FIX_INITCLEAR \
|
---|
173 | VBOX_WITH_WINE_FIX_TEXCLEAR \
|
---|
174 | VBOX_WITH_WINE_FIX_STRINFOBUF \
|
---|
175 | VBOX_WITH_WINE_FIX_SHADERCLEANUP \
|
---|
176 | VBOX_WITH_WINE_DBG
|
---|
177 | #wined3d_DEFS += VBOX_WITH_WINE_FIXES
|
---|
178 | wined3d_INCS := \
|
---|
179 | vbox/libWineStub/include
|
---|
180 | wined3d_SOURCES := \
|
---|
181 | wined3d/arb_program_shader.c \
|
---|
182 | wined3d/ati_fragment_shader.c \
|
---|
183 | wined3d/buffer.c \
|
---|
184 | wined3d/context.c \
|
---|
185 | wined3d/device.c \
|
---|
186 | wined3d/directx.c \
|
---|
187 | wined3d/drawprim.c \
|
---|
188 | wined3d/gl_compat.c \
|
---|
189 | wined3d/glsl_shader.c \
|
---|
190 | wined3d/nvidia_texture_shader.c \
|
---|
191 | wined3d/palette.c \
|
---|
192 | wined3d/query.c \
|
---|
193 | wined3d/resource.c \
|
---|
194 | wined3d/shader.c \
|
---|
195 | wined3d/shader_sm1.c \
|
---|
196 | wined3d/shader_sm4.c \
|
---|
197 | wined3d/state.c \
|
---|
198 | wined3d/stateblock.c \
|
---|
199 | wined3d/surface.c \
|
---|
200 | wined3d/swapchain.c \
|
---|
201 | wined3d/texture.c \
|
---|
202 | wined3d/utils.c \
|
---|
203 | wined3d/vertexdeclaration.c \
|
---|
204 | wined3d/view.c \
|
---|
205 | wined3d/volume.c \
|
---|
206 | wined3d/wined3d_main.c \
|
---|
207 | wined3d/vboxext.c \
|
---|
208 | wined3d/sampler.c \
|
---|
209 | vbox/libWineStub/debug.c \
|
---|
210 | vbox/VBoxDbgGl.c \
|
---|
211 | wined3d/wined3d.def
|
---|
212 | wined3d_LIBS = \
|
---|
213 | $(VBOX_LIB_IPRT_GUEST_R3) \
|
---|
214 | $(VBOX_LIB_VBGL_R3) \
|
---|
215 | $(PATH_STAGE_LIB)/VBoxOGL$(VBOX_SUFF_LIB)
|
---|
216 |
|
---|
217 | ifdef VBOX_WITH_WDDM
|
---|
218 | #
|
---|
219 | # wined3dwddm - ???
|
---|
220 | #
|
---|
221 | DLLS += wined3dwddm
|
---|
222 | wined3dwddm_EXTENDS = wined3d
|
---|
223 | if defined(VBOX_SIGNING_MODE)
|
---|
224 | wined3dwddm_INSTTYPE.win = none
|
---|
225 | wined3dwddm_DEBUG_INSTTYPE.win = both
|
---|
226 | endif
|
---|
227 | wined3dwddm_DEFS = $(wined3d_DEFS) \
|
---|
228 | VBOX_WITH_WDDM \
|
---|
229 | IN_VBOXLIBWINE \
|
---|
230 | VBOX_WINE_WITH_SHADER_CACHE
|
---|
231 | ifdef VBOX_WINE_WITH_PROFILE
|
---|
232 | wined3dwddm_DEFS += VBOX_WINE_WITH_PROFILE
|
---|
233 | endif
|
---|
234 | wined3dwddm_INCS = $(wined3d_INCS) \
|
---|
235 | $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
|
---|
236 | wined3dwddm_SOURCES = $(subst wined3d.def,wined3dwddm.def,$(wined3d_SOURCES))
|
---|
237 | wined3dwddm_LIBS = $(wined3d_LIBS) \
|
---|
238 | $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB) \
|
---|
239 | $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi$(VBOX_SUFF_LIB)
|
---|
240 |
|
---|
241 | #
|
---|
242 | # wined3dwddm-x86 - ???.
|
---|
243 | #
|
---|
244 | DLLS.amd64 += wined3dwddm-x86
|
---|
245 | wined3dwddm-x86_EXTENDS = wined3dwddm
|
---|
246 | wined3dwddm-x86_BLD_TRG_ARCH = x86
|
---|
247 | wined3dwddm-x86_DEFS = $(wined3dwddm_DEFS) VBOX_WDDM_WOW64
|
---|
248 | wined3dwddm-x86_LIBS = \
|
---|
249 | $(VBOX_LIB_IPRT_GUEST_R3_X86) \
|
---|
250 | $(VBOX_LIB_VBGL_R3_X86) \
|
---|
251 | $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \
|
---|
252 | $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB) \
|
---|
253 | $(PATH_STAGE_LIB)/VBoxOGL-x86$(VBOX_SUFF_LIB)
|
---|
254 | endif # ifdef VBOX_WITH_WDDM
|
---|
255 |
|
---|
256 | #
|
---|
257 | # VBoxD3D8 - ???.
|
---|
258 | #
|
---|
259 | DLLS += VBoxD3D8
|
---|
260 | VBoxD3D8_TEMPLATE = VBoxGuestWineDLL
|
---|
261 | VBoxD3D8_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
|
---|
262 | VBoxD3D8_DEFS = _USE_MATH_DEFINES \
|
---|
263 | VBOX_USING_WINDDK \
|
---|
264 | VBOX_WINE_WITHOUT_LIBWINE
|
---|
265 | if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
|
---|
266 | VBoxD3D8_DEFS += WINE_NO_DEBUG_MSGS
|
---|
267 | endif
|
---|
268 | VBoxD3D8_INCS := \
|
---|
269 | vbox/libWineStub/include
|
---|
270 | VBoxD3D8_SOURCES := \
|
---|
271 | d3d8/d3d8_main.c \
|
---|
272 | d3d8/buffer.c \
|
---|
273 | d3d8/device.c \
|
---|
274 | d3d8/directx.c \
|
---|
275 | d3d8/shader.c \
|
---|
276 | d3d8/surface.c \
|
---|
277 | d3d8/swapchain.c \
|
---|
278 | d3d8/texture.c \
|
---|
279 | d3d8/vertexdeclaration.c \
|
---|
280 | d3d8/volume.c \
|
---|
281 | vbox/libWineStub/debug.c \
|
---|
282 | d3d8/d3d8.def
|
---|
283 | VBoxD3D8_LIBS = \
|
---|
284 | $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB)
|
---|
285 | VBoxD3D8_DEFS += VBOX_WINE_WITH_IPRT
|
---|
286 | VBoxD3D8_LIBS += \
|
---|
287 | $(VBOX_LIB_IPRT_GUEST_R3) \
|
---|
288 | $(VBOX_LIB_VBGL_R3)
|
---|
289 |
|
---|
290 | #
|
---|
291 | # VBoxD3D9 - ???.
|
---|
292 | #
|
---|
293 | DLLS += VBoxD3D9
|
---|
294 | VBoxD3D9_TEMPLATE = VBoxGuestWineDLL
|
---|
295 | VBoxD3D9_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
|
---|
296 | VBoxD3D9_DEFS = _USE_MATH_DEFINES \
|
---|
297 | VBOX_USING_WINDDK \
|
---|
298 | VBOX_WINE_WITHOUT_LIBWINE
|
---|
299 | if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
|
---|
300 | VBoxD3D9_DEFS += WINE_NO_DEBUG_MSGS
|
---|
301 | endif
|
---|
302 | #@todo: do we actually need this?
|
---|
303 | #VBoxD3D9_DEFS += VBOX_WITH_WINE_FIX_NO9EX
|
---|
304 | VBoxD3D9_INCS := \
|
---|
305 | vbox/libWineStub/include
|
---|
306 | VBoxD3D9_SOURCES := \
|
---|
307 | d3d9/d3d9_main.c \
|
---|
308 | d3d9/buffer.c \
|
---|
309 | d3d9/device.c \
|
---|
310 | d3d9/directx.c \
|
---|
311 | d3d9/query.c \
|
---|
312 | d3d9/shader.c \
|
---|
313 | d3d9/stateblock.c \
|
---|
314 | d3d9/surface.c \
|
---|
315 | d3d9/swapchain.c \
|
---|
316 | d3d9/texture.c \
|
---|
317 | d3d9/vertexdeclaration.c \
|
---|
318 | d3d9/volume.c \
|
---|
319 | vbox/libWineStub/debug.c \
|
---|
320 | d3d9/d3d9xpdm.def
|
---|
321 | VBoxD3D9_LIBS = \
|
---|
322 | $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB)
|
---|
323 | VBoxD3D9_DEFS += VBOX_WINE_WITH_IPRT
|
---|
324 | VBoxD3D9_LIBS += \
|
---|
325 | $(VBOX_LIB_IPRT_GUEST_R3) \
|
---|
326 | $(VBOX_LIB_VBGL_R3)
|
---|
327 |
|
---|
328 | ifdef VBOX_WITH_WDDM
|
---|
329 | #
|
---|
330 | # VBoxD3D9wddm - ???.
|
---|
331 | #
|
---|
332 | DLLS += VBoxD3D9wddm
|
---|
333 | VBoxD3D9wddm_EXTENDS = VBoxD3D9
|
---|
334 | if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
|
---|
335 | VBoxD3D9wddm_INSTTYPE = none
|
---|
336 | VBoxD3D9wddm_DEBUG_INSTTYPE = both
|
---|
337 | endif
|
---|
338 | VBoxD3D9wddm_INCS = $(VBoxD3D9_INCS) \
|
---|
339 | $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
|
---|
340 | VBoxD3D9wddm_DEFS += $(VBoxD3D9_DEFS) \
|
---|
341 | VBOX_WITH_WDDM \
|
---|
342 | IN_VBOXWINEEX \
|
---|
343 | VBOX_WINE_NO_LOCK
|
---|
344 | VBoxD3D9wddm_SOURCES = $(subst d3d9xpdm.def,d3d9wddm.def,$(VBoxD3D9_SOURCES))
|
---|
345 | VBoxD3D9wddm_LIBS = \
|
---|
346 | $(subst $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB),$(PATH_STAGE_LIB)/wined3dwddm$(VBOX_SUFF_LIB),$(VBoxD3D9_LIBS)) \
|
---|
347 | $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB) \
|
---|
348 | $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi$(VBOX_SUFF_LIB)
|
---|
349 |
|
---|
350 | #
|
---|
351 | # VBoxD3D9wddm-x86 - For WOW64.
|
---|
352 | #
|
---|
353 | DLLS.amd64 += VBoxD3D9wddm-x86
|
---|
354 | VBoxD3D9wddm-x86_EXTENDS = VBoxD3D9wddm
|
---|
355 | VBoxD3D9wddm-x86_BLD_TRG_ARCH = x86
|
---|
356 | VBoxD3D9wddm-x86_DEFS = $(VBoxD3D9wddm_DEFS) VBOX_WDDM_WOW64
|
---|
357 | VBoxD3D9wddm-x86_LIBS = $(PATH_STAGE_LIB)/wined3dwddm-x86$(VBOX_SUFF_LIB)
|
---|
358 | VBoxD3D9wddm-x86_LIBS += \
|
---|
359 | $(VBOX_LIB_IPRT_GUEST_R3_X86) \
|
---|
360 | $(VBOX_LIB_VBGL_R3_X86)
|
---|
361 | VBoxD3D9wddm-x86_LIBS += \
|
---|
362 | $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \
|
---|
363 | $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB)
|
---|
364 | endif # VBOX_WITH_WDDM
|
---|
365 |
|
---|
366 | #
|
---|
367 | # d3d8 - ???.
|
---|
368 | #
|
---|
369 | DLLS += d3d8
|
---|
370 | d3d8_TEMPLATE = VBoxGuestWineD3DxDLL
|
---|
371 | d3d8_SOURCES = \
|
---|
372 | switcher/d3d8_main.c \
|
---|
373 | switcher/sw_common.c \
|
---|
374 | switcher/sw_d3d8.def \
|
---|
375 | switcher/d3d8.rc
|
---|
376 |
|
---|
377 | #
|
---|
378 | # d3d9 - ???.
|
---|
379 | #
|
---|
380 | DLLS += d3d9
|
---|
381 | d3d9_TEMPLATE = VBoxGuestWineD3DxDLL
|
---|
382 | d3d9_SOURCES = \
|
---|
383 | switcher/d3d9_main.c \
|
---|
384 | switcher/sw_common.c \
|
---|
385 | switcher/d3d9.rc
|
---|
386 | d3d9_SOURCES.x86 = \
|
---|
387 | switcher/sw_d3d9.def
|
---|
388 | d3d9_SOURCES.amd64 = \
|
---|
389 | switcher/sw_d3d9xpdm.def
|
---|
390 |
|
---|
391 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|