source: Makefile.in @ d89b57f

barnowl_perlaimdebianrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since d89b57f was 15bd5ef, checked in by Nelson Elhage <nelhage@mit.edu>, 18 years ago
Actually doing the XSUBPP fix.
  • Property mode set to 100644
File size: 2.8 KB
Line 
1# $Id$
2
3srcdir = @srcdir@
4VPATH = @srcdir@
5prefix = @prefix@
6exec_prefix = @exec_prefix@
7datadir = @datadir@
8bindir = @bindir@
9mandir = @mandir@
10
11CC=@CC@
12LIBS=@LIBS@ -L./libfaim -lfaim
13CFLAGS=@CFLAGS@ -I. -I./libfaim -DDATADIR=\"${datadir}\"
14LDFLAGS=@LDFLAGS@
15XSUBPPDIR=@XSUBPPDIR@
16XSUBPPFLAGS=@XSUBPPFLAGS@
17INSTALL=@INSTALL@
18INSTALL_PROGRAM=@INSTALL_PROGRAM@
19INSTALL_DATA=@INSTALL_DATA@
20
21BASE_SRCS=list.c message.c mainwin.c popwin.c zephyr.c messagelist.c \
22     commands.c global.c text.c fmtext.c editwin.c util.c logging.c \
23     perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \
24     regex.c history.c view.c dict.c variable.c filterelement.c pair.c \
25     keypress.c keymap.c keybinding.c cmd.c context.c zcrypt.c \
26     aim.c buddy.c buddylist.c timer.c style.c stylefunc.c errqueue.c \
27     zbuddylist.c muxevents.c popexec.c
28OWL_SRC = owl.c
29TESTER_SRC = tester.c
30
31BASE_OBJS = $(BASE_SRCS:.c=.o)
32
33GEN_C = varstubs.c perlglue.c perlwrap.c
34GEN_H = owl_prototypes.h
35GEN_O = $(GEN_C:.c=.o)
36
37OBJS = $(BASE_OBJS) $(GEN_O)
38
39AUTOGEN=$(GEN_C) $(GEN_H)
40#AUTOGEN=$(GEN_C)
41
42
43owl: $(AUTOGEN) $(OBJS) owl.o libfaim
44        ./athstatic $(CC) -o owl owl.o $(OBJS) $(LDFLAGS) $(LIBS)
45
46tester: $(AUTOGEN) $(OBJS) tester.o
47        ./athstatic $(CC) -o tester tester.o $(OBJS) $(LDFLAGS) $(LIBS)
48
49test: tester
50        ./tester reg
51
52clean: libfaimclean
53        $(RM) owl tester *.o $(AUTOGEN) owl_prototypes.h.new
54
55distclean: clean libfaimdistclean
56        $(RM) config.cache config.log config.status Makefile config.h TAGS *~ core
57
58proto: owl_prototypes.h
59
60perlglue.c: perlglue.xs
61        perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
62
63varstubs.c: variable.c stubgen.pl
64        perl stubgen.pl > varstubs.c
65
66perlwrap.c: perlwrap.pm encapsulate.pl
67        perl encapsulate.pl perlwrap.pm owl_perlwrap_codebuff > perlwrap.c
68
69# Only move owl_prototypes.h into place if the new one is different
70owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
71        perl codelist.pl > owl_prototypes.h.new
72        @cmp -s owl_prototypes.h.new $@ || { \
73         test -f $@ && echo 'Interfaces changed!'; \
74         echo mv -f owl_prototypes.h.new $@; \
75              mv -f owl_prototypes.h.new $@; }
76#owl_prototypes.h:
77
78.PHONY: tags clean distclean proto test
79
80tags: TAGS
81
82TAGS: $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
83        etags $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
84
85$(BASE_OBJS) varstubs.h:: owl.h config.h owl_prototypes.h
86#$(BASE_OBJS) varstubs.h:: owl.h config.h
87
88libfaim: libfaim/libfaim.a
89
90libfaim/libfaim.a:
91        (cd libfaim; $(MAKE))
92
93libfaimclean:
94        (cd libfaim; $(MAKE) clean)
95
96libfaimdistclean:
97        (cd libfaim; $(MAKE) distclean)
98
99all: owl
100
101install: all installdirs
102        ${INSTALL_PROGRAM} owl ${bindir}/owl
103        ${INSTALL_DATA} doc/owl.1 ${mandir}/man1/owl.1
104        tar -C perl -c . | tar -C ${datadir}/owl -x
105
106installdirs: mkinstalldirs
107        ${srcdir}/mkinstalldirs ${bindir} ${mandir}/man1 ${datadir}/owl
Note: See TracBrowser for help on using the repository browser.