[eddee7e] | 1 | ACLOCAL_AMFLAGS = -I m4 |
---|
[8073852] | 2 | |
---|
[89982ec] | 3 | GIT_DESCRIPTION := $(if $(wildcard .git),$(shell git describe --match='barnowl-*' HEAD 2>/dev/null)) |
---|
| 4 | GIT_FLAGS := $(if $(GIT_DESCRIPTION),-DGIT_VERSION=$(GIT_DESCRIPTION:barnowl-%=%)) |
---|
[8df704f] | 5 | |
---|
[37f27bc] | 6 | bin_PROGRAMS = barnowl.bin |
---|
[7d03c8d] | 7 | if ENABLE_ZCRYPT |
---|
| 8 | bin_PROGRAMS += zcrypt |
---|
| 9 | endif |
---|
| 10 | |
---|
| 11 | zcrypt_SOURCES = zcrypt.c filterproc.c |
---|
| 12 | |
---|
[5aa33fd] | 13 | check_PROGRAMS = tester.bin |
---|
[37f27bc] | 14 | |
---|
| 15 | barnowl_bin_SOURCES = $(BASE_SRCS) \ |
---|
[0b65bd7] | 16 | owl.h owl_perl.h config.h \ |
---|
[ae333f0] | 17 | owl.c \ |
---|
[37f27bc] | 18 | $(GEN_C) $(GEN_H) |
---|
| 19 | |
---|
[e2bc8ac] | 20 | man_MANS = doc/barnowl.1 |
---|
[9d27ee8] | 21 | doc_DATA = doc/intro.txt doc/advanced.txt |
---|
[e2bc8ac] | 22 | |
---|
[12a6616] | 23 | barnowl_bin_LDADD = compat/libcompat.a libfaim/libfaim.a |
---|
[37f27bc] | 24 | |
---|
[de18326] | 25 | tester_bin_SOURCES = $(BASE_SRCS) \ |
---|
[8bce750] | 26 | owl.h owl_perl.h config.h \ |
---|
[0b65bd7] | 27 | $(GEN_C) $(GEN_H) \ |
---|
| 28 | tester.c |
---|
| 29 | |
---|
[12a6616] | 30 | tester_bin_LDADD = compat/libcompat.a libfaim/libfaim.a |
---|
[42ad917] | 31 | |
---|
[2fa9a1a0] | 32 | TESTS=runtests.sh |
---|
| 33 | |
---|
[ce35060] | 34 | AM_CPPFLAGS = -I$(top_srcdir)/ \ |
---|
[8df704f] | 35 | -I$(top_srcdir)/libfaim/ \ |
---|
[858c9c4] | 36 | -DDATADIR='"$(pkgdatadir)"' \ |
---|
[5a57386] | 37 | -DBINDIR='"$(bindir)"' \ |
---|
[8df704f] | 38 | $(GIT_FLAGS) |
---|
[37f27bc] | 39 | |
---|
[c266281] | 40 | CODELIST_SRCS=message.c mainwin.c popwin.c zephyr.c messagelist.c \ |
---|
[37f27bc] | 41 | commands.c global.c text.c fmtext.c editwin.c util.c logging.c \ |
---|
| 42 | perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \ |
---|
| 43 | regex.c history.c view.c dict.c variable.c filterelement.c pair.c \ |
---|
[d564c3d] | 44 | keypress.c keymap.c keybinding.c cmd.c context.c \ |
---|
[37f27bc] | 45 | aim.c buddy.c buddylist.c style.c errqueue.c \ |
---|
[3f6555d] | 46 | zbuddylist.c popexec.c select.c wcwidth.c \ |
---|
[4f746f8] | 47 | mainpanel.c msgwin.c sepbar.c editcontext.c signal.c |
---|
[37f9818] | 48 | |
---|
[8f9a044] | 49 | NORMAL_SRCS = filterproc.c window.c windowcb.c |
---|
[37f9818] | 50 | |
---|
| 51 | BASE_SRCS = $(CODELIST_SRCS) $(NORMAL_SRCS) |
---|
[37f27bc] | 52 | |
---|
| 53 | GEN_C = varstubs.c perlglue.c |
---|
| 54 | GEN_H = owl_prototypes.h |
---|
| 55 | |
---|
| 56 | BUILT_SOURCES = $(GEN_C) $(GEN_H) |
---|
| 57 | |
---|
[1ad4a4a] | 58 | # Only copy file into place if file.new is different |
---|
| 59 | %: %.new |
---|
| 60 | @diff -U0 $@ $< || { \ |
---|
| 61 | test -f $@ && echo '$@ changed!'; \ |
---|
| 62 | echo cp -f $< $@; \ |
---|
| 63 | cp -f $< $@; } |
---|
| 64 | |
---|
[37f27bc] | 65 | proto: owl_prototypes.h |
---|
| 66 | |
---|
[39e81f7] | 67 | perlglue.c: perlglue.xs $(TYPEMAP) |
---|
[5b376388] | 68 | $(AM_V_GEN)perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c |
---|
[37f27bc] | 69 | |
---|
[df49ff6] | 70 | varstubs.c: stubgen.pl variable.c |
---|
[76f0e19] | 71 | $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@ |
---|
[37f27bc] | 72 | |
---|
[37f9818] | 73 | owl_prototypes.h.new: codelist.pl varstubs.c $(CODELIST_SRCS) |
---|
[76f0e19] | 74 | $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@ |
---|
[37f27bc] | 75 | |
---|
| 76 | # For emacs flymake-mode |
---|
| 77 | check-syntax: proto |
---|
[ce35060] | 78 | $(COMPILE) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES) |
---|
[37f27bc] | 79 | |
---|
| 80 | install-data-local: |
---|
| 81 | $(mkinstalldirs) ${DESTDIR}${pkgdatadir}/lib |
---|
| 82 | (cd perl/lib && tar -cf - . ) | (cd ${DESTDIR}${pkgdatadir}/lib && tar -xf - ) |
---|
| 83 | |
---|
| 84 | do_transform = $(shell echo '$(1)' | sed '$(transform)') |
---|
| 85 | install-exec-hook: |
---|
| 86 | mv -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl.bin) \ |
---|
| 87 | $(DESTDIR)$(bindir)/$(call do_transform,barnowl) |
---|
| 88 | |
---|
[12a6616] | 89 | SUBDIRS = compat libfaim perl |
---|