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