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