[eddee7e] | 1 | ACLOCAL_AMFLAGS = -I m4 |
---|
[8073852] | 2 | |
---|
[37f27bc] | 3 | bin_PROGRAMS = barnowl.bin |
---|
[42ad917] | 4 | check_PROGRAMS = tester perl_tester |
---|
[37f27bc] | 5 | |
---|
| 6 | barnowl_bin_SOURCES = $(BASE_SRCS) \ |
---|
[0b65bd7] | 7 | owl.h owl_perl.h config.h \ |
---|
[37f27bc] | 8 | owl.c \ |
---|
| 9 | $(GEN_C) $(GEN_H) |
---|
| 10 | |
---|
[191d5e7] | 11 | barnowl_bin_LDADD = libfaim/libfaim.a |
---|
[37f27bc] | 12 | |
---|
[0b65bd7] | 13 | tester_SOURCES = $(BASE_SRCS) \ |
---|
[8bce750] | 14 | owl.h owl_perl.h config.h \ |
---|
[0b65bd7] | 15 | $(GEN_C) $(GEN_H) \ |
---|
| 16 | tester.c |
---|
| 17 | |
---|
[191d5e7] | 18 | tester_LDADD = libfaim/libfaim.a |
---|
[d851bbc] | 19 | |
---|
[42ad917] | 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 | |
---|
[2fa9a1a0] | 28 | TESTS=runtests.sh |
---|
| 29 | |
---|
[37f27bc] | 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 \ |
---|
[191d5e7] | 37 | keypress.c keymap.c keybinding.c cmd.c context.c zcrypt.c \ |
---|
[37f27bc] | 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 | |
---|
[39e81f7] | 45 | TYPEMAP = typemap |
---|
| 46 | |
---|
[37f27bc] | 47 | BUILT_SOURCES = $(GEN_C) $(GEN_H) |
---|
| 48 | |
---|
[1ad4a4a] | 49 | # Only copy file into place if file.new is different |
---|
| 50 | %: %.new |
---|
| 51 | @diff -U0 $@ $< || { \ |
---|
| 52 | test -f $@ && echo '$@ changed!'; \ |
---|
| 53 | echo cp -f $< $@; \ |
---|
| 54 | cp -f $< $@; } |
---|
| 55 | |
---|
[37f27bc] | 56 | proto: owl_prototypes.h |
---|
| 57 | |
---|
[39e81f7] | 58 | perlglue.c: perlglue.xs $(TYPEMAP) |
---|
| 59 | $(AM_V_GEN)perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs -typemap $(TYPEMAP) > perlglue.c |
---|
[37f27bc] | 60 | |
---|
[df49ff6] | 61 | varstubs.c: stubgen.pl variable.c |
---|
[636de2a] | 62 | $(AM_V_GEN)perl $< $(filter-out $<,$+) > $@ |
---|
[37f27bc] | 63 | |
---|
[191d5e7] | 64 | owl_prototypes.h.new: codelist.pl varstubs.c $(BASE_SRCS) |
---|
[636de2a] | 65 | $(AM_V_GEN)perl $< $(filter-out $<,$+) > $@ |
---|
[37f27bc] | 66 | |
---|
| 67 | # For emacs flymake-mode |
---|
| 68 | check-syntax: proto |
---|
| 69 | $(CC) $(CFLAGS) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES) |
---|
| 70 | |
---|
| 71 | install-data-local: |
---|
| 72 | $(mkinstalldirs) ${DESTDIR}${pkgdatadir}/lib |
---|
| 73 | (cd perl/lib && tar -cf - . ) | (cd ${DESTDIR}${pkgdatadir}/lib && tar -xf - ) |
---|
| 74 | |
---|
| 75 | do_transform = $(shell echo '$(1)' | sed '$(transform)') |
---|
| 76 | install-exec-hook: |
---|
| 77 | mv -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl.bin) \ |
---|
| 78 | $(DESTDIR)$(bindir)/$(call do_transform,barnowl) |
---|
| 79 | |
---|
| 80 | SUBDIRS = libfaim/ perl/modules/ |
---|