source: Makefile.in @ 38cfdb5d

debianrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 38cfdb5d was 2c90da9, checked in by Nelson Elhage <nelhage@mit.edu>, 16 years ago
Rename owl.1 to barnowl.1
  • Property mode set to 100644
File size: 4.0 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 errqueue.c \
28     zbuddylist.c muxevents.c popexec.c obarray.c select.c wcwidth.c \
29     glib_compat.c
30OWL_SRC = owl.c
31TESTER_SRC = tester.c
32
33EXE = barnowl
34PERL_MODULES = Jabber
35MODULE_DIRS = $(PERL_MODULES:%=perl/modules/%)
36
37BASE_OBJS = $(BASE_SRCS:.c=.o)
38
39GEN_C = varstubs.c perlglue.c perlwrap.c
40GEN_H = owl_prototypes.h
41GEN_O = $(GEN_C:.c=.o)
42
43OBJS = $(BASE_OBJS) $(GEN_O)
44
45AUTOGEN=$(GEN_C) $(GEN_H)
46#AUTOGEN=$(GEN_C)
47
48HEADERS=$(GEN_H) owl.h config.h test.h
49
50all: $(EXE) $(MODULE_DIRS)
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
58%.o: %.c $(HEADERS)
59        $(CC) -c $(CFLAGS) $< -o $@
60
61# zcrypt is old crufty DES code I don't want to touch
62# Disable all warnings when compiling it
63zcrypt.o: zcrypt.c $(HEADERS)
64        $(CC) -c $(CFLAGS) $< -w -o $@
65
66test: tester
67        ./tester reg
68
69clean: libfaimclean modules_clean
70        $(RM) $(EXE) tester *.o $(AUTOGEN) owl_prototypes.h.new
71
72distclean: clean libfaimdistclean
73        $(RM) config.cache config.log config.status  Makefile config.h TAGS *~ core
74
75.PHONY: $(MODULE_DIRS)
76
77modules: $(MODULE_DIRS)
78modules_clean:
79        for i in $(MODULE_DIRS); do \
80                cd $$i; test ! -f Makefile || make clean; \
81        done
82
83$(MODULE_DIRS): %: %/Makefile
84        ( cd $@ && make $(notdir $@).par )
85
86$(MODULE_DIRS:=/Makefile): %/Makefile: %/Makefile.PL
87        ( cd $(dir $@) && perl -I../../lib Makefile.PL )
88
89proto: owl_prototypes.h
90
91perlglue.c: perlglue.xs Makefile
92        perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
93
94varstubs.c: variable.c stubgen.pl
95        perl stubgen.pl > varstubs.c
96
97perlwrap.c: perlwrap.pm encapsulate.pl
98        perl encapsulate.pl perlwrap.pm owl_perlwrap_codebuff > perlwrap.c
99
100# Only move owl_prototypes.h into place if the new one is different
101owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
102        perl codelist.pl > owl_prototypes.h.new
103        @cmp -s owl_prototypes.h.new $@ || { \
104         test -f $@ && echo 'Interfaces changed!'; \
105         echo mv -f owl_prototypes.h.new $@; \
106              mv -f owl_prototypes.h.new $@; }
107#owl_prototypes.h:
108
109.PHONY: tags clean distclean proto test check-syntax
110
111tags: TAGS
112
113TAGS: $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
114        etags $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
115
116$(BASE_OBJS) varstubs.h: owl.h config.h owl_prototypes.h
117
118libfaim: libfaim/libfaim.a
119
120libfaim/libfaim.a:
121        (cd libfaim; $(MAKE))
122
123libfaimclean:
124        (cd libfaim; $(MAKE) clean)
125
126libfaimdistclean:
127        (cd libfaim; $(MAKE) distclean)
128
129install: all installdirs
130        ${INSTALL_PROGRAM} $(EXE) ${DESTDIR}${bindir}/$(EXE)
131        ${INSTALL_DATA} doc/barnowl.1 ${DESTDIR}${mandir}/man1/barnowl.1
132        ${INSTALL} -d ${DESTDIR}${datadir}/lib
133        ${INSTALL} -d ${DESTDIR}${datadir}/modules
134        tar -C perl/lib --exclude .svn -cf - . | tar -C ${DESTDIR}${datadir}/lib -xf -
135        for i in $(PERL_MODULES); do \
136                ${INSTALL_DATA} perl/modules/$$i/$$i.par ${DESTDIR}${datadir}/modules/$$i.par; \
137        done
138
139installdirs: mkinstalldirs
140        ${srcdir}/mkinstalldirs ${DESTDIR}${bindir} ${DESTDIR}${mandir}/man1 ${DESTDIR}${datadir}
141
142# For emacs flymake-mode
143check-syntax: proto
144        $(CC) $(CFLAGS) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES)
Note: See TracBrowser for help on using the repository browser.