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