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