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