source: Makefile.in @ 3354cea5

barnowl_perlaimdebianrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 3354cea5 was 3354cea5, checked in by Nelson Elhage <nelhage@mit.edu>, 17 years ago
Installing the executable/data as barnowl
  • 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@/barnowl
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
31EXE = barnowl
32
33BASE_OBJS = $(BASE_SRCS:.c=.o)
34
35GEN_C = varstubs.c perlglue.c perlwrap.c
36GEN_H = owl_prototypes.h
37GEN_O = $(GEN_C:.c=.o)
38
39OBJS = $(BASE_OBJS) $(GEN_O)
40
41AUTOGEN=$(GEN_C) $(GEN_H)
42#AUTOGEN=$(GEN_C)
43
44
45owl: $(AUTOGEN) $(OBJS) owl.o libfaim
46        ./athstatic $(CC) -o $(EXE) owl.o $(OBJS) $(LDFLAGS) $(LIBS)
47
48tester: $(AUTOGEN) $(OBJS) tester.o
49        ./athstatic $(CC) -o tester tester.o $(OBJS) $(LDFLAGS) $(LIBS)
50
51test: tester
52        ./tester reg
53
54clean: libfaimclean
55        $(RM) $(EXE) tester *.o $(AUTOGEN) owl_prototypes.h.new
56
57distclean: clean libfaimdistclean
58        $(RM) config.cache config.log config.status Makefile config.h TAGS *~ core
59
60proto: owl_prototypes.h
61
62perlglue.c: perlglue.xs
63        perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
64
65varstubs.c: variable.c stubgen.pl
66        perl stubgen.pl > varstubs.c
67
68perlwrap.c: perlwrap.pm encapsulate.pl
69        perl encapsulate.pl perlwrap.pm owl_perlwrap_codebuff > perlwrap.c
70
71# Only move owl_prototypes.h into place if the new one is different
72owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
73        perl codelist.pl > owl_prototypes.h.new
74        @cmp -s owl_prototypes.h.new $@ || { \
75         test -f $@ && echo 'Interfaces changed!'; \
76         echo mv -f owl_prototypes.h.new $@; \
77              mv -f owl_prototypes.h.new $@; }
78#owl_prototypes.h:
79
80.PHONY: tags clean distclean proto test
81
82tags: TAGS
83
84TAGS: $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
85        etags $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
86
87$(BASE_OBJS) varstubs.h:: owl.h config.h owl_prototypes.h
88#$(BASE_OBJS) varstubs.h:: owl.h config.h
89
90libfaim: libfaim/libfaim.a
91
92libfaim/libfaim.a:
93        (cd libfaim; $(MAKE))
94
95libfaimclean:
96        (cd libfaim; $(MAKE) clean)
97
98libfaimdistclean:
99        (cd libfaim; $(MAKE) distclean)
100
101all: $(EXE)
102
103install: all installdirs
104        ${INSTALL_PROGRAM} $(EXE) ${bindir}/$(EXE)
105        ${INSTALL_DATA} doc/owl.1 ${mandir}/man1/barnowl.1
106        tar -C perl -c . | tar -C ${datadir} -x
107
108installdirs: mkinstalldirs
109        ${srcdir}/mkinstalldirs ${bindir} ${mandir}/man1 ${datadir}
Note: See TracBrowser for help on using the repository browser.