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