source: Makefile.am @ b4ef908

release-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since b4ef908 was 0b65bd7, checked in by Nelson Elhage <nelhage@mit.edu>, 15 years ago
Makefile.am: Add rules to build the tester.
  • Property mode set to 100644
File size: 2.0 KB
Line 
1bin_PROGRAMS = barnowl.bin
2check_PROGRAMS = tester
3
4barnowl_bin_SOURCES = $(BASE_SRCS) \
5     owl.h owl_perl.h config.h \
6     owl.c \
7     libzcrypt.a \
8     $(GEN_C) $(GEN_H)
9
10barnowl_bin_LDADD = libfaim/libfaim.a libzcrypt.a
11
12tester_SOURCES = $(BASE_SRCS) \
13     owl.h owl_perl.h config.h test.h \
14     libzcrypt.a \
15     $(GEN_C) $(GEN_H) \
16     tester.c
17
18noinst_LIBRARIES = libzcrypt.a
19
20libzcrypt_a_SOURCES = zcrypt.c
21libzcrypt_a_CFLAGS  = -w
22
23CPPFLAGS = -I$(top_srcdir)/ \
24           -I$(top_srcdir)/libfaim/
25
26BASE_SRCS=list.c message.c mainwin.c popwin.c zephyr.c messagelist.c \
27     commands.c global.c text.c fmtext.c editwin.c util.c logging.c \
28     perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \
29     regex.c history.c view.c dict.c variable.c filterelement.c pair.c \
30     keypress.c keymap.c keybinding.c cmd.c context.c \
31     aim.c buddy.c buddylist.c style.c errqueue.c \
32     zbuddylist.c popexec.c obarray.c select.c wcwidth.c \
33     glib_compat.c
34
35GEN_C = varstubs.c perlglue.c
36GEN_H = owl_prototypes.h
37
38BUILT_SOURCES = $(GEN_C) $(GEN_H)
39
40proto: owl_prototypes.h
41
42perlglue.c: perlglue.xs
43        perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
44
45varstubs.c: variable.c stubgen.pl
46        perl stubgen.pl > varstubs.c
47
48# Only move owl_prototypes.h into place if the new one is different
49owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
50        perl codelist.pl > owl_prototypes.h.new
51        @diff -U0 $@ owl_prototypes.h.new || { \
52         test -f $@ && echo 'Interfaces changed!'; \
53         echo mv -f owl_prototypes.h.new $@; \
54              mv -f owl_prototypes.h.new $@; }
55
56# For emacs flymake-mode
57check-syntax: proto
58        $(CC) $(CFLAGS) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES)
59
60install-data-local:
61        $(mkinstalldirs) ${DESTDIR}${pkgdatadir}/lib
62        (cd perl/lib && tar -cf - . ) | (cd ${DESTDIR}${pkgdatadir}/lib && tar -xf - )
63
64do_transform = $(shell echo '$(1)' | sed '$(transform)')
65install-exec-hook:
66        mv -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl.bin) \
67              $(DESTDIR)$(bindir)/$(call do_transform,barnowl)
68
69SUBDIRS = libfaim/ perl/modules/
Note: See TracBrowser for help on using the repository browser.