]> git.sur5r.net Git - i3/i3/blob - Makefile.am
Remove unused src/debug.c (#2575)
[i3/i3] / Makefile.am
1 @CODE_COVERAGE_RULES@
2
3 echo-version:
4         @echo "@I3_VERSION@"
5
6 bin_PROGRAMS = \
7         i3 \
8         i3bar/i3bar \
9         i3-config-wizard/i3-config-wizard \
10         i3-dump-log/i3-dump-log \
11         i3-input/i3-input \
12         i3-msg/i3-msg \
13         i3-nagbar/i3-nagbar
14
15 install-exec-hook:
16         $(LN_S) -f i3 $(DESTDIR)$(bindir)/i3-with-shmlog
17
18 uninstall-hook:
19         rm -f $(DESTDIR)$(bindir)/i3-with-shmlog
20
21 i3includedir=$(includedir)/i3
22 i3include_HEADERS = \
23         include/i3/ipc.h
24
25 dist_bin_SCRIPTS = \
26         i3-dmenu-desktop \
27         i3-migrate-config-to-v4 \
28         i3-save-tree \
29         i3-sensible-editor \
30         i3-sensible-pager \
31         i3-sensible-terminal
32
33 i3confdir = $(sysconfdir)/i3
34 dist_i3conf_DATA = \
35         etc/config \
36         etc/config.keycodes
37
38 applicationsdir = $(datarootdir)/applications
39 xsessionsdir = $(datarootdir)/xsessions
40 dist_applications_DATA = \
41         share/applications/i3.desktop
42 dist_xsessions_DATA = \
43         share/xsessions/i3.desktop \
44         share/xsessions/i3-with-shmlog.desktop
45
46 noinst_LIBRARIES = libi3.a
47
48 check_PROGRAMS = \
49         test.commands_parser \
50         test.config_parser \
51         test.inject_randr15
52
53 check_SCRIPTS = \
54         testcases/complete-run.pl
55
56 clean-check:
57         rm -rf testsuite-* latest i3-cfg-for-* _Inline
58 clean-local: clean-check
59
60 TESTS = testcases/complete-run.pl
61
62 EXTRA_DIST = \
63         $(dist_docs_toc_DATA:.html=) \
64         $(dist_docs_notoc_DATA:.html=) \
65         docs/asciidoc-git.conf \
66         docs/bigpicture.png \
67         docs/i3-pod2html \
68         docs/i3-sync.dia \
69         docs/i3-sync.png \
70         docs/i3-sync-working.dia \
71         docs/i3-sync-working.png \
72         docs/keyboard-layer1.png \
73         docs/keyboard-layer2.png \
74         docs/layout-saving-1.png \
75         docs/logo-30.png \
76         docs/modes.png \
77         docs/refcard.html \
78         docs/refcard_style.css \
79         docs/single_terminal.png \
80         docs/snapping.png \
81         docs/tree-layout1.png \
82         docs/tree-layout2.png \
83         docs/tree-shot1.png \
84         docs/tree-shot2.png \
85         docs/tree-shot3.png \
86         docs/tree-shot4.png \
87         docs/two_columns.png \
88         docs/two_terminals.png \
89         docs/wsbar.dia \
90         docs/wsbar.png \
91         i3bar/LICENSE \
92         libi3/README \
93         $(asciidoc_MANS:.1=.man) \
94         $(asciidoc_MANS:.1=.man) \
95         man/asciidoc.conf.in \
96         DEPENDS \
97         I3_VERSION \
98         LICENSE \
99         PACKAGE-MAINTAINER \
100         RELEASE-NOTES-4.13 \
101         generate-command-parser.pl \
102         parser-specs/commands.spec \
103         parser-specs/config.spec \
104         parser-specs/highlighting.vim \
105         pseudo-doc.doxygen \
106         testcases/complete-run.pl.in \
107         testcases/i3-test.config \
108         testcases/lib/i3test/Test.pm \
109         testcases/lib/i3test/Util.pm \
110         testcases/lib/i3test/XTEST.pm \
111         testcases/lib/i3test.pm.in \
112         testcases/lib/SocketActivation.pm \
113         testcases/lib/StartXServer.pm \
114         testcases/lib/StatusLine.pm \
115         testcases/lib/TestWorker.pm \
116         testcases/Makefile.PL \
117         testcases/new-test \
118         testcases/restart-state.golden \
119         testcases/t \
120         testcases/valgrind.supp
121
122 # dirstamps contains directories which we want to be created in $(top_builddir)
123 # so that our custom rules can store files in them.
124 dirstamp = .dirstamp
125 dirstamps = \
126         docs/$(dirstamp) \
127         man/$(dirstamp) \
128         parser/$(dirstamp)
129 DISTCLEANFILES = $(dirstamps)
130
131 $(dirstamps):
132         @stamp='$@'; $(MKDIR_P) "$${stamp%/*}"
133         @: > $@
134
135 ################################################################################
136 # docs generation
137 ################################################################################
138
139 docs_tocdir = ${docdir}
140 docs_notocdir = ${docdir}
141 docs_poddir = ${docdir}
142 if BUILD_DOCS
143 dist_docs_toc_DATA = \
144         docs/hacking-howto.html \
145         docs/userguide.html \
146         docs/ipc.html \
147         docs/multi-monitor.html \
148         docs/wsbar.html \
149         docs/testsuite.html \
150         docs/i3bar-protocol.html \
151         docs/layout-saving.html
152
153 dist_docs_notoc_DATA = \
154         docs/debugging.html
155
156 dist_docs_pod_DATA = \
157         docs/lib-i3test.html \
158         docs/lib-i3test-test.html
159
160 $(dist_docs_toc_DATA): docs/%.html: docs/% docs/$(dirstamp)
161         $(AM_V_GEN) @PATH_ASCIIDOC@ -a toc -n -o $@ $<
162
163 $(dist_docs_notoc_DATA): docs/%.html: docs/% docs/$(dirstamp)
164         $(AM_V_GEN) @PATH_ASCIIDOC@ -n -o $@ $<
165
166 docs/lib-i3test.html: testcases/lib/i3test.pm docs/$(dirstamp)
167         $(AM_V_GEN) $(top_srcdir)/docs/i3-pod2html $< $@
168
169 docs/lib-i3test-test.html: testcases/lib/i3test/Test.pm docs/$(dirstamp)
170         $(AM_V_GEN) $(top_srcdir)/docs/i3-pod2html $< $@
171
172 else
173 dist_docs_toc_DATA =
174 dist_docs_notoc_DATA =
175 dist_docs_pod_DATA =
176 endif
177
178 ################################################################################
179 # manpage generation
180 ################################################################################
181
182 if BUILD_MANS
183 dist_man1_MANS = \
184         $(asciidoc_MANS) \
185         $(pod_MANS)
186
187 asciidoc_MANS = \
188         man/i3.1 \
189         man/i3bar.1 \
190         man/i3-msg.1 \
191         man/i3-input.1 \
192         man/i3-nagbar.1 \
193         man/i3-config-wizard.1 \
194         man/i3-migrate-config-to-v4.1 \
195         man/i3-sensible-editor.1 \
196         man/i3-sensible-pager.1 \
197         man/i3-sensible-terminal.1 \
198         man/i3-dump-log.1
199
200 pod_MANS = \
201         man/i3-dmenu-desktop.1 \
202         man/i3-save-tree.1
203
204 $(asciidoc_MANS): man/%.1: man/%.xml man/$(dirstamp)
205         $(AM_V_GEN) out='$@'; @PATH_XMLTO@ man -o "$${out%/*}" $<
206         @stamp='$@'; $(MKDIR_P) "$${stamp%/*}"
207
208 man/%.xml: man/%.man man/asciidoc.conf man/$(dirstamp)
209         $(AM_V_GEN) @PATH_ASCIIDOC@ -d manpage -b docbook -f $(top_builddir)/man/asciidoc.conf -o $@ $<
210
211 $(pod_MANS): man/%.1: % man/$(dirstamp)
212         $(AM_V_GEN) @PATH_POD2MAN@ --utf8 $< > $@
213 else
214 asciidoc_MANS =
215 endif
216
217 AM_CPPFLAGS = \
218         -I$(top_builddir)/parser \
219         -I$(top_srcdir)/include \
220         @AX_EXTEND_SRCDIR_CPPFLAGS@
221
222 i3_CFLAGS = \
223         $(AM_CFLAGS) \
224         $(libi3_CFLAGS) \
225         $(LIBSN_CFLAGS) \
226         $(XCB_CFLAGS) \
227         $(XCB_UTIL_CURSOR_CFLAGS) \
228         $(XCB_UTIL_KEYSYM_CFLAGS) \
229         $(XCB_UTIL_WM_CFLAGS) \
230         $(XCB_UTIL_XRM_CFLAGS) \
231         $(XKBCOMMON_CFLAGS) \
232         $(YAJL_CFLAGS) \
233         $(LIBPCRE_CFLAGS) \
234         $(PTHREAD_CFLAGS) \
235         $(CODE_COVERAGE_CFLAGS)
236
237 i3_CPPFLAGS = \
238         $(AM_CPPFLAGS) \
239         $(CODE_COVERAGE_CPPFLAGS)
240
241 i3_LDADD = \
242         $(libi3_LIBS) \
243         $(LIBSN_LIBS) \
244         $(XCB_LIBS) \
245         $(XCB_UTIL_CURSOR_LIBS) \
246         $(XCB_UTIL_KEYSYMS_LIBS) \
247         $(XCB_UTIL_WM_LIBS) \
248         $(XCB_UTIL_XRM_LIBS) \
249         $(XKBCOMMON_LIBS) \
250         $(YAJL_LIBS) \
251         $(LIBPCRE_LIBS) \
252         $(PANGOCAIRO_LIBS) \
253         $(PTHREAD_LIBS) \
254         $(CODE_COVERAGE_LDFLAGS)
255
256 libi3_CFLAGS = \
257         $(AM_CFLAGS) \
258         $(XCB_CFLAGS) \
259         $(XCB_UTIL_CFLAGS) \
260         $(XCB_UTIL_XRM_CFLAGS) \
261         $(YAJL_CFLAGS) \
262         $(PANGOCAIRO_CFLAGS)
263
264 libi3_LIBS = \
265         $(top_builddir)/libi3.a \
266         $(XCB_LIBS) \
267         $(XCB_UTIL_LIBS) \
268         $(XCB_UTIL_XRM_LIBS) \
269         $(YAJL_LIBS) \
270         $(PANGOCAIRO_LIBS)
271
272 libi3_a_CFLAGS = \
273         $(libi3_CFLAGS)
274
275 libi3_a_SOURCES = \
276         include/libi3.h \
277         libi3/dpi.c \
278         libi3/draw_util.c \
279         libi3/fake_configure_notify.c \
280         libi3/font.c \
281         libi3/format_placeholders.c \
282         libi3/get_colorpixel.c \
283         libi3/get_config_path.c \
284         libi3/get_exe_path.c \
285         libi3/get_mod_mask.c \
286         libi3/get_process_filename.c \
287         libi3/get_visualtype.c \
288         libi3/ipc_connect.c \
289         libi3/ipc_recv_message.c \
290         libi3/ipc_send_message.c \
291         libi3/is_debug_build.c \
292         libi3/mkdirp.c \
293         libi3/resolve_tilde.c \
294         libi3/root_atom_contents.c \
295         libi3/safewrappers.c \
296         libi3/string.c \
297         libi3/strndup.c \
298         libi3/ucs2_conversion.c
299
300 i3_dump_log_i3_dump_log_CFLAGS = \
301         $(AM_CFLAGS) \
302         $(PTHREAD_CFLAGS) \
303         $(libi3_CFLAGS)
304
305 i3_dump_log_i3_dump_log_LDADD = \
306         $(PTHREAD_LIBS) \
307         $(libi3_LIBS)
308
309 i3_dump_log_i3_dump_log_SOURCES = \
310         i3-dump-log/main.c
311
312 i3_input_i3_input_CFLAGS = \
313         $(AM_CFLAGS) \
314         $(libi3_CFLAGS)
315
316 i3_input_i3_input_LDADD = \
317         $(libi3_LIBS) \
318         $(XCB_UTIL_KEYSYMS_LIBS)
319
320 i3_input_i3_input_SOURCES = \
321         i3-input/i3-input.h \
322         i3-input/keysym2ucs.c \
323         i3-input/keysym2ucs.h \
324         i3-input/main.c
325
326 i3_msg_i3_msg_CFLAGS = \
327         $(AM_CFLAGS) \
328         $(libi3_CFLAGS)
329
330 i3_msg_i3_msg_LDADD = \
331         $(libi3_LIBS)
332
333 i3_msg_i3_msg_SOURCES = \
334         i3-msg/main.c
335
336 i3_nagbar_i3_nagbar_CFLAGS = \
337         $(AM_CFLAGS) \
338         $(libi3_CFLAGS)
339
340 i3_nagbar_i3_nagbar_LDADD = \
341         $(libi3_LIBS) \
342         $(XCB_UTIL_CURSOR_LIBS)
343
344 i3_nagbar_i3_nagbar_SOURCES = \
345         i3-nagbar/atoms.xmacro \
346         i3-nagbar/i3-nagbar.h \
347         i3-nagbar/main.c
348
349 i3bar_i3bar_CPPFLAGS = \
350         $(AM_CPPFLAGS) \
351         -I$(top_srcdir)/i3bar/include
352
353 i3bar_i3bar_CFLAGS = \
354         $(AM_CFLAGS) \
355         $(libi3_CFLAGS) \
356         $(XCB_CFLAGS) \
357         $(XKBCOMMON_CFLAGS) \
358         $(PANGOCAIRO_CFLAGS) \
359         $(YAJL_CFLAGS)
360
361 i3bar_i3bar_LDADD = \
362         $(libi3_LIBS) \
363         $(XCB_LIBS) \
364         $(XCB_UTIL_CURSOR_LIBS) \
365         $(XKBCOMMON_LIBS) \
366         $(PANGOCAIRO_LIBS) \
367         $(YAJL_LIBS)
368
369 i3bar_i3bar_SOURCES = \
370         i3bar/include/child.h \
371         i3bar/include/common.h \
372         i3bar/include/configuration.h \
373         i3bar/include/ipc.h \
374         i3bar/include/mode.h \
375         i3bar/include/outputs.h \
376         i3bar/include/parse_json_header.h \
377         i3bar/include/trayclients.h \
378         i3bar/include/util.h \
379         i3bar/include/workspaces.h \
380         i3bar/include/xcb_atoms.def \
381         i3bar/include/xcb.h \
382         i3bar/src/child.c \
383         i3bar/src/config.c \
384         i3bar/src/ipc.c \
385         i3bar/src/main.c \
386         i3bar/src/mode.c \
387         i3bar/src/outputs.c \
388         i3bar/src/parse_json_header.c \
389         i3bar/src/workspaces.c \
390         i3bar/src/xcb.c
391
392 i3_config_wizard_i3_config_wizard_CFLAGS = \
393         $(AM_CFLAGS) \
394         $(libi3_CFLAGS) \
395         $(XKBCOMMON_CFLAGS)
396
397 i3_config_wizard_i3_config_wizard_LDADD = \
398         $(libi3_LIBS) \
399         $(XCB_UTIL_KEYSYMS_LIBS) \
400         $(XKBCOMMON_LIBS)
401
402 i3_config_wizard_i3_config_wizard_SOURCES = \
403         i3-config-wizard/atoms.xmacro \
404         i3-config-wizard/main.c \
405         i3-config-wizard/xcb.h
406
407 test_inject_randr15_CPPFLAGS = \
408         $(AM_CPPFLAGS)
409
410 test_inject_randr15_CFLAGS = \
411         $(AM_CFLAGS) \
412         $(i3_CFLAGS)
413
414 test_inject_randr15_SOURCES = \
415         testcases/inject_randr1.5.c
416
417 test_inject_randr15_LDADD = \
418         $(i3_LDADD)
419
420 test_commands_parser_CPPFLAGS = \
421         $(AM_CPPFLAGS) \
422         -DTEST_PARSER
423
424 test_commands_parser_CFLAGS = \
425         $(AM_CFLAGS) \
426         $(i3_CFLAGS)
427
428 test_commands_parser_SOURCES = \
429         src/commands_parser.c
430
431 test_commands_parser_LDADD = \
432         $(i3_LDADD)
433
434 test_config_parser_CPPFLAGS = \
435         $(AM_CPPFLAGS) \
436         -DTEST_PARSER
437
438 test_config_parser_CFLAGS = \
439         $(AM_CFLAGS) \
440         $(i3_CFLAGS)
441
442 test_config_parser_SOURCES = \
443         src/config_parser.c
444
445 test_config_parser_LDADD = \
446         $(i3_LDADD)
447
448 command_parser_SOURCES = \
449         parser/GENERATED_command_enums.h \
450         parser/GENERATED_command_tokens.h \
451         parser/GENERATED_command_call.h
452
453 config_parser_SOURCES = \
454         parser/GENERATED_config_enums.h \
455         parser/GENERATED_config_tokens.h \
456         parser/GENERATED_config_call.h
457
458 i3_SOURCES = \
459         $(command_parser_SOURCES) \
460         $(config_parser_SOURCES) \
461         include/all.h \
462         include/assignments.h \
463         include/atoms_NET_SUPPORTED.xmacro \
464         include/atoms_rest.xmacro \
465         include/atoms.xmacro \
466         include/bindings.h \
467         include/click.h \
468         include/cmdparse.h \
469         include/commands.h \
470         include/commands_parser.h \
471         include/config_directives.h \
472         include/configuration.h \
473         include/config_parser.h \
474         include/con.h \
475         include/data.h \
476         include/debug.h \
477         include/display_version.h \
478         include/ewmh.h \
479         include/fake_outputs.h \
480         include/floating.h \
481         include/handlers.h \
482         include/i3.h \
483         include/ipc.h \
484         include/key_press.h \
485         include/load_layout.h \
486         include/log.h \
487         include/main.h \
488         include/manage.h \
489         include/match.h \
490         include/move.h \
491         include/output.h \
492         include/queue.h \
493         include/randr.h \
494         include/regex.h \
495         include/render.h \
496         include/resize.h \
497         include/restore_layout.h \
498         include/scratchpad.h \
499         include/sd-daemon.h \
500         include/shmlog.h \
501         include/sighandler.h \
502         include/startup.h \
503         include/tree.h \
504         include/util.h \
505         include/window.h \
506         include/workspace.h \
507         include/xcb.h \
508         include/xcursor.h \
509         include/x.h \
510         include/xinerama.h \
511         include/yajl_utils.h \
512         src/assignments.c \
513         src/bindings.c \
514         src/click.c \
515         src/commands.c \
516         src/commands_parser.c \
517         src/con.c \
518         src/config.c \
519         src/config_directives.c \
520         src/config_parser.c \
521         src/display_version.c \
522         src/ewmh.c \
523         src/fake_outputs.c \
524         src/floating.c \
525         src/handlers.c \
526         src/ipc.c \
527         src/key_press.c \
528         src/load_layout.c \
529         src/log.c \
530         src/main.c \
531         src/manage.c \
532         src/match.c \
533         src/move.c \
534         src/output.c \
535         src/randr.c \
536         src/regex.c \
537         src/render.c \
538         src/resize.c \
539         src/restore_layout.c \
540         src/scratchpad.c \
541         src/sd-daemon.c \
542         src/sighandler.c \
543         src/startup.c \
544         src/tree.c \
545         src/util.c \
546         src/version.c \
547         src/window.c \
548         src/workspace.c \
549         src/x.c \
550         src/xcb.c \
551         src/xcursor.c \
552         src/xinerama.c
553
554 ################################################################################
555 # parser generation
556 ################################################################################
557
558 $(command_parser_SOURCES): %.h: i3-command-parser.stamp
559
560 $(config_parser_SOURCES): %.h: i3-config-parser.stamp
561
562 src/i3-commands_parser.$(OBJEXT): i3-command-parser.stamp
563
564 src/i3-config_parser.$(OBJEXT): i3-config-parser.stamp
565
566 i3-command-parser.stamp: parser/$(dirstamp) generate-command-parser.pl parser-specs/commands.spec
567         $(AM_V_GEN) $(top_srcdir)/generate-command-parser.pl --input=$(top_srcdir)/parser-specs/commands.spec --prefix=command
568         $(AM_V_at) mv GENERATED_command_* $(top_builddir)/parser
569         $(AM_V_at) touch $@
570
571 i3-config-parser.stamp: parser/$(dirstamp) generate-command-parser.pl parser-specs/config.spec
572         $(AM_V_GEN) $(top_srcdir)/generate-command-parser.pl --input=$(top_srcdir)/parser-specs/config.spec --prefix=config
573         $(AM_V_at) mv GENERATED_config_* $(top_builddir)/parser
574         $(AM_V_at) touch $@
575
576 CLEANFILES = \
577         i3-command-parser.stamp \
578         i3-config-parser.stamp