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