build: Add test wrappers to the main ignore file
[profile/ivi/clutter.git] / tests / interactive / Makefile.am
1 include $(top_srcdir)/build/autotools/Makefile.am.silent
2
3 UNIT_TESTS = \
4         test-textures.c \
5         test-texture-async.c \
6         test-texture-material.c \
7         test-events.c \
8         test-offscreen.c \
9         test-scale.c \
10         test-actors.c \
11         test-actor-clone.c \
12         test-behave.c \
13         test-project.c \
14         test-rotate.c \
15         test-depth.c \
16         test-threads.c \
17         test-script.c \
18         test-model.c \
19         test-grab.c \
20         test-fullscreen.c \
21         test-shader.c \
22         test-cogl-shader-arbfp.c \
23         test-cogl-shader-glsl.c \
24         test-animator.c \
25         test-state.c \
26         test-state-animator.c \
27         test-unproject.c \
28         test-viewport.c \
29         test-fbo.c \
30         test-multistage.c \
31         test-cogl-primitives.c \
32         test-cogl-tex-tile.c \
33         test-cogl-tex-convert.c \
34         test-cogl-tex-foreign.c \
35         test-cogl-tex-getset.c \
36         test-cogl-offscreen.c \
37         test-cogl-tex-polygon.c \
38         test-cogl-multitexture.c \
39         test-stage-read-pixels.c \
40         test-clip.c \
41         test-paint-wrapper.c \
42         test-texture-quality.c \
43         test-layout.c \
44         test-animation.c \
45         test-easing.c \
46         test-binding-pool.c \
47         test-text.c \
48         test-text-field.c \
49         test-cairo-flowers.c \
50         test-cogl-vertex-buffer.c \
51         test-bin-layout.c \
52         test-flow-layout.c \
53         test-box-layout.c \
54         test-stage-sizing.c \
55         test-drag.c \
56         test-constraints.c \
57         test-scrolling.c \
58         test-bind.c \
59         test-cogl-point-sprites.c \
60         test-table-layout.c
61
62 if X11_TESTS
63 UNIT_TESTS += test-pixmap.c
64 UNIT_TESTS += test-devices.c
65 endif
66
67 # For convenience, this provides a way to easily run individual unit tests:
68 wrappers: stamp-test-interactive
69         @true
70 stamp-test-interactive: Makefile test-interactive$(EXEEXT)
71         @wrapper=$(abs_builddir)/wrapper.sh ; \
72         chmod +x $$wrapper && \
73         ( echo "/stamp-test-interactive" ; \
74           echo "/test-interactive" ; \
75           echo "*.o" ; \
76           echo ".gitignore" ) > .gitignore ; \
77         for i in $(UNIT_TESTS); \
78         do \
79                 test_bin=$${i%*.c} ; \
80                 echo "  GEN    $$test_bin" ; \
81                 ( echo "#!/bin/sh" ; \
82                   echo "$$wrapper $$test_bin \$$@" \
83                 ) > $$test_bin$(EXEEXT) ; \
84                 chmod +x $$test_bin$(EXEEXT) ; \
85                 echo "/$$test_bin$(EXEEXT)" >> .gitignore ; \
86         done \
87         && echo timestamp > $(@F)
88
89 clean-wrappers:
90         @for i in $(UNIT_TESTS); \
91         do \
92                 test_bin=$${i%*.c} ; \
93                 echo "  RM    $$test_bin"; \
94                 rm -f $$test_bin$(EXEEXT); \
95         done \
96         && rm -f stamp-test-interactive
97
98 .PHONY: wrappers clean-wrappers
99
100 INCLUDES = \
101         -I$(top_srcdir)                 \
102         -I$(top_srcdir)/clutter         \
103         -I$(top_srcdir)/clutter/cogl    \
104         -I$(top_builddir)/clutter       \
105         -I$(top_builddir)/clutter/cogl
106
107 common_ldadd = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la
108
109 noinst_PROGRAMS = test-interactive
110
111 test_interactive_SOURCES = test-main.c $(UNIT_TESTS)
112 test_interactive_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
113 test_interactive_CPPFLAGS = \
114         -DTESTS_DATADIR=\""$(abs_top_srcdir)/tests/data"\" \
115         -DG_DISABLE_SINGLE_INCLUDES \
116         -DCOGL_DISABLE_DEPRECATED \
117         -DCLUTTER_DISABLE_DEPRECATED
118 test_interactive_LDFLAGS = -export-dynamic
119 test_interactive_LDADD = $(CLUTTER_LIBS) $(common_ldadd)
120
121 EXTRA_DIST = wrapper.sh.in
122 DISTCLEANFILES = wrapper.sh .gitignore
123
124 BUILT_SOURCES = wrappers
125
126 clean-local: clean-wrappers