source: Makefile.in @ 811ad93

barnowl_perlaimdebianrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 811ad93 was 864ed35, checked in by Nelson Elhage <nelhage@mit.edu>, 14 years ago
Initial step of moving styles from the current mishmash of different options to a unified object interface. No backwards-compatibility support yet.
  • Property mode set to 100644
File size: 3.9 KB
RevLine 
[1aee7d9]1# $Id$
2
[ac70242]3srcdir = @srcdir@
4VPATH = @srcdir@
5prefix = @prefix@
6exec_prefix = @exec_prefix@
[3354cea5]7datadir = @datadir@/barnowl
[ac70242]8bindir = @bindir@
9mandir = @mandir@
10
[7d4fbcd]11CC=@CC@
[d09e5a1]12LIBS=@LIBS@ -L./libfaim -lfaim
[5ff830a]13CFLAGS=@CFLAGS@ -I. -I./libfaim -DDATADIR=\"${datadir}\" -DOWL_SVN_REVNO=$(shell ./svkversion)
[7d4fbcd]14LDFLAGS=@LDFLAGS@
[15bd5ef]15XSUBPPDIR=@XSUBPPDIR@
[4ad3480]16XSUBPPFLAGS=@XSUBPPFLAGS@
[aaf6071]17INSTALL=@INSTALL@
18INSTALL_PROGRAM=@INSTALL_PROGRAM@
19INSTALL_DATA=@INSTALL_DATA@
[7ccc780]20ATHSTATIC=@ATHSTATIC@
[aaf6071]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 \
[f1e629d]24     perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \
[aaf6071]25     regex.c history.c view.c dict.c variable.c filterelement.c pair.c \
[aa5f725]26     keypress.c keymap.c keybinding.c cmd.c context.c zcrypt.c \
[864ed35]27     aim.c buddy.c buddylist.c timer.c style.c errqueue.c \
[9c7a701]28     zbuddylist.c muxevents.c popexec.c obarray.c select.c
[aaf6071]29OWL_SRC = owl.c
30TESTER_SRC = tester.c
31
[3354cea5]32EXE = barnowl
[b547aa4]33PERL_MODULES = Jabber
34MODULE_DIRS = $(PERL_MODULES:%=perl/modules/%)
[3354cea5]35
[aaf6071]36BASE_OBJS = $(BASE_SRCS:.c=.o)
[7d4fbcd]37
[f1e629d]38GEN_C = varstubs.c perlglue.c perlwrap.c
[aaf6071]39GEN_H = owl_prototypes.h
40GEN_O = $(GEN_C:.c=.o)
41
42OBJS = $(BASE_OBJS) $(GEN_O)
43
[0ff8fb57]44AUTOGEN=$(GEN_C) $(GEN_H)
45#AUTOGEN=$(GEN_C)
[7d4fbcd]46
[1cf3f8d3]47HEADERS=$(GEN_H) owl.h config.h test.h
[07f715f]48
[7f1f1e7]49$(EXE): $(AUTOGEN) $(OBJS) owl.o libfaim
[7ccc780]50        $(ATHSTATIC) $(CC) -o $(EXE) owl.o $(OBJS) $(LDFLAGS) $(LIBS)
[7d4fbcd]51
[094009a]52tester: $(AUTOGEN) $(OBJS) tester.o
[7ccc780]53        $(ATHSTATIC) $(CC) -o tester tester.o $(OBJS) $(LDFLAGS) $(LIBS)
[7d4fbcd]54
[50558dc]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
[7d4fbcd]63test: tester
64        ./tester reg
65
[b547aa4]66clean: libfaimclean modules_clean
[3354cea5]67        $(RM) $(EXE) tester *.o $(AUTOGEN) owl_prototypes.h.new
[7d4fbcd]68
[d09e5a1]69distclean: clean libfaimdistclean
[42c33a6]70        $(RM) config.cache config.log config.status  Makefile config.h TAGS *~ core
[7d4fbcd]71
[b547aa4]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
[0ff8fb57]86proto: owl_prototypes.h
[7d4fbcd]87
[11be665]88perlglue.c: perlglue.xs Makefile
[15bd5ef]89        perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
[7d4fbcd]90
91varstubs.c: variable.c stubgen.pl
92        perl stubgen.pl > varstubs.c
93
[f1e629d]94perlwrap.c: perlwrap.pm encapsulate.pl
95        perl encapsulate.pl perlwrap.pm owl_perlwrap_codebuff > perlwrap.c
96
[aaf6071]97# Only move owl_prototypes.h into place if the new one is different
[0ff8fb57]98owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
99        perl codelist.pl > owl_prototypes.h.new
100        @cmp -s owl_prototypes.h.new $@ || { \
[8c92848]101         test -f $@ && echo 'Interfaces changed!'; \
[0ff8fb57]102         echo mv -f owl_prototypes.h.new $@; \
103              mv -f owl_prototypes.h.new $@; }
104#owl_prototypes.h:
[aaf6071]105
[d5ebf3a]106.PHONY: tags clean distclean proto test check-syntax
[aaf6071]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
[50558dc]113$(BASE_OBJS) varstubs.h: owl.h config.h owl_prototypes.h
[d09e5a1]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)
[aaf6071]125
[b547aa4]126all: $(EXE) $(MODULE_DIRS)
[ac70242]127
128install: all installdirs
[88cbd0a]129        ${INSTALL_PROGRAM} $(EXE) ${DESTDIR}${bindir}/$(EXE)
130        ${INSTALL_DATA} doc/owl.1 ${DESTDIR}${mandir}/man1/barnowl.1
[b547aa4]131        ${INSTALL} -d ${DESTDIR}${datadir}/lib
[e98a9f9]132        ${INSTALL} -d ${DESTDIR}${datadir}/modules
[2bdfed9]133        tar -C perl/lib --exclude .svn -cf - . | tar -C ${DESTDIR}${datadir}/lib -xf -
[b547aa4]134        for i in $(PERL_MODULES); do \
[e98a9f9]135                ${INSTALL_DATA} perl/modules/$$i/$$i.par ${DESTDIR}${datadir}/modules/$$i.par; \
[b547aa4]136        done
[ac70242]137
138installdirs: mkinstalldirs
[88cbd0a]139        ${srcdir}/mkinstalldirs ${DESTDIR}${bindir} ${DESTDIR}${mandir}/man1 ${DESTDIR}${datadir}
[d5ebf3a]140
141# For emacs flymake-mode
142check-syntax: proto
143        $(CC) $(CFLAGS) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES)
Note: See TracBrowser for help on using the repository browser.