source: Makefile.am @ 13ebf92

release-1.10release-1.7release-1.8release-1.9
Last change on this file since 13ebf92 was c45e1eb, checked in by Nelson Elhage <nelhage@mit.edu>, 15 years ago
Support 'make EXTRA_CFLAGS=blah' Signed-off-by: Nelson Elhage <nelhage@mit.edu>
  • Property mode set to 100644
File size: 2.5 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 perl_tester
15
16barnowl_bin_SOURCES = $(BASE_SRCS) \
17     owl.h owl_perl.h config.h \
18     owl.c \
19     $(GEN_C) $(GEN_H)
20
21barnowl_bin_LDADD = libfaim/libfaim.a
22
23tester_SOURCES = $(BASE_SRCS) \
24     owl.h owl_perl.h config.h \
25     $(GEN_C) $(GEN_H) \
26     tester.c
27
28tester_LDADD = libfaim/libfaim.a
29
30perl_tester_SOURCES = $(BASE_SRCS) \
31     owl.h owl_perl.h config.h \
32     $(GEN_C) $(GEN_H) \
33     perl_tester.c
34
35perl_tester_LDADD = libfaim/libfaim.a
36
37TESTS=runtests.sh
38
39CPPFLAGS = -I$(top_srcdir)/ \
40           -I$(top_srcdir)/libfaim/ \
41           -DDATADIR='"$(pkgdatadir)"' \
42           -DBINDIR='"$(bindir)"' \
43           $(GIT_FLAGS)
44
45BASE_SRCS=list.c message.c mainwin.c popwin.c zephyr.c messagelist.c \
46     commands.c global.c text.c fmtext.c editwin.c util.c logging.c \
47     perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \
48     regex.c history.c view.c dict.c variable.c filterelement.c pair.c \
49     keypress.c keymap.c keybinding.c cmd.c context.c \
50     aim.c buddy.c buddylist.c style.c errqueue.c \
51     zbuddylist.c popexec.c select.c wcwidth.c \
52     glib_compat.c filterproc.c
53
54GEN_C = varstubs.c perlglue.c
55GEN_H = owl_prototypes.h
56
57BUILT_SOURCES = $(GEN_C) $(GEN_H)
58
59# Only copy file into place if file.new is different
60%: %.new
61        @diff -U0 $@ $< || { \
62         test -f $@ && echo '$@ changed!'; \
63         echo cp -f $< $@; \
64              cp -f $< $@; }
65
66proto: owl_prototypes.h
67
68perlglue.c: perlglue.xs $(TYPEMAP)
69        $(AM_V_GEN)perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
70
71varstubs.c: stubgen.pl variable.c
72        $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
73
74owl_prototypes.h.new: codelist.pl varstubs.c $(BASE_SRCS)
75        $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
76
77# For emacs flymake-mode
78check-syntax: proto
79        $(CC) $(CFLAGS) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES)
80
81install-data-local:
82        $(mkinstalldirs) ${DESTDIR}${pkgdatadir}/lib
83        (cd perl/lib && tar -cf - . ) | (cd ${DESTDIR}${pkgdatadir}/lib && tar -xf - )
84
85do_transform = $(shell echo '$(1)' | sed '$(transform)')
86install-exec-hook:
87        mv -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl.bin) \
88              $(DESTDIR)$(bindir)/$(call do_transform,barnowl)
89
90SUBDIRS = libfaim perl
Note: See TracBrowser for help on using the repository browser.