1 | ACLOCAL_AMFLAGS = -I m4 |
---|
2 | |
---|
3 | GIT_DESCRIPTION := $(if $(wildcard .git),$(shell git describe --match='barnowl-*' HEAD 2>/dev/null)) |
---|
4 | GIT_FLAGS := $(if $(GIT_DESCRIPTION),-DGIT_VERSION=$(GIT_DESCRIPTION:barnowl-%=%)) |
---|
5 | |
---|
6 | bin_PROGRAMS = bin/barnowl |
---|
7 | if ENABLE_ZCRYPT |
---|
8 | bin_PROGRAMS += zcrypt |
---|
9 | endif |
---|
10 | |
---|
11 | zcrypt_SOURCES = zcrypt.c filterproc.c |
---|
12 | |
---|
13 | check_PROGRAMS = bin/tester |
---|
14 | dist_check_DATA = t |
---|
15 | dist_check_SCRIPTS = runtests.sh |
---|
16 | |
---|
17 | noinst_SCRIPTS = barnowl |
---|
18 | check_SCRIPTS = tester |
---|
19 | |
---|
20 | barnowl tester: %: barnowl-wrapper.in bin/% Makefile |
---|
21 | sed \ |
---|
22 | -e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \ |
---|
23 | -e 's,[@]abs_builddir[@],$(abs_builddir),g' \ |
---|
24 | $< > $@ |
---|
25 | chmod +x $@ |
---|
26 | |
---|
27 | bin_barnowl_SOURCES = $(BASE_SRCS) \ |
---|
28 | owl.h owl_perl.h \ |
---|
29 | owl.c |
---|
30 | nodist_bin_barnowl_SOURCES = $(GEN_C) $(GEN_H) |
---|
31 | |
---|
32 | dist_man_MANS = doc/barnowl.1 |
---|
33 | dist_doc_DATA = doc/intro.txt doc/advanced.txt |
---|
34 | |
---|
35 | bin_barnowl_LDADD = compat/libcompat.a libfaim/libfaim.a |
---|
36 | |
---|
37 | bin_tester_SOURCES = $(BASE_SRCS) \ |
---|
38 | owl.h owl_perl.h \ |
---|
39 | tester.c |
---|
40 | nodist_bin_tester_SOURCES = $(GEN_C) $(GEN_H) |
---|
41 | |
---|
42 | bin_tester_LDADD = compat/libcompat.a libfaim/libfaim.a |
---|
43 | |
---|
44 | TESTS=runtests.sh |
---|
45 | |
---|
46 | AM_CPPFLAGS = \ |
---|
47 | -I$(top_srcdir)/libfaim/ \ |
---|
48 | -DDATADIR='"$(pkgdatadir)"' \ |
---|
49 | -DBINDIR='"$(bindir)"' \ |
---|
50 | $(GIT_FLAGS) |
---|
51 | |
---|
52 | CODELIST_SRCS=message.c mainwin.c popwin.c zephyr.c messagelist.c \ |
---|
53 | commands.c global.c text.c fmtext.c editwin.c \ |
---|
54 | util.c logging.c \ |
---|
55 | perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \ |
---|
56 | regex.c history.c view.c dict.c variable.c filterelement.c pair.c \ |
---|
57 | keypress.c keymap.c keybinding.c cmd.c context.c \ |
---|
58 | aim.c buddy.c buddylist.c style.c errqueue.c \ |
---|
59 | zbuddylist.c popexec.c select.c wcwidth.c \ |
---|
60 | mainpanel.c msgwin.c sepbar.c editcontext.c signal.c closures.c |
---|
61 | |
---|
62 | NORMAL_SRCS = filterproc.c filterproc.h window.c window.h windowcb.c |
---|
63 | |
---|
64 | BASE_SRCS = $(CODELIST_SRCS) $(NORMAL_SRCS) |
---|
65 | |
---|
66 | GEN_C = varstubs.c perlglue.c gmarshal_funcs.c |
---|
67 | GEN_H = owl_prototypes.h owl_prototypes.h.new gmarshal_funcs.h |
---|
68 | |
---|
69 | BUILT_SOURCES = $(GEN_H) |
---|
70 | |
---|
71 | # Only copy file into place if file.new is different |
---|
72 | %: %.new |
---|
73 | @diff -U0 $@ $< || { \ |
---|
74 | test -f $@ && echo '$@ changed!'; \ |
---|
75 | echo cp -f $< $@; \ |
---|
76 | cp -f $< $@; } |
---|
77 | |
---|
78 | proto: owl_prototypes.h |
---|
79 | |
---|
80 | perlglue.c: perlglue.xs typemap |
---|
81 | $(AM_V_GEN)perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes $< > $@ |
---|
82 | |
---|
83 | varstubs.c: stubgen.pl variable.c |
---|
84 | $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@ |
---|
85 | |
---|
86 | owl_prototypes.h.new: codelist.pl varstubs.c $(CODELIST_SRCS) |
---|
87 | $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@ |
---|
88 | |
---|
89 | gmarshal_funcs.h: marshal_types |
---|
90 | glib-genmarshal --header $< > $@ |
---|
91 | gmarshal_funcs.c: marshal_types |
---|
92 | glib-genmarshal --body $< > $@ |
---|
93 | |
---|
94 | # For emacs flymake-mode |
---|
95 | check-syntax: proto |
---|
96 | $(COMPILE) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES) |
---|
97 | |
---|
98 | CLEANFILES = $(BUILT_SOURCES) $(GEN_C) $(noinst_SCRIPTS) $(check_SCRIPTS) |
---|
99 | EXTRA_DIST = \ |
---|
100 | autogen.sh \ |
---|
101 | barnowl-wrapper.in \ |
---|
102 | codelist.pl \ |
---|
103 | doc/code.txt \ |
---|
104 | doc/owl-window.txt \ |
---|
105 | doc/releasing-barnowl.txt \ |
---|
106 | examples \ |
---|
107 | marshal_types \ |
---|
108 | perlglue.xs \ |
---|
109 | scripts \ |
---|
110 | stubgen.pl \ |
---|
111 | typemap |
---|
112 | |
---|
113 | SUBDIRS = compat libfaim perl |
---|