source: Makefile.am @ 63de71c

release-1.6release-1.7release-1.8release-1.9
Last change on this file since 63de71c was 7d03c8d, checked in by Nelson Elhage <nelhage@mit.edu>, 12 years ago
Add zcrypt to our build system.
  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[eddee7e]1ACLOCAL_AMFLAGS = -I m4
[8073852]2
[89982ec]3GIT_DESCRIPTION := $(if $(wildcard .git),$(shell git describe --match='barnowl-*' HEAD 2>/dev/null))
4GIT_FLAGS := $(if $(GIT_DESCRIPTION),-DGIT_VERSION=$(GIT_DESCRIPTION:barnowl-%=%))
[8df704f]5
[37f27bc]6bin_PROGRAMS = barnowl.bin
[7d03c8d]7if ENABLE_ZCRYPT
8bin_PROGRAMS += zcrypt
9endif
10
11zcrypt_SOURCES = zcrypt.c filterproc.c
12
[42ad917]13check_PROGRAMS = tester perl_tester
[37f27bc]14
15barnowl_bin_SOURCES = $(BASE_SRCS) \
[0b65bd7]16     owl.h owl_perl.h config.h \
[d564c3d]17     owl.c filterproc.c \
[37f27bc]18     $(GEN_C) $(GEN_H)
19
[191d5e7]20barnowl_bin_LDADD = libfaim/libfaim.a
[37f27bc]21
[0b65bd7]22tester_SOURCES = $(BASE_SRCS) \
[8bce750]23     owl.h owl_perl.h config.h \
[0b65bd7]24     $(GEN_C) $(GEN_H) \
25     tester.c
26
[191d5e7]27tester_LDADD = libfaim/libfaim.a
[d851bbc]28
[42ad917]29perl_tester_SOURCES = $(BASE_SRCS) \
30     owl.h owl_perl.h config.h \
31     $(GEN_C) $(GEN_H) \
32     perl_tester.c
33
[b373d44]34perl_tester_LDADD = libfaim/libfaim.a
[42ad917]35
[2fa9a1a0]36TESTS=runtests.sh
37
[37f27bc]38CPPFLAGS = -I$(top_srcdir)/ \
[8df704f]39           -I$(top_srcdir)/libfaim/ \
40           $(GIT_FLAGS)
[37f27bc]41
42BASE_SRCS=list.c message.c mainwin.c popwin.c zephyr.c messagelist.c \
43     commands.c global.c text.c fmtext.c editwin.c util.c logging.c \
44     perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \
45     regex.c history.c view.c dict.c variable.c filterelement.c pair.c \
[d564c3d]46     keypress.c keymap.c keybinding.c cmd.c context.c \
[37f27bc]47     aim.c buddy.c buddylist.c style.c errqueue.c \
48     zbuddylist.c popexec.c obarray.c select.c wcwidth.c \
49     glib_compat.c
50
51GEN_C = varstubs.c perlglue.c
52GEN_H = owl_prototypes.h
53
54BUILT_SOURCES = $(GEN_C) $(GEN_H)
55
[1ad4a4a]56# Only copy file into place if file.new is different
57%: %.new
58        @diff -U0 $@ $< || { \
59         test -f $@ && echo '$@ changed!'; \
60         echo cp -f $< $@; \
61              cp -f $< $@; }
62
[37f27bc]63proto: owl_prototypes.h
64
[39e81f7]65perlglue.c: perlglue.xs $(TYPEMAP)
[5b376388]66        $(AM_V_GEN)perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
[37f27bc]67
[df49ff6]68varstubs.c: stubgen.pl variable.c
[76f0e19]69        $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
[37f27bc]70
[191d5e7]71owl_prototypes.h.new: codelist.pl varstubs.c $(BASE_SRCS)
[76f0e19]72        $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
[37f27bc]73
74# For emacs flymake-mode
75check-syntax: proto
76        $(CC) $(CFLAGS) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES)
77
78install-data-local:
79        $(mkinstalldirs) ${DESTDIR}${pkgdatadir}/lib
80        (cd perl/lib && tar -cf - . ) | (cd ${DESTDIR}${pkgdatadir}/lib && tar -xf - )
81
82do_transform = $(shell echo '$(1)' | sed '$(transform)')
83install-exec-hook:
84        mv -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl.bin) \
85              $(DESTDIR)$(bindir)/$(call do_transform,barnowl)
86
[10557e6]87SUBDIRS = libfaim perl
Note: See TracBrowser for help on using the repository browser.