source: Makefile.in @ 2fb58e4

barnowl_perlaimdebianrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 2fb58e4 was 2bdfed9, checked in by Nelson Elhage <nelhage@mit.edu>, 17 years ago
Adding an explicit -f - to the tar commands for FreeBSD compatibility (reported by ecprice)
  • Property mode set to 100644
File size: 3.7 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
33PERL_MODULES = Jabber
34MODULE_DIRS = $(PERL_MODULES:%=perl/modules/%)
35
36BASE_OBJS = $(BASE_SRCS:.c=.o)
37
38GEN_C = varstubs.c perlglue.c perlwrap.c
39GEN_H = owl_prototypes.h
40GEN_O = $(GEN_C:.c=.o)
41
42OBJS = $(BASE_OBJS) $(GEN_O)
43
44AUTOGEN=$(GEN_C) $(GEN_H)
45#AUTOGEN=$(GEN_C)
46
47HEADERS=$(GEN_H) owl.h config.h test.h
48
49%.o: %.c $(HEADERS)
50        $(CC) -c $(CFLAGS) $< -o $@
51
52$(EXE): $(AUTOGEN) $(OBJS) owl.o libfaim
53        $(ATHSTATIC) $(CC) -o $(EXE) owl.o $(OBJS) $(LDFLAGS) $(LIBS)
54
55tester: $(AUTOGEN) $(OBJS) tester.o
56        $(ATHSTATIC) $(CC) -o tester tester.o $(OBJS) $(LDFLAGS) $(LIBS)
57
58test: tester
59        ./tester reg
60
61clean: libfaimclean modules_clean
62        $(RM) $(EXE) tester *.o $(AUTOGEN) owl_prototypes.h.new
63
64distclean: clean libfaimdistclean
65        $(RM) config.cache config.log config.status  Makefile config.h TAGS *~ core
66
67.PHONY: $(MODULE_DIRS)
68
69modules: $(MODULE_DIRS)
70modules_clean:
71        for i in $(MODULE_DIRS); do \
72                cd $$i; test ! -f Makefile || make clean; \
73        done
74
75$(MODULE_DIRS): %: %/Makefile
76        ( cd $@ && make $(notdir $@).par )
77
78$(MODULE_DIRS:=/Makefile): %/Makefile: %/Makefile.PL
79        ( cd $(dir $@) && perl -I../../lib Makefile.PL )
80
81proto: owl_prototypes.h
82
83perlglue.c: perlglue.xs Makefile
84        perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
85
86varstubs.c: variable.c stubgen.pl
87        perl stubgen.pl > varstubs.c
88
89perlwrap.c: perlwrap.pm encapsulate.pl
90        perl encapsulate.pl perlwrap.pm owl_perlwrap_codebuff > perlwrap.c
91
92# Only move owl_prototypes.h into place if the new one is different
93owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
94        perl codelist.pl > owl_prototypes.h.new
95        @cmp -s owl_prototypes.h.new $@ || { \
96         test -f $@ && echo 'Interfaces changed!'; \
97         echo mv -f owl_prototypes.h.new $@; \
98              mv -f owl_prototypes.h.new $@; }
99#owl_prototypes.h:
100
101.PHONY: tags clean distclean proto test
102
103tags: TAGS
104
105TAGS: $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
106        etags $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
107
108$(BASE_OBJS) varstubs.h:: owl.h config.h owl_prototypes.h
109#$(BASE_OBJS) varstubs.h:: owl.h config.h
110
111libfaim: libfaim/libfaim.a
112
113libfaim/libfaim.a:
114        (cd libfaim; $(MAKE))
115
116libfaimclean:
117        (cd libfaim; $(MAKE) clean)
118
119libfaimdistclean:
120        (cd libfaim; $(MAKE) distclean)
121
122all: $(EXE) $(MODULE_DIRS)
123
124install: all installdirs
125        ${INSTALL_PROGRAM} $(EXE) ${DESTDIR}${bindir}/$(EXE)
126        ${INSTALL_DATA} doc/owl.1 ${DESTDIR}${mandir}/man1/barnowl.1
127        ${INSTALL} -d ${DESTDIR}${datadir}/lib
128        ${INSTALL} -d ${DESTDIR}${datadir}/modules
129        tar -C perl/lib --exclude .svn -cf - . | tar -C ${DESTDIR}${datadir}/lib -xf -
130        for i in $(PERL_MODULES); do \
131                ${INSTALL_DATA} perl/modules/$$i/$$i.par ${DESTDIR}${datadir}/modules/$$i.par; \
132        done
133
134installdirs: mkinstalldirs
135        ${srcdir}/mkinstalldirs ${DESTDIR}${bindir} ${DESTDIR}${mandir}/man1 ${DESTDIR}${datadir}
Note: See TracBrowser for help on using the repository browser.