source: Makefile.in @ 95e60d6

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