[eddee7e] | 1 | ACLOCAL_AMFLAGS = -I m4 |
---|
[8073852] | 2 | |
---|
[ca1fb26a] | 3 | GIT_DESCRIPTION := $(if $(wildcard $(srcdir)/.git),$(shell cd $(srcdir) && git describe --match='barnowl-*' HEAD 2>/dev/null)) |
---|
| 4 | VERSION = $(if $(GIT_DESCRIPTION),$(GIT_DESCRIPTION:barnowl-%=%),@VERSION@) |
---|
| 5 | -include BUILD_VERSION.mk |
---|
| 6 | |
---|
| 7 | FORCE: |
---|
| 8 | BUILD_VERSION.mk: $(if $(filter-out $(BUILD_VERSION),$(VERSION)),FORCE) |
---|
| 9 | echo 'BUILD_VERSION = $(VERSION)' > $@ |
---|
[8df704f] | 10 | |
---|
[a223b6b] | 11 | bin_PROGRAMS = bin/barnowl |
---|
[7d03c8d] | 12 | if ENABLE_ZCRYPT |
---|
| 13 | bin_PROGRAMS += zcrypt |
---|
| 14 | endif |
---|
| 15 | |
---|
[ca1fb26a] | 16 | zcrypt_SOURCES = zcrypt.c filterproc.c version.c |
---|
[7d03c8d] | 17 | |
---|
[a223b6b] | 18 | check_PROGRAMS = bin/tester |
---|
[b80bae0] | 19 | dist_check_DATA = t |
---|
| 20 | dist_check_SCRIPTS = runtests.sh |
---|
[37f27bc] | 21 | |
---|
[a223b6b] | 22 | noinst_SCRIPTS = barnowl |
---|
[574b952] | 23 | check_SCRIPTS = tester |
---|
| 24 | |
---|
[a223b6b] | 25 | barnowl tester: %: barnowl-wrapper.in bin/% Makefile |
---|
[1dba5bd] | 26 | sed \ |
---|
| 27 | -e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \ |
---|
| 28 | -e 's,[@]abs_builddir[@],$(abs_builddir),g' \ |
---|
| 29 | $< > $@ |
---|
[574b952] | 30 | chmod +x $@ |
---|
| 31 | |
---|
[a223b6b] | 32 | bin_barnowl_SOURCES = $(BASE_SRCS) \ |
---|
[3624a2c] | 33 | owl.h owl_perl.h \ |
---|
| 34 | owl.c |
---|
[a223b6b] | 35 | nodist_bin_barnowl_SOURCES = $(GEN_C) $(GEN_H) |
---|
[37f27bc] | 36 | |
---|
[b80bae0] | 37 | dist_man_MANS = doc/barnowl.1 |
---|
| 38 | dist_doc_DATA = doc/intro.txt doc/advanced.txt |
---|
[e2bc8ac] | 39 | |
---|
[a223b6b] | 40 | bin_barnowl_LDADD = compat/libcompat.a libfaim/libfaim.a |
---|
[37f27bc] | 41 | |
---|
[a223b6b] | 42 | bin_tester_SOURCES = $(BASE_SRCS) \ |
---|
[3624a2c] | 43 | owl.h owl_perl.h \ |
---|
[0b65bd7] | 44 | tester.c |
---|
[a223b6b] | 45 | nodist_bin_tester_SOURCES = $(GEN_C) $(GEN_H) |
---|
[0b65bd7] | 46 | |
---|
[a223b6b] | 47 | bin_tester_LDADD = compat/libcompat.a libfaim/libfaim.a |
---|
[42ad917] | 48 | |
---|
[2fa9a1a0] | 49 | TESTS=runtests.sh |
---|
| 50 | |
---|
[cb1243be] | 51 | AM_CPPFLAGS = \ |
---|
[8df704f] | 52 | -I$(top_srcdir)/libfaim/ \ |
---|
[858c9c4] | 53 | -DDATADIR='"$(pkgdatadir)"' \ |
---|
[ca1fb26a] | 54 | -DBINDIR='"$(bindir)"' |
---|
[37f27bc] | 55 | |
---|
[c266281] | 56 | CODELIST_SRCS=message.c mainwin.c popwin.c zephyr.c messagelist.c \ |
---|
[353719a] | 57 | commands.c global.c text.c fmtext.c editwin.c \ |
---|
[06e04a9] | 58 | util.c logging.c \ |
---|
[37f27bc] | 59 | perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \ |
---|
| 60 | regex.c history.c view.c dict.c variable.c filterelement.c pair.c \ |
---|
[d564c3d] | 61 | keypress.c keymap.c keybinding.c cmd.c context.c \ |
---|
[37f27bc] | 62 | aim.c buddy.c buddylist.c style.c errqueue.c \ |
---|
[3f6555d] | 63 | zbuddylist.c popexec.c select.c wcwidth.c \ |
---|
[06e04a9] | 64 | mainpanel.c msgwin.c sepbar.c editcontext.c signal.c closures.c |
---|
[37f9818] | 65 | |
---|
[b80bae0] | 66 | NORMAL_SRCS = filterproc.c filterproc.h window.c window.h windowcb.c |
---|
[37f9818] | 67 | |
---|
| 68 | BASE_SRCS = $(CODELIST_SRCS) $(NORMAL_SRCS) |
---|
[37f27bc] | 69 | |
---|
[ca1fb26a] | 70 | GEN_C = varstubs.c perlglue.c gmarshal_funcs.c version.c version.c.new |
---|
[0f5b08e] | 71 | GEN_H = owl_prototypes.h owl_prototypes.h.new gmarshal_funcs.h |
---|
[37f27bc] | 72 | |
---|
[685cca7] | 73 | BUILT_SOURCES = $(GEN_H) |
---|
[37f27bc] | 74 | |
---|
[1ad4a4a] | 75 | # Only copy file into place if file.new is different |
---|
[ca1fb26a] | 76 | owl_prototypes.h version.c: %: %.new |
---|
[1ad4a4a] | 77 | @diff -U0 $@ $< || { \ |
---|
| 78 | test -f $@ && echo '$@ changed!'; \ |
---|
| 79 | echo cp -f $< $@; \ |
---|
| 80 | cp -f $< $@; } |
---|
| 81 | |
---|
[37f27bc] | 82 | proto: owl_prototypes.h |
---|
| 83 | |
---|
[25d7236] | 84 | perlglue.c: perlglue.xs typemap |
---|
[eb5e8fc] | 85 | $(AM_V_GEN)perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes $< > $@ |
---|
[37f27bc] | 86 | |
---|
[df49ff6] | 87 | varstubs.c: stubgen.pl variable.c |
---|
[76f0e19] | 88 | $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@ |
---|
[37f27bc] | 89 | |
---|
[37f9818] | 90 | owl_prototypes.h.new: codelist.pl varstubs.c $(CODELIST_SRCS) |
---|
[76f0e19] | 91 | $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@ |
---|
[37f27bc] | 92 | |
---|
[ca1fb26a] | 93 | version.c.new: Makefile BUILD_VERSION.mk |
---|
| 94 | $(AM_V_GEN)echo 'const char *version = "$(VERSION)";' > $@ |
---|
| 95 | |
---|
[353719a] | 96 | gmarshal_funcs.h: marshal_types |
---|
| 97 | glib-genmarshal --header $< > $@ |
---|
| 98 | gmarshal_funcs.c: marshal_types |
---|
| 99 | glib-genmarshal --body $< > $@ |
---|
| 100 | |
---|
[37f27bc] | 101 | # For emacs flymake-mode |
---|
| 102 | check-syntax: proto |
---|
[ce35060] | 103 | $(COMPILE) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES) |
---|
[37f27bc] | 104 | |
---|
[ca1fb26a] | 105 | CLEANFILES = $(BUILT_SOURCES) $(GEN_C) $(noinst_SCRIPTS) $(check_SCRIPTS) BUILD_VERSION.mk |
---|
[b80bae0] | 106 | EXTRA_DIST = \ |
---|
| 107 | autogen.sh \ |
---|
[574b952] | 108 | barnowl-wrapper.in \ |
---|
[b80bae0] | 109 | codelist.pl \ |
---|
[78b9503] | 110 | doc/code.txt \ |
---|
| 111 | doc/owl-window.txt \ |
---|
| 112 | doc/releasing-barnowl.txt \ |
---|
[b80bae0] | 113 | examples \ |
---|
| 114 | marshal_types \ |
---|
| 115 | perlglue.xs \ |
---|
| 116 | scripts \ |
---|
| 117 | stubgen.pl \ |
---|
| 118 | typemap |
---|
[0f5b08e] | 119 | |
---|
[12a6616] | 120 | SUBDIRS = compat libfaim perl |
---|