source: Makefile.in @ 50558dc

barnowl_perlaimdebianrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 50558dc was 50558dc, checked in by Nelson Elhage <nelhage@mit.edu>, 13 years ago
Compile zcrypt.c with -w so I don't get all these warnings in my compile output whenever I change any headers
  • Property mode set to 100644
File size: 3.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}\" -DOWL_SVN_REVNO=$(shell ./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 select.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$(EXE): $(AUTOGEN) $(OBJS) owl.o libfaim
50        $(ATHSTATIC) $(CC) -o $(EXE) owl.o $(OBJS) $(LDFLAGS) $(LIBS)
51
52tester: $(AUTOGEN) $(OBJS) tester.o
53        $(ATHSTATIC) $(CC) -o tester tester.o $(OBJS) $(LDFLAGS) $(LIBS)
54
55%.o: %.c $(HEADERS)
56        $(CC) -c $(CFLAGS) $< -o $@
57
58# zcrypt is old crufty DES code I don't want to touch
59# Disable all warnings when compiling it
60zcrypt.o: zcrypt.c $(HEADERS)
61        $(CC) -c $(CFLAGS) $< -w -o $@
62
63test: tester
64        ./tester reg
65
66clean: libfaimclean modules_clean
67        $(RM) $(EXE) tester *.o $(AUTOGEN) owl_prototypes.h.new
68
69distclean: clean libfaimdistclean
70        $(RM) config.cache config.log config.status  Makefile config.h TAGS *~ core
71
72.PHONY: $(MODULE_DIRS)
73
74modules: $(MODULE_DIRS)
75modules_clean:
76        for i in $(MODULE_DIRS); do \
77                cd $$i; test ! -f Makefile || make clean; \
78        done
79
80$(MODULE_DIRS): %: %/Makefile
81        ( cd $@ && make $(notdir $@).par )
82
83$(MODULE_DIRS:=/Makefile): %/Makefile: %/Makefile.PL
84        ( cd $(dir $@) && perl -I../../lib Makefile.PL )
85
86proto: owl_prototypes.h
87
88perlglue.c: perlglue.xs Makefile
89        perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
90
91varstubs.c: variable.c stubgen.pl
92        perl stubgen.pl > varstubs.c
93
94perlwrap.c: perlwrap.pm encapsulate.pl
95        perl encapsulate.pl perlwrap.pm owl_perlwrap_codebuff > perlwrap.c
96
97# Only move owl_prototypes.h into place if the new one is different
98owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
99        perl codelist.pl > owl_prototypes.h.new
100        @cmp -s owl_prototypes.h.new $@ || { \
101         test -f $@ && echo 'Interfaces changed!'; \
102         echo mv -f owl_prototypes.h.new $@; \
103              mv -f owl_prototypes.h.new $@; }
104#owl_prototypes.h:
105
106.PHONY: tags clean distclean proto test
107
108tags: TAGS
109
110TAGS: $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
111        etags $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
112
113$(BASE_OBJS) varstubs.h: owl.h config.h owl_prototypes.h
114
115libfaim: libfaim/libfaim.a
116
117libfaim/libfaim.a:
118        (cd libfaim; $(MAKE))
119
120libfaimclean:
121        (cd libfaim; $(MAKE) clean)
122
123libfaimdistclean:
124        (cd libfaim; $(MAKE) distclean)
125
126all: $(EXE) $(MODULE_DIRS)
127
128install: all installdirs
129        ${INSTALL_PROGRAM} $(EXE) ${DESTDIR}${bindir}/$(EXE)
130        ${INSTALL_DATA} doc/owl.1 ${DESTDIR}${mandir}/man1/barnowl.1
131        ${INSTALL} -d ${DESTDIR}${datadir}/lib
132        ${INSTALL} -d ${DESTDIR}${datadir}/modules
133        tar -C perl/lib --exclude .svn -cf - . | tar -C ${DESTDIR}${datadir}/lib -xf -
134        for i in $(PERL_MODULES); do \
135                ${INSTALL_DATA} perl/modules/$$i/$$i.par ${DESTDIR}${datadir}/modules/$$i.par; \
136        done
137
138installdirs: mkinstalldirs
139        ${srcdir}/mkinstalldirs ${DESTDIR}${bindir} ${DESTDIR}${mandir}/man1 ${DESTDIR}${datadir}
Note: See TracBrowser for help on using the repository browser.