1 | ACLOCAL_AMFLAGS = -I m4 |
---|
2 | |
---|
3 | bin_PROGRAMS = barnowl.bin |
---|
4 | check_PROGRAMS = tester perl_tester |
---|
5 | |
---|
6 | barnowl_bin_SOURCES = $(BASE_SRCS) \ |
---|
7 | owl.h owl_perl.h config.h \ |
---|
8 | owl.c \ |
---|
9 | $(GEN_C) $(GEN_H) |
---|
10 | |
---|
11 | barnowl_bin_LDADD = libfaim/libfaim.a |
---|
12 | |
---|
13 | tester_SOURCES = $(BASE_SRCS) \ |
---|
14 | owl.h owl_perl.h config.h \ |
---|
15 | $(GEN_C) $(GEN_H) \ |
---|
16 | tester.c |
---|
17 | |
---|
18 | tester_LDADD = libfaim/libfaim.a |
---|
19 | |
---|
20 | perl_tester_SOURCES = $(BASE_SRCS) \ |
---|
21 | owl.h owl_perl.h config.h \ |
---|
22 | libzcrypt.a \ |
---|
23 | $(GEN_C) $(GEN_H) \ |
---|
24 | perl_tester.c |
---|
25 | |
---|
26 | perl_tester_LDADD = libfaim/libfaim.a libzcrypt.a |
---|
27 | |
---|
28 | TESTS=runtests.sh |
---|
29 | |
---|
30 | CPPFLAGS = -I$(top_srcdir)/ \ |
---|
31 | -I$(top_srcdir)/libfaim/ |
---|
32 | |
---|
33 | BASE_SRCS=list.c message.c mainwin.c popwin.c zephyr.c messagelist.c \ |
---|
34 | commands.c global.c text.c fmtext.c editwin.c util.c logging.c \ |
---|
35 | perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \ |
---|
36 | regex.c history.c view.c dict.c variable.c filterelement.c pair.c \ |
---|
37 | keypress.c keymap.c keybinding.c cmd.c context.c zcrypt.c \ |
---|
38 | aim.c buddy.c buddylist.c style.c errqueue.c \ |
---|
39 | zbuddylist.c popexec.c obarray.c select.c wcwidth.c \ |
---|
40 | glib_compat.c |
---|
41 | |
---|
42 | GEN_C = varstubs.c perlglue.c |
---|
43 | GEN_H = owl_prototypes.h |
---|
44 | |
---|
45 | BUILT_SOURCES = $(GEN_C) $(GEN_H) |
---|
46 | |
---|
47 | # Only copy file into place if file.new is different |
---|
48 | %: %.new |
---|
49 | @diff -U0 $@ $< || { \ |
---|
50 | test -f $@ && echo '$@ changed!'; \ |
---|
51 | echo cp -f $< $@; \ |
---|
52 | cp -f $< $@; } |
---|
53 | |
---|
54 | proto: owl_prototypes.h |
---|
55 | |
---|
56 | perlglue.c: perlglue.xs |
---|
57 | $(AM_V_GEN)perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c |
---|
58 | |
---|
59 | varstubs.c: stubgen.pl variable.c |
---|
60 | $(AM_V_GEN)perl $< $(filter-out $<,$+) > $@ |
---|
61 | |
---|
62 | owl_prototypes.h.new: codelist.pl varstubs.c $(BASE_SRCS) |
---|
63 | $(AM_V_GEN)perl $< $(filter-out $<,$+) > $@ |
---|
64 | |
---|
65 | # For emacs flymake-mode |
---|
66 | check-syntax: proto |
---|
67 | $(CC) $(CFLAGS) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES) |
---|
68 | |
---|
69 | install-data-local: |
---|
70 | $(mkinstalldirs) ${DESTDIR}${pkgdatadir}/lib |
---|
71 | (cd perl/lib && tar -cf - . ) | (cd ${DESTDIR}${pkgdatadir}/lib && tar -xf - ) |
---|
72 | |
---|
73 | do_transform = $(shell echo '$(1)' | sed '$(transform)') |
---|
74 | install-exec-hook: |
---|
75 | mv -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl.bin) \ |
---|
76 | $(DESTDIR)$(bindir)/$(call do_transform,barnowl) |
---|
77 | |
---|
78 | SUBDIRS = libfaim/ perl/modules/ |
---|