1 ACLOCAL_AMFLAGS = -I m4
2 AM_CFLAGS = @VKD3D_CFLAGS@
3 AM_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/include/private -I$(builddir)/include/private
4 AM_LDFLAGS = -no-undefined
7 include/vkd3d_d3d12.h \
8 include/vkd3d_d3d12sdklayers.h \
9 include/vkd3d_d3d12shader.h \
10 include/vkd3d_d3dcommon.h \
11 include/vkd3d_d3dx9shader.h \
12 include/vkd3d_dxgi.h \
13 include/vkd3d_dxgi1_2.h \
14 include/vkd3d_dxgi1_3.h \
15 include/vkd3d_dxgi1_4.h \
16 include/vkd3d_dxgibase.h \
17 include/vkd3d_dxgiformat.h \
18 include/vkd3d_dxgitype.h \
21 vkd3d_public_headers = \
23 include/vkd3d_d3d12.h \
24 include/vkd3d_d3d12sdklayers.h \
25 include/vkd3d_d3d12shader.h \
26 include/vkd3d_d3d9types.h \
27 include/vkd3d_d3dcommon.h \
28 include/vkd3d_d3dcompiler.h \
29 include/vkd3d_d3dcompiler_types.h \
30 include/vkd3d_d3dx9shader.h \
31 include/vkd3d_dxgibase.h \
32 include/vkd3d_dxgiformat.h \
33 include/vkd3d_shader.h \
34 include/vkd3d_types.h \
35 include/vkd3d_utils.h \
36 include/vkd3d_windows.h
41 tests/vkd3d_shader_api
45 tests/d3d12_invalid_usage \
48 vkd3d_shader_tests = \
49 tests/hlsl/abs.shader_test \
50 tests/hlsl/all.shader_test \
51 tests/hlsl/alpha-test.shader_test \
52 tests/hlsl/angle-unit.shader_test \
53 tests/hlsl/any.shader_test \
54 tests/hlsl/arithmetic-float-uniform.shader_test \
55 tests/hlsl/arithmetic-float.shader_test \
56 tests/hlsl/arithmetic-int-uniform.shader_test \
57 tests/hlsl/arithmetic-int.shader_test \
58 tests/hlsl/arithmetic-uint.shader_test \
59 tests/hlsl/array-dimension.shader_test \
60 tests/hlsl/array-parameters.shader_test \
61 tests/hlsl/array-size-expr.shader_test \
62 tests/hlsl/asfloat.shader_test \
63 tests/hlsl/asint.shader_test \
64 tests/hlsl/asuint.shader_test \
65 tests/hlsl/attributes.shader_test \
66 tests/hlsl/bitwise-assignment.shader_test \
67 tests/hlsl/bitwise.shader_test \
68 tests/hlsl/bool-cast.shader_test \
69 tests/hlsl/bool-semantics.shader_test \
70 tests/hlsl/calculate-lod.shader_test \
71 tests/hlsl/cast-64-bit.shader_test \
72 tests/hlsl/cast-broadcast.shader_test \
73 tests/hlsl/cast-componentwise-compatible.shader_test \
74 tests/hlsl/cast-componentwise-equal.shader_test \
75 tests/hlsl/cast-to-float.shader_test \
76 tests/hlsl/cast-to-half.shader_test \
77 tests/hlsl/cast-to-int.shader_test \
78 tests/hlsl/cast-to-uint.shader_test \
79 tests/hlsl/cbuffer.shader_test \
80 tests/hlsl/ceil.shader_test \
81 tests/hlsl/cf-cond-types.shader_test \
82 tests/hlsl/clamp.shader_test \
83 tests/hlsl/clip-cull-distance.shader_test \
84 tests/hlsl/clip-planes.shader_test \
85 tests/hlsl/clip.shader_test \
86 tests/hlsl/combined-samplers.shader_test \
87 tests/hlsl/comma.shader_test \
88 tests/hlsl/compute.shader_test \
89 tests/hlsl/conditional.shader_test \
90 tests/hlsl/const.shader_test \
91 tests/hlsl/constructgswithso.shader_test \
92 tests/hlsl/coverage.shader_test \
93 tests/hlsl/cross.shader_test \
94 tests/hlsl/d3dcolor-to-ubyte4.shader_test \
95 tests/hlsl/ddxddy.shader_test \
96 tests/hlsl/default-values.shader_test \
97 tests/hlsl/depth-bounds.shader_test \
98 tests/hlsl/depth-out.shader_test \
99 tests/hlsl/determinant.shader_test \
100 tests/hlsl/discard.shader_test \
101 tests/hlsl/distance.shader_test \
102 tests/hlsl/dot.shader_test \
103 tests/hlsl/duplicate-modifiers.shader_test \
104 tests/hlsl/early-depth-stencil.shader_test \
105 tests/hlsl/effect-annotations-fx_2.shader_test \
106 tests/hlsl/effect-annotations-fx_4.shader_test \
107 tests/hlsl/effect-assignments-fx_5.shader_test \
108 tests/hlsl/effect-compile.shader_test \
109 tests/hlsl/effect-initial-values-fx_2.shader_test \
110 tests/hlsl/effect-initial-values-fx_4.shader_test \
111 tests/hlsl/effect-pass-states-fx_5.shader_test \
112 tests/hlsl/effect-shader-objects-fx_2.shader_test \
113 tests/hlsl/effect-shader-objects-fx_5.shader_test \
114 tests/hlsl/effect-technique-fx_2.shader_test \
115 tests/hlsl/effect-technique-fx_4.shader_test \
116 tests/hlsl/effect-technique-fx_5.shader_test \
117 tests/hlsl/effect-variables-fx_2.shader_test \
118 tests/hlsl/effect-variables-fx_4.shader_test \
119 tests/hlsl/effect-variables-fx_5.shader_test \
120 tests/hlsl/entry-point-semantics.shader_test \
121 tests/hlsl/eval-attrib.shader_test \
122 tests/hlsl/exp.shader_test \
123 tests/hlsl/expr-indexing.shader_test \
124 tests/hlsl/f16tof32.shader_test \
125 tests/hlsl/f32tof16.shader_test \
126 tests/hlsl/faceforward.shader_test \
127 tests/hlsl/fog.shader_test \
128 tests/hlsl/ffp-point-size.shader_test \
129 tests/hlsl/float-comparison.shader_test \
130 tests/hlsl/floor.shader_test \
131 tests/hlsl/fmod.shader_test \
132 tests/hlsl/for.shader_test \
133 tests/hlsl/frac.shader_test \
134 tests/hlsl/function-cast.shader_test \
135 tests/hlsl/function-overload.shader_test \
136 tests/hlsl/function-return.shader_test \
137 tests/hlsl/function.shader_test \
138 tests/hlsl/fwidth.shader_test \
139 tests/hlsl/fxgroup-syntax.shader_test \
140 tests/hlsl/gather-cmp.shader_test \
141 tests/hlsl/gather-offset.shader_test \
142 tests/hlsl/gather.shader_test \
143 tests/hlsl/geometry.shader_test \
144 tests/hlsl/get-sample-pos.shader_test \
145 tests/hlsl/getdimensions.shader_test \
146 tests/hlsl/half.shader_test \
147 tests/hlsl/hard-copy-prop.shader_test \
148 tests/hlsl/hull-shader-attributes.shader_test \
149 tests/hlsl/hull-shader-syntax.shader_test \
150 tests/hlsl/initializer-flatten.shader_test \
151 tests/hlsl/initializer-implicit-array.shader_test \
152 tests/hlsl/initializer-invalid-arg-count.shader_test \
153 tests/hlsl/initializer-local-array.shader_test \
154 tests/hlsl/initializer-matrix.shader_test \
155 tests/hlsl/initializer-multi.shader_test \
156 tests/hlsl/initializer-nested.shader_test \
157 tests/hlsl/initializer-numeric.shader_test \
158 tests/hlsl/initializer-objects.shader_test \
159 tests/hlsl/initializer-static-array.shader_test \
160 tests/hlsl/initializer-struct.shader_test \
161 tests/hlsl/instance-id.shader_test \
162 tests/hlsl/interface-packing.shader_test \
163 tests/hlsl/intrinsic-override.shader_test \
164 tests/hlsl/invalid.shader_test \
165 tests/hlsl/inverse-trig.shader_test \
166 tests/hlsl/is-front-face.shader_test \
167 tests/hlsl/isinf.shader_test \
168 tests/hlsl/ldexp.shader_test \
169 tests/hlsl/length.shader_test \
170 tests/hlsl/lerp.shader_test \
171 tests/hlsl/lhs-cast.shader_test \
172 tests/hlsl/lhs-partial-assignment.shader_test \
173 tests/hlsl/lit.shader_test \
174 tests/hlsl/load-level.shader_test \
175 tests/hlsl/log.shader_test \
176 tests/hlsl/logic-operations.shader_test \
177 tests/hlsl/loop.shader_test \
178 tests/hlsl/majority-pragma.shader_test \
179 tests/hlsl/majority-syntax.shader_test \
180 tests/hlsl/majority-typedef.shader_test \
181 tests/hlsl/math.shader_test \
182 tests/hlsl/matrix-indexing.shader_test \
183 tests/hlsl/matrix-semantics.shader_test \
184 tests/hlsl/max-min.shader_test \
185 tests/hlsl/minimum-precision.shader_test \
186 tests/hlsl/modf.shader_test \
187 tests/hlsl/mul.shader_test \
188 tests/hlsl/multiple-rt.shader_test \
189 tests/hlsl/nested-arrays.shader_test \
190 tests/hlsl/nointerpolation.shader_test \
191 tests/hlsl/non-const-indexing.shader_test \
192 tests/hlsl/normalize.shader_test \
193 tests/hlsl/null.shader_test \
194 tests/hlsl/numeric-constructor-truncation.shader_test \
195 tests/hlsl/numeric-types.shader_test \
196 tests/hlsl/numthreads.shader_test \
197 tests/hlsl/object-field-offsets.shader_test \
198 tests/hlsl/object-parameters.shader_test \
199 tests/hlsl/object-references.shader_test \
200 tests/hlsl/point-sprite.shader_test \
201 tests/hlsl/pointer-cast.shader_test \
202 tests/hlsl/pow.shader_test \
203 tests/hlsl/precise-modifier.shader_test \
204 tests/hlsl/rasteriser-ordered-views.shader_test \
205 tests/hlsl/rcp.shader_test \
206 tests/hlsl/reflect.shader_test \
207 tests/hlsl/refract.shader_test \
208 tests/hlsl/register-reservations-numeric.shader_test \
209 tests/hlsl/register-reservations-profile.shader_test \
210 tests/hlsl/register-reservations-resources.shader_test \
211 tests/hlsl/register-reservations-space.shader_test \
212 tests/hlsl/return-implicit-conversion.shader_test \
213 tests/hlsl/return.shader_test \
214 tests/hlsl/round.shader_test \
215 tests/hlsl/rt-array-index.shader_test \
216 tests/hlsl/rt-format-mismatch.shader_test \
217 tests/hlsl/rt-get-sample-info.shader_test \
218 tests/hlsl/sample-bias.shader_test \
219 tests/hlsl/sample-cmp.shader_test \
220 tests/hlsl/sample-grad.shader_test \
221 tests/hlsl/sample-level.shader_test \
222 tests/hlsl/sampler-offset.shader_test \
223 tests/hlsl/sampler-state.shader_test \
224 tests/hlsl/sampler.shader_test \
225 tests/hlsl/saturate.shader_test \
226 tests/hlsl/shade-mode.shader_test \
227 tests/hlsl/shader-interstage-interface.shader_test \
228 tests/hlsl/shader-point-size.shader_test \
229 tests/hlsl/shape.shader_test \
230 tests/hlsl/side-effects.shader_test \
231 tests/hlsl/sign.shader_test \
232 tests/hlsl/single-numeric-initializer.shader_test \
233 tests/hlsl/sm1-const-allocation.shader_test \
234 tests/hlsl/sm1-const-folding.shader_test \
235 tests/hlsl/sm1-interstage-interface.shader_test \
236 tests/hlsl/sm6-ternary.shader_test \
237 tests/hlsl/sm6-uav-rwtexture.shader_test \
238 tests/hlsl/smoothstep.shader_test \
239 tests/hlsl/sqrt.shader_test \
240 tests/hlsl/srv-buffers.shader_test \
241 tests/hlsl/srv-byteaddressbuffer.shader_test \
242 tests/hlsl/state-block-function-syntax.shader_test \
243 tests/hlsl/state-block-syntax.shader_test \
244 tests/hlsl/static-initializer.shader_test \
245 tests/hlsl/step.shader_test \
246 tests/hlsl/storage-qualifiers.shader_test \
247 tests/hlsl/strings.shader_test \
248 tests/hlsl/struct-array.shader_test \
249 tests/hlsl/struct-assignment.shader_test \
250 tests/hlsl/struct-inheritance.shader_test \
251 tests/hlsl/struct-semantics.shader_test \
252 tests/hlsl/switch.shader_test \
253 tests/hlsl/swizzle-constant-prop.shader_test \
254 tests/hlsl/swizzle-matrix.shader_test \
255 tests/hlsl/swizzles.shader_test \
256 tests/hlsl/ternary.shader_test \
257 tests/hlsl/tessellation-patch-vars.shader_test \
258 tests/hlsl/tessellation.shader_test \
259 tests/hlsl/texture-load-offset.shader_test \
260 tests/hlsl/texture-load-typed.shader_test \
261 tests/hlsl/texture-load.shader_test \
262 tests/hlsl/texture-ordering.shader_test \
263 tests/hlsl/tgsm.shader_test \
264 tests/hlsl/transpose.shader_test \
265 tests/hlsl/trigonometry.shader_test \
266 tests/hlsl/trunc.shader_test \
267 tests/hlsl/type-names.shader_test \
268 tests/hlsl/uav-atomics.shader_test \
269 tests/hlsl/uav-counter.shader_test \
270 tests/hlsl/uav-load.shader_test \
271 tests/hlsl/uav-out-param.shader_test \
272 tests/hlsl/uav-rwbuffer.shader_test \
273 tests/hlsl/uav-rwbyteaddressbuffer.shader_test \
274 tests/hlsl/uav-rwstructuredbuffer.shader_test \
275 tests/hlsl/uav-rwtexture.shader_test \
276 tests/hlsl/unbounded-array-5.1.shader_test \
277 tests/hlsl/uniform-parameters.shader_test \
278 tests/hlsl/uniform-semantics.shader_test \
279 tests/hlsl/uninitialized-varyings.shader_test \
280 tests/hlsl/unorm-snorm.shader_test \
281 tests/hlsl/unroll.shader_test \
282 tests/hlsl/unsigned.shader_test \
283 tests/hlsl/vector-indexing-uniform.shader_test \
284 tests/hlsl/vector-indexing.shader_test \
285 tests/hlsl/vertex-shader-ops.shader_test \
286 tests/hlsl/wave-ops-float.shader_test \
287 tests/hlsl/wave-ops-int.shader_test \
288 tests/hlsl/wave-ops-uint.shader_test \
289 tests/hlsl/wave-reconvergence.shader_test \
290 tests/hlsl/writemask-assignop-0.shader_test \
291 tests/hlsl/writemask-assignop-1.shader_test \
292 tests/hlsl/writemask-assignop-2.shader_test \
293 tests/hlsl/writemask-assignop-3.shader_test \
294 tests/preproc-if-expr.shader_test \
295 tests/preproc-if.shader_test \
296 tests/preproc-ifdef.shader_test \
297 tests/preproc-invalid.shader_test \
298 tests/preproc-macro.shader_test \
299 tests/preproc-misc.shader_test
301 vkd3d_test_headers = \
302 tests/d3d12_crosstest.h \
303 tests/d3d12_test_utils.h \
305 tests/shader_runner.h \
307 tests/vulkan_procs.h \
314 vkd3d_demos_headers = \
319 BUILT_SOURCES = $(widl_headers) \
320 include/private/vkd3d_version.h
322 noinst_LTLIBRARIES = libvkd3d-common.la
323 libvkd3d_common_la_SOURCES = \
324 libs/vkd3d-common/blob.c \
325 libs/vkd3d-common/debug.c \
326 libs/vkd3d-common/error.c \
327 libs/vkd3d-common/memory.c \
328 libs/vkd3d-common/utf8.c
329 libvkd3d_common_la_LIBADD = @PTHREAD_LIBS@
331 lib_LTLIBRARIES = libvkd3d-shader.la libvkd3d.la libvkd3d-utils.la
333 VKD3D_V_FLEX = $(vkd3d_v_flex_@AM_V@)
334 vkd3d_v_flex_ = $(vkd3d_v_flex_@AM_DEFAULT_V@)
335 vkd3d_v_flex_0 = @echo " FLEX " $@;
338 VKD3D_V_BISON = $(vkd3d_v_bison_@AM_V@)
339 vkd3d_v_bison_ = $(vkd3d_v_bison_@AM_DEFAULT_V@)
340 vkd3d_v_bison_0 = @echo " BISON " $@;
343 libs/vkd3d-shader/preproc.yy.c: libs/vkd3d-shader/preproc.l
344 @$(MKDIR_P) libs/vkd3d-shader
345 $(VKD3D_V_FLEX)$(FLEX) $(LFLAGS) -o $@ $<
347 libs/vkd3d-shader/preproc.tab.c libs/vkd3d-shader/preproc.tab.h &: libs/vkd3d-shader/preproc.y
348 @$(MKDIR_P) libs/vkd3d-shader
349 $(VKD3D_V_BISON)$(BISON) $(YFLAGS) -d -o libs/vkd3d-shader/preproc.tab.c $<
351 libs/vkd3d-shader/hlsl.yy.c: $(srcdir)/libs/vkd3d-shader/hlsl.l
352 @$(MKDIR_P) libs/vkd3d-shader
353 $(VKD3D_V_FLEX)$(FLEX) $(LFLAGS) -o $@ $<
355 libs/vkd3d-shader/hlsl.tab.c libs/vkd3d-shader/hlsl.tab.h &: libs/vkd3d-shader/hlsl.y
356 @$(MKDIR_P) libs/vkd3d-shader
357 $(VKD3D_V_BISON)$(BISON) $(YFLAGS) -d -o libs/vkd3d-shader/hlsl.tab.c $<
360 libs/vkd3d-shader/hlsl.tab.h \
361 libs/vkd3d-shader/preproc.tab.h
363 vkd3d_shader_yyfiles = \
364 libs/vkd3d-shader/hlsl.tab.c \
365 libs/vkd3d-shader/hlsl.tab.h \
366 libs/vkd3d-shader/hlsl.yy.c \
367 libs/vkd3d-shader/preproc.tab.c \
368 libs/vkd3d-shader/preproc.tab.h \
369 libs/vkd3d-shader/preproc.yy.c
371 CLEANFILES = $(vkd3d_shader_yyfiles)
373 nodist_libvkd3d_shader_la_SOURCES = $(vkd3d_shader_yyfiles)
375 libvkd3d_shader_la_SOURCES = \
376 include/private/list.h \
377 include/private/rbtree.h \
378 include/private/vkd3d_common.h \
379 include/private/vkd3d_memory.h \
380 include/vkd3d_shader.h \
381 libs/vkd3d-shader/checksum.c \
382 libs/vkd3d-shader/d3d_asm.c \
383 libs/vkd3d-shader/d3dbc.c \
384 libs/vkd3d-shader/dxbc.c \
385 libs/vkd3d-shader/dxil.c \
386 libs/vkd3d-shader/fx.c \
387 libs/vkd3d-shader/glsl.c \
388 libs/vkd3d-shader/hlsl.c \
389 libs/vkd3d-shader/hlsl.h \
390 libs/vkd3d-shader/hlsl_codegen.c \
391 libs/vkd3d-shader/hlsl_constant_ops.c \
392 libs/vkd3d-shader/ir.c \
393 libs/vkd3d-shader/msl.c \
394 libs/vkd3d-shader/preproc.h \
395 libs/vkd3d-shader/spirv.c \
396 libs/vkd3d-shader/tpf.c \
397 libs/vkd3d-shader/vkd3d_shader.map \
398 libs/vkd3d-shader/vkd3d_shader_main.c \
399 libs/vkd3d-shader/vkd3d_shader_private.h
400 libvkd3d_shader_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_SHADER_SOURCE -I$(srcdir)/libs/vkd3d-shader @SPIRV_TOOLS_CFLAGS@
401 libvkd3d_shader_la_LDFLAGS = $(AM_LDFLAGS) -version-info 13:0:12
402 libvkd3d_shader_la_LIBADD = libvkd3d-common.la @SPIRV_TOOLS_LIBS@ -lm
403 if HAVE_LD_VERSION_SCRIPT
404 libvkd3d_shader_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-shader/vkd3d_shader.map
405 EXTRA_libvkd3d_shader_la_DEPENDENCIES = $(srcdir)/libs/vkd3d-shader/vkd3d_shader.map
409 libs/vkd3d-shader/hlsl.l \
410 libs/vkd3d-shader/hlsl.y \
411 libs/vkd3d-shader/preproc.l \
412 libs/vkd3d-shader/preproc.y
414 libvkd3d_la_SOURCES = \
415 include/private/vkd3d_blob.h \
416 include/private/vkd3d_common.h \
417 include/private/vkd3d_memory.h \
418 include/private/vkd3d_shader_utils.h \
419 include/private/vkd3d_test.h \
420 include/private/vkd3d_utf8.h \
421 include/vkd3d_d3d12.idl \
422 include/vkd3d_d3dcommon.idl \
423 include/vkd3d_unknown.idl \
425 libs/vkd3d/command.c \
426 libs/vkd3d/device.c \
427 libs/vkd3d/resource.c \
430 libs/vkd3d/vkd3d.map \
431 libs/vkd3d/vkd3d_main.c \
432 libs/vkd3d/vkd3d_private.h \
433 libs/vkd3d/vkd3d_shaders.h \
434 libs/vkd3d/vulkan_procs.h
435 libvkd3d_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_SOURCE
436 libvkd3d_la_LDFLAGS = $(AM_LDFLAGS) -version-info 15:0:14
437 libvkd3d_la_LIBADD = libvkd3d-common.la libvkd3d-shader.la @DL_LIBS@ @PTHREAD_LIBS@
438 if HAVE_LD_VERSION_SCRIPT
439 libvkd3d_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d/vkd3d.map
440 EXTRA_libvkd3d_la_DEPENDENCIES = $(srcdir)/libs/vkd3d/vkd3d.map
443 libvkd3d_utils_la_SOURCES = \
444 libs/vkd3d-utils/reflection.c \
445 libs/vkd3d-utils/vkd3d_utils.map \
446 libs/vkd3d-utils/vkd3d_utils_main.c \
447 libs/vkd3d-utils/vkd3d_utils_private.h
448 libvkd3d_utils_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_UTILS_SOURCE
449 libvkd3d_utils_la_LDFLAGS = $(AM_LDFLAGS) -version-info 7:0:6
450 libvkd3d_utils_la_LIBADD = libvkd3d-common.la libvkd3d-shader.la libvkd3d.la @PTHREAD_LIBS@
451 if HAVE_LD_VERSION_SCRIPT
452 libvkd3d_utils_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-utils/vkd3d_utils.map
453 EXTRA_libvkd3d_utils_la_DEPENDENCIES = $(srcdir)/libs/vkd3d-utils/vkd3d_utils.map
456 EXTRA_DIST += ANNOUNCE LICENSE
458 pkgconfigdir = $(libdir)/pkgconfig
459 pkginclude_HEADERS = $(vkd3d_public_headers)
460 nodist_pkgconfig_DATA = libvkd3d.pc libvkd3d-shader.pc libvkd3d-utils.pc
461 CLEANFILES += libvkd3d.pc libvkd3d-shader.pc libvkd3d-utils.pc
463 libs/vkd3d/libvkd3d.pc.in \
464 libs/vkd3d-shader/libvkd3d-shader.pc.in \
465 libs/vkd3d-utils/libvkd3d-utils.pc.in
467 bin_PROGRAMS = vkd3d-compiler vkd3d-dxbc
469 vkd3d_compiler_SOURCES = programs/vkd3d-compiler/main.c
470 vkd3d_compiler_CFLAGS = $(AM_CFLAGS) @NCURSES_CFLAGS@
471 vkd3d_compiler_LDADD = libvkd3d-shader.la @NCURSES_LIBS@
473 vkd3d_dxbc_SOURCES = programs/vkd3d-dxbc/main.c
474 vkd3d_dxbc_CFLAGS = $(AM_CFLAGS) @NCURSES_CFLAGS@
475 vkd3d_dxbc_LDADD = libvkd3d-shader.la @NCURSES_LIBS@
477 LDADD = libvkd3d.la libvkd3d-shader.la libvkd3d-utils.la
478 AM_DEFAULT_SOURCE_EXT = .c
480 TEST_EXTENSIONS = .shader_test
481 TEST_CPPFLAGS = -I$(builddir)/tests
484 check_PROGRAMS = $(vkd3d_tests) $(vkd3d_cross_tests) tests/shader_runner
485 dist_check_SCRIPTS = tests/test-driver.sh
486 TESTS = $(vkd3d_tests) $(vkd3d_cross_tests) $(vkd3d_shader_tests)
487 tests_d3d12_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
488 tests_d3d12_LDADD = $(LDADD) @PTHREAD_LIBS@ @DL_LIBS@
489 tests_d3d12_invalid_usage_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
490 tests_d3d12_invalid_usage_LDADD = $(LDADD) @DL_LIBS@
491 tests_hlsl_d3d12_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
492 tests_hlsl_d3d12_LDADD = $(LDADD) @DL_LIBS@
493 tests_shader_runner_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
494 tests_shader_runner_CFLAGS = $(AM_CFLAGS) @OPENGL_CFLAGS@
495 tests_shader_runner_LDADD = $(LDADD) @OPENGL_LIBS@ @DL_LIBS@
496 tests_shader_runner_SOURCES = \
497 tests/shader_runner.c \
498 tests/shader_runner_d3d9.c \
499 tests/shader_runner_d3d11.c \
500 tests/shader_runner_d3d12.c \
501 tests/shader_runner_gl.c \
502 tests/shader_runner_vulkan.c
504 tests_shader_runner_OBJCFLAGS = $(AM_CFLAGS)
505 tests_shader_runner_SOURCES += tests/shader_runner_metal.m
506 tests_shader_runner_LINK = $(OBJCLINK) -framework Foundation -framework Metal
508 tests_shader_runner_LINK = $(LINK)
510 tests_vkd3d_api_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
511 tests_vkd3d_api_LDADD = libvkd3d.la @DL_LIBS@
512 tests_vkd3d_shader_api_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
513 tests_vkd3d_shader_api_CFLAGS = $(AM_CFLAGS) @OPENGL_CFLAGS@
514 tests_vkd3d_shader_api_LDADD = libvkd3d-shader.la @OPENGL_LIBS@
515 SHADER_TEST_LOG_COMPILER = tests/shader_runner
516 SHADER_TEST_LOG_DRIVER = $(srcdir)/tests/test-driver.sh
519 EXTRA_DIST += $(vkd3d_shader_tests)
522 DEMOS_LDADD = $(LDADD) libvkd3d-shader.la @DL_LIBS@ @DEMO_LIBS@
523 DEMOS_CFLAGS = $(AM_CFLAGS) @DEMO_CFLAGS@ -Wa,-I$(srcdir)/demos
524 bin_PROGRAMS += $(vkd3d_demos)
526 demos_vkd3d_gears_SOURCES = demos/gears.c demos/gears.hlsl
527 demos_vkd3d_gears_CFLAGS = $(DEMOS_CFLAGS)
528 demos_vkd3d_gears_LDADD = $(DEMOS_LDADD) -lm
529 demos/vkd3d_gears-gears.$(OBJEXT): demos/gears.hlsl
531 demos_vkd3d_triangle_SOURCES = demos/triangle.c demos/triangle.hlsl
532 demos_vkd3d_triangle_CFLAGS = $(DEMOS_CFLAGS)
533 demos_vkd3d_triangle_LDADD = $(DEMOS_LDADD)
534 demos/vkd3d_triangle-triangle.$(OBJEXT): demos/triangle.hlsl
537 noinst_HEADERS = $(vkd3d_test_headers) $(vkd3d_demos_headers)
539 VKD3D_V_WIDL = $(vkd3d_v_widl_@AM_V@)
540 vkd3d_v_widl_ = $(vkd3d_v_widl_@AM_DEFAULT_V@)
541 vkd3d_v_widl_0 = @echo " WIDL " $@;
545 CLEANFILES += $(widl_headers)
547 EXTRA_DIST += $(widl_headers) $(widl_headers:.h=.idl)
548 $(widl_headers): %.h: %.idl
550 $(VKD3D_V_WIDL)$(WIDL) -I$(srcdir)/include -h -o $@ $<
552 @echo "widl is required to generate $@"
555 libvkd3d-utils.pc: $(srcdir)/libs/vkd3d-utils/libvkd3d-utils.pc.in Makefile
556 $(AM_V_GEN)$(SED) -e 's![@]prefix[@]!$(prefix)!g' \
557 -e 's![@]exec_prefix[@]!$(exec_prefix)!g' \
558 -e 's![@]includedir[@]!$(includedir)!g' \
559 -e 's![@]libdir[@]!$(libdir)!g' \
560 -e 's![@]PACKAGE_VERSION[@]!$(PACKAGE_VERSION)!g' \
563 libvkd3d-shader.pc: $(srcdir)/libs/vkd3d-shader/libvkd3d-shader.pc.in Makefile
564 $(AM_V_GEN)$(SED) -e 's![@]prefix[@]!$(prefix)!g' \
565 -e 's![@]exec_prefix[@]!$(exec_prefix)!g' \
566 -e 's![@]includedir[@]!$(includedir)!g' \
567 -e 's![@]libdir[@]!$(libdir)!g' \
568 -e 's![@]PACKAGE_VERSION[@]!$(PACKAGE_VERSION)!g' \
571 libvkd3d.pc: $(srcdir)/libs/vkd3d/libvkd3d.pc.in Makefile
572 $(AM_V_GEN)$(SED) -e 's![@]prefix[@]!$(prefix)!g' \
573 -e 's![@]exec_prefix[@]!$(exec_prefix)!g' \
574 -e 's![@]includedir[@]!$(includedir)!g' \
575 -e 's![@]libdir[@]!$(libdir)!g' \
576 -e 's![@]PACKAGE_VERSION[@]!$(PACKAGE_VERSION)!g' \
579 include/private/vkd3d_version.h: dummy-vkd3d-version
580 @$(MKDIR_P) include/private
581 version=`(GIT_DIR=$(top_srcdir)/.git git rev-parse --short HEAD 2>/dev/null || echo '') \
582 | $(SED) -e 's!\(..*\)! (git \1)!' \
583 | $(SED) -n -e '$$s!\(.*\)!#define VKD3D_VCS_ID "\1"!p'` \
584 && (echo $$version | cmp -s - $@) \
585 || echo $$version >$@ || ($(RM) $@ && exit 1)
586 .SILENT: include/private/vkd3d_version.h
587 CLEANFILES += include/private/vkd3d_version.h
589 .PHONY: dummy-vkd3d-version
592 ## Cross-compile tests
593 cross_implibs = crosslibs/d3d12
594 CROSS_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/include/private -I$(builddir)/include -I$(builddir)/tests
595 CROSS_CFLAGS = -g -O2 -Wall -municode ${CROSS_CPPFLAGS} -Wa,-I$(srcdir)/demos \
596 -D_WIN32_WINNT=0x0600 -D__USE_MINGW_ANSI_STDIO=0 -DVKD3D_CROSSTEST=1
597 EXTRA_DIST += $(cross_implibs:=.cross32.def) $(cross_implibs:=.cross64.def)
598 EXTRA_DIST += tests/driver.c tests/shader_runner_d3d11.c tests/shader_runner_d3d9.c
600 shader_runner_cross_sources = \
601 $(srcdir)/tests/shader_runner.c \
602 $(srcdir)/tests/shader_runner_d3d9.c \
603 $(srcdir)/tests/shader_runner_d3d11.c \
604 $(srcdir)/tests/shader_runner_d3d12.c
606 driver_cross_sources = \
607 $(srcdir)/tests/driver.c
609 if HAVE_CROSSTARGET32
610 CROSS32_CC = @CROSSCC32@
611 CROSS32_DLLTOOL = @CROSSTARGET32@-dlltool
612 CROSS32_IMPLIBS = $(cross_implibs:=.cross32.a)
615 CROSS32_EXEFILES += $(vkd3d_cross_tests:=.cross32.exe)
618 CROSS32_EXEFILES += $(vkd3d_demos:demos/vkd3d-%=demos/%.cross32.exe)
619 demos/gears.cross32.exe: demos/gears.hlsl
620 demos/triangle.cross32.exe: demos/triangle.hlsl
623 CROSS32_FILES = $(CROSS32_EXEFILES)
625 CROSS32_FILES += tests/shader_runner.cross32.exe
626 CROSS32_FILES += tests/driver.cross32.exe
629 CLEANFILES += $(CROSS32_IMPLIBS) $(CROSS32_FILES)
630 crosstest32: $(CROSS32_FILES)
632 -include tests/$(DEPDIR)/*.cross32.Po
633 -include demos/$(DEPDIR)/*.cross32.Po
635 $(CROSS32_IMPLIBS): %.cross32.a: %.cross32.def
636 @${MKDIR_P} crosslibs
637 $(AM_V_GEN)$(CROSS32_DLLTOOL) -k -m i386 --as-flags=-32 -d $< -l $@
639 $(CROSS32_EXEFILES): %.cross32.exe: %.c $(CROSS32_IMPLIBS) $(widl_headers)
640 $(AM_V_CCLD)depbase=`echo $@ | $(SED) 's![^/]*$$!$(DEPDIR)/&!;s!\.exe$$!!'`; \
641 $(CROSS32_CC) $(CROSS_CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -o $@ $< $(CROSS32_IMPLIBS) -ldxgi -lgdi32 -ld3dcompiler_47 && \
642 $(am__mv) $$depbase.Tpo $$depbase.Po
644 tests/shader_runner.cross32.exe: $(shader_runner_cross_sources) $(CROSS32_IMPLIBS) $(widl_headers)
645 $(AM_V_CCLD)depbase=`echo $@ | sed 's![^/]*$$!$(DEPDIR)/&!;s!\.exe$$!!'`; \
646 $(CROSS32_CC) $(CROSS_CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -o $@ $(shader_runner_cross_sources) $(CROSS32_IMPLIBS) -ldxgi -lgdi32 -ld3dcompiler_47 && \
647 $(am__mv) $$depbase.Tpo $$depbase.Po
649 tests/driver.cross32.exe: $(driver_cross_sources)
650 $(AM_V_CCLD)depbase=`echo $@ | sed 's![^/]*$$!$(DEPDIR)/&!;s!\.exe$$!!'`; \
651 $(CROSS32_CC) $(CROSS_CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -o $@ $(driver_cross_sources) && \
652 $(am__mv) $$depbase.Tpo $$depbase.Po
658 if HAVE_CROSSTARGET64
659 CROSS64_CC = @CROSSCC64@
660 CROSS64_DLLTOOL = @CROSSTARGET64@-dlltool
661 CROSS64_IMPLIBS = $(cross_implibs:=.cross64.a)
664 CROSS64_EXEFILES += $(vkd3d_cross_tests:=.cross64.exe)
667 CROSS64_EXEFILES += $(vkd3d_demos:demos/vkd3d-%=demos/%.cross64.exe)
668 demos/gears.cross64.exe: demos/gears.hlsl
669 demos/triangle.cross64.exe: demos/triangle.hlsl
672 CROSS64_FILES = $(CROSS64_EXEFILES)
674 CROSS64_FILES += tests/shader_runner.cross64.exe
675 CROSS64_FILES += tests/driver.cross64.exe
678 CLEANFILES += $(CROSS64_IMPLIBS) $(CROSS64_FILES)
679 crosstest64: $(CROSS64_FILES)
681 -include tests/$(DEPDIR)/*.cross64.Po
682 -include demos/$(DEPDIR)/*.cross64.Po
684 $(CROSS64_IMPLIBS): %.cross64.a: %.cross64.def
685 @${MKDIR_P} crosslibs
686 $(AM_V_GEN)$(CROSS64_DLLTOOL) -k -m i386:x86-64 --as-flags=-64 -d $< -l $@
688 $(CROSS64_EXEFILES): %.cross64.exe: %.c $(CROSS64_IMPLIBS) $(widl_headers)
689 $(AM_V_CCLD)depbase=`echo $@ | sed 's![^/]*$$!$(DEPDIR)/&!;s!\.exe$$!!'`; \
690 $(CROSS64_CC) $(CROSS_CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -o $@ $< $(CROSS64_IMPLIBS) -ldxgi -lgdi32 -ld3dcompiler_47 && \
691 $(am__mv) $$depbase.Tpo $$depbase.Po
693 tests/shader_runner.cross64.exe: $(shader_runner_cross_sources) $(CROSS64_IMPLIBS) $(widl_headers)
694 $(AM_V_CCLD)depbase=`echo $@ | sed 's![^/]*$$!$(DEPDIR)/&!;s!\.exe$$!!'`; \
695 $(CROSS64_CC) $(CROSS_CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -o $@ $(shader_runner_cross_sources) $(CROSS64_IMPLIBS) -ldxgi -lgdi32 -ld3dcompiler_47 && \
696 $(am__mv) $$depbase.Tpo $$depbase.Po
698 tests/driver.cross64.exe: $(driver_cross_sources)
699 $(AM_V_CCLD)depbase=`echo $@ | sed 's![^/]*$$!$(DEPDIR)/&!;s!\.exe$$!!'`; \
700 $(CROSS64_CC) $(CROSS_CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -o $@ $(driver_cross_sources) && \
701 $(am__mv) $$depbase.Tpo $$depbase.Po
707 tests/crosstests.txt: FORCE
708 $(AM_V_GEN) for i in $(vkd3d_cross_tests) ; do echo $$i ; done > $@
710 tests/shader_tests.txt: FORCE
711 $(AM_V_GEN) for i in $(vkd3d_shader_tests) ; do echo $$i ; done > $@
713 crosstest-lists: tests/crosstests.txt tests/shader_tests.txt
714 CLEANFILES += tests/crosstests.txt tests/shader_tests.txt
718 .PHONY: crosstest crosstest32 crosstest64 crosstest-lists FORCE
719 crosstest: crosstest32 crosstest64 crosstest-lists
724 CLEANFILES += $(DX_CLEANFILES)