]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - tests/src/Makefile.am
Add warning flags where they are missing and fix the resulting warnings
[sojka/lightdm.git] / tests / src / Makefile.am
1 noinst_PROGRAMS = dbus-env \
2                   initctl \
3                   plymouth \
4                   test-gobject-greeter \
5                   test-greeter-wrapper \
6                   test-guest-wrapper \
7                   test-mir-greeter \
8                   test-runner \
9                   test-script-hook \
10                   test-session \
11                   guest-account \
12                   unity-system-compositor \
13                   vnc-client \
14                   X \
15                   Xvnc
16 dist_noinst_SCRIPTS = lightdm-session \
17                       test-python-greeter
18 noinst_LTLIBRARIES = libsystem.la
19
20 libsystem_la_SOURCES = libsystem.c status.c status.h
21 libsystem_la_CFLAGS = \
22         $(WARN_CFLAGS) \
23         $(GLIB_CFLAGS) \
24         $(GIO_UNIX_CFLAGS) \
25         -DSRCDIR=\"$(abs_top_srcdir)\" \
26         -DBUILDDIR=\"$(abs_top_builddir)\" \
27         -DSYSCONFDIR=\"$(sysconfdir)\" \
28         -DLOCALSTATEDIR=\"$(localstatedir)\" \
29         -DDATADIR=\"$(datadir)\" \
30         -DCONFIG_DIR=\"$(sysconfdir)/lightdm\"
31 libsystem_la_LIBADD = -ldl $(GLIB_LIBS) $(GIO_UNIX_LIBS)
32
33 # This is required to have autotools generate a library that is not installed
34 # but produces a shared library (instead of just a static library)
35 libsystem_la_LDFLAGS = -rpath /nowhere
36
37 if COMPILE_LIBLIGHTDM_QT4
38 noinst_PROGRAMS += test-qt4-greeter
39 endif
40
41 if COMPILE_LIBLIGHTDM_QT5
42 noinst_PROGRAMS += test-qt5-greeter
43 endif
44
45 dbus_env_CFLAGS = \
46         $(WARN_CFLAGS) \
47         $(GLIB_CFLAGS) \
48         -DDATADIR=\"$(abs_srcdir)/../data\"
49 dbus_env_LDADD = \
50         $(GLIB_LIBS)
51
52 test_runner_SOURCES = test-runner.c
53 test_runner_CFLAGS = \
54         $(WARN_CFLAGS) \
55         $(GLIB_CFLAGS) \
56         $(GIO_CFLAGS) \
57         $(GIO_UNIX_CFLAGS) \
58         -DSRCDIR=\"$(abs_top_srcdir)\" \
59         -DBUILDDIR=\"$(abs_top_builddir)\" \
60         -DDATADIR=\"$(abs_srcdir)/../data\"
61 test_runner_LDADD = \
62         $(GLIB_LIBS) \
63         $(GIO_LIBS) \
64         $(GIO_UNIX_LIBS)
65
66 X_SOURCES = X.c x-authority.c x-authority.h x-common.c x-common.h x-server.c x-server.h xdmcp-client.c xdmcp-client.h status.c status.h
67 X_CFLAGS = \
68         $(WARN_CFLAGS) \
69         $(GOBJECT_CFLAGS) \
70         $(GLIB_CFLAGS) \
71         $(GIO_CFLAGS) \
72         $(GIO_UNIX_CFLAGS)
73 X_LDADD = \
74         $(GOBJECT_LIBS) \
75         $(GLIB_LIBS) \
76         $(GIO_LIBS) \
77         $(GIO_UNIX_LIBS)
78
79 Xvnc_SOURCES = Xvnc.c x-authority.c x-authority.h x-common.c x-common.h x-server.c x-server.h status.c status.h
80 Xvnc_CFLAGS = \
81         $(WARN_CFLAGS) \
82         $(GOBJECT_CFLAGS) \
83         $(GLIB_CFLAGS) \
84         $(GIO_CFLAGS) \
85         $(GIO_UNIX_CFLAGS)
86 Xvnc_LDADD = \
87         $(GOBJECT_LIBS) \
88         $(GLIB_LIBS) \
89         $(GIO_LIBS) \
90         $(GIO_UNIX_LIBS)
91
92 test_greeter_wrapper_SOURCES = test-greeter-wrapper.c status.c status.h
93 test_greeter_wrapper_CFLAGS = \
94         $(WARN_CFLAGS) \
95         $(GLIB_CFLAGS) \
96         $(GIO_UNIX_CFLAGS)
97 test_greeter_wrapper_LDADD = \
98         $(GLIB_LIBS) \
99         $(GIO_UNIX_LIBS)
100
101 test_guest_wrapper_SOURCES = test-guest-wrapper.c status.c status.h
102 test_guest_wrapper_CFLAGS = \
103         $(WARN_CFLAGS) \
104         $(GLIB_CFLAGS) \
105         $(GIO_UNIX_CFLAGS)
106 test_guest_wrapper_LDADD = \
107         $(GLIB_LIBS) \
108         $(GIO_UNIX_LIBS)
109
110 test_gobject_greeter_SOURCES = test-gobject-greeter.c status.c status.h
111 test_gobject_greeter_CFLAGS = \
112         -I$(top_srcdir)/liblightdm-gobject \
113         $(WARN_CFLAGS) \
114         $(GLIB_CFLAGS) \
115         $(GIO_UNIX_CFLAGS) \
116         $(XCB_CFLAGS)
117 test_gobject_greeter_LDADD = \
118         -L$(top_builddir)/liblightdm-gobject \
119         -llightdm-gobject-1 \
120         $(GLIB_LIBS) \
121         $(GIO_UNIX_LIBS) \
122         $(XCB_LIBS)
123
124 test_mir_greeter_SOURCES = test-mir-greeter.c status.c status.h
125 test_mir_greeter_CFLAGS = \
126         -I$(top_srcdir)/liblightdm-gobject \
127         $(WARN_CFLAGS) \
128         $(GLIB_CFLAGS) \
129         $(GIO_UNIX_CFLAGS)
130 test_mir_greeter_LDADD = \
131         -L$(top_builddir)/liblightdm-gobject \
132         -llightdm-gobject-1 \
133         $(GLIB_LIBS) \
134         $(GIO_UNIX_LIBS)
135
136 guest_account_SOURCES = guest-account.c status.c status.h
137 guest_account_CFLAGS = \
138         $(WARN_CFLAGS) \
139         $(GLIB_CFLAGS) \
140         $(GIO_UNIX_CFLAGS)
141 guest_account_LDADD = \
142         $(GLIB_LIBS) \
143         $(GIO_UNIX_LIBS)
144
145 test_script_hook_SOURCES = test-script-hook.c status.c status.h
146 test_script_hook_CFLAGS = \
147         $(WARN_CFLAGS) \
148         $(GLIB_CFLAGS) \
149         $(GIO_UNIX_CFLAGS)
150 test_script_hook_LDADD = \
151         $(GLIB_LIBS) \
152         $(GIO_UNIX_LIBS)
153
154 test-qt4-greeter_moc4.cpp: test-qt-greeter.h
155         $(am__v_MOC4_$(V)) $(MOC4) $< -o $@
156 test-qt5-greeter_moc5.cpp: test-qt-greeter.h
157         $(am__v_MOC5_$(V)) $(MOC5) $< -o $@
158 common_qt_sources = test-qt-greeter.cpp test-qt-greeter.h status.c status.h
159 test_qt4_greeter_SOURCES = $(common_qt_sources)
160 test_qt5_greeter_SOURCES = $(common_qt_sources)
161 nodist_test_qt4_greeter_SOURCES = test-qt4-greeter_moc4.cpp
162 nodist_test_qt5_greeter_SOURCES = test-qt5-greeter_moc5.cpp
163 common_qt_cflags = \
164         $(WARN_CXXFLAGS) \
165         $(GLIB_CFLAGS) \
166         $(GIO_UNIX_CFLAGS) \
167         $(XCB_CFLAGS)
168 test_qt4_greeter_CFLAGS = $(common_qt_cflags)
169 test_qt5_greeter_CFLAGS = $(common_qt_cflags)
170 common_qt_cxxflags = \
171         -fPIC \
172         -DQT_DISABLE_DEPRECATED_BEFORE="QT_VERSION_CHECK(4, 0, 0)" \
173         -I$(top_srcdir)/liblightdm-qt \
174         $(GLIB_CFLAGS)
175 test_qt4_greeter_CXXFLAGS = \
176         $(common_qt_cxxflags) \
177         $(LIBLIGHTDM_QT4_CFLAGS)
178 test_qt5_greeter_CXXFLAGS = \
179         $(common_qt_cxxflags) \
180         $(LIBLIGHTDM_QT5_CFLAGS)
181 common_qt_ldadd = \
182         -L$(top_builddir)/liblightdm-qt \
183         $(GLIB_LIBS) \
184         $(GIO_UNIX_LIBS) \
185         $(XCB_LIBS)
186 test_qt4_greeter_LDADD = \
187         $(common_qt_ldadd) \
188         -llightdm-qt-3 \
189         $(LIBLIGHTDM_QT4_LIBS)
190 test_qt5_greeter_LDADD = \
191         $(common_qt_ldadd) \
192         -llightdm-qt5-3 \
193         $(LIBLIGHTDM_QT5_LIBS)
194
195 test_session_SOURCES = test-session.c status.c status.h
196 test_session_CFLAGS = \
197         $(WARN_CFLAGS) \
198         $(GLIB_CFLAGS) \
199         $(GIO_UNIX_CFLAGS) \
200         $(XCB_CFLAGS)
201 test_session_LDADD = \
202         $(GLIB_LIBS) \
203         $(GIO_UNIX_LIBS) \
204         $(XCB_LIBS)
205
206 initctl_SOURCES = initctl.c status.c status.h
207 initctl_CFLAGS = \
208         $(WARN_CFLAGS) \
209         $(GLIB_CFLAGS) \
210         $(GIO_UNIX_CFLAGS)
211 initctl_LDADD = \
212         $(GLIB_LIBS) \
213         $(GIO_UNIX_LIBS)
214
215 plymouth_SOURCES = plymouth.c status.c status.h
216 plymouth_CFLAGS = \
217         $(WARN_CFLAGS) \
218         $(GLIB_CFLAGS) \
219         $(GIO_UNIX_CFLAGS)
220 plymouth_LDADD = \
221         $(GLIB_LIBS) \
222         $(GIO_UNIX_LIBS)
223
224 unity_system_compositor_SOURCES = unity-system-compositor.c status.c status.h
225 unity_system_compositor_CFLAGS = \
226         $(WARN_CFLAGS) \
227         $(GLIB_CFLAGS) \
228         $(GIO_CFLAGS) \
229         $(GIO_UNIX_CFLAGS)
230 unity_system_compositor_LDADD = \
231         $(GLIB_LIBS) \
232         $(GIO_LIBS) \
233         $(GIO_UNIX_LIBS)
234
235 vnc_client_SOURCES = vnc-client.c status.c status.h
236 vnc_client_CFLAGS = \
237         $(WARN_CFLAGS) \
238         $(GLIB_CFLAGS) \
239         $(GIO_CFLAGS) \
240         $(GIO_UNIX_CFLAGS)
241 vnc_client_LDADD = \
242         $(GLIB_LIBS) \
243         $(GIO_LIBS) \
244         $(GIO_UNIX_LIBS)
245
246 CLEANFILES = \
247         test-qt4-greeter_moc4.cpp \
248         test-qt5-greeter_moc5.cpp
249
250 # Support pretty printing MOC
251 AM_V_MOC4 = $(am__v_MOC4_$(V))
252 am__v_MOC4_ = $(am__v_MOC4_$(AM_DEFAULT_VERBOSITY))
253 am__v_MOC4_0 = @echo "  MOC4    " $@;
254 %_moc4.cpp: QLightDM/%.h
255         $(AM_V_MOC4) $(MOC4) $< -o $@
256
257 AM_V_MOC5 = $(am__v_MOC5_$(V))
258 am__v_MOC5_ = $(am__v_MOC5_$(AM_DEFAULT_VERBOSITY))
259 am__v_MOC5_0 = @echo "  MOC5    " $@;
260 %_moc5.cpp: QLightDM/%.h
261         $(AM_V_MOC5) $(MOC5) $< -o $@