source: Makefile.am @ 9d27ee8

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