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