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