source: Makefile.in @ 0504f63

debianrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 0504f63 was 731dd1e, checked in by Geoffrey Thomas <geofft@mit.edu>, 13 years ago
Do we really need gcc -I. and #include <owl.h>?
  • Property mode set to 100644
File size: 4.0 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
[731dd1e]13CFLAGS=@CFLAGS@ -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 \
[5f3168a]28     zbuddylist.c muxevents.c popexec.c obarray.c select.c wcwidth.c \
29     glib_compat.c
[aaf6071]30OWL_SRC = owl.c
31TESTER_SRC = tester.c
32
[3354cea5]33EXE = barnowl
[b547aa4]34PERL_MODULES = Jabber
35MODULE_DIRS = $(PERL_MODULES:%=perl/modules/%)
[3354cea5]36
[aaf6071]37BASE_OBJS = $(BASE_SRCS:.c=.o)
[7d4fbcd]38
[f1e629d]39GEN_C = varstubs.c perlglue.c perlwrap.c
[aaf6071]40GEN_H = owl_prototypes.h
41GEN_O = $(GEN_C:.c=.o)
42
43OBJS = $(BASE_OBJS) $(GEN_O)
44
[0ff8fb57]45AUTOGEN=$(GEN_C) $(GEN_H)
46#AUTOGEN=$(GEN_C)
[7d4fbcd]47
[1cf3f8d3]48HEADERS=$(GEN_H) owl.h config.h test.h
[07f715f]49
[84d48cc]50all: $(EXE) $(MODULE_DIRS)
51
[7f1f1e7]52$(EXE): $(AUTOGEN) $(OBJS) owl.o libfaim
[7ccc780]53        $(ATHSTATIC) $(CC) -o $(EXE) owl.o $(OBJS) $(LDFLAGS) $(LIBS)
[7d4fbcd]54
[094009a]55tester: $(AUTOGEN) $(OBJS) tester.o
[7ccc780]56        $(ATHSTATIC) $(CC) -o tester tester.o $(OBJS) $(LDFLAGS) $(LIBS)
[7d4fbcd]57
[50558dc]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
[7d4fbcd]66test: tester
67        ./tester reg
68
[b547aa4]69clean: libfaimclean modules_clean
[3354cea5]70        $(RM) $(EXE) tester *.o $(AUTOGEN) owl_prototypes.h.new
[7d4fbcd]71
[d09e5a1]72distclean: clean libfaimdistclean
[42c33a6]73        $(RM) config.cache config.log config.status  Makefile config.h TAGS *~ core
[7d4fbcd]74
[b547aa4]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
[0ff8fb57]89proto: owl_prototypes.h
[7d4fbcd]90
[11be665]91perlglue.c: perlglue.xs Makefile
[15bd5ef]92        perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
[7d4fbcd]93
94varstubs.c: variable.c stubgen.pl
95        perl stubgen.pl > varstubs.c
96
[f1e629d]97perlwrap.c: perlwrap.pm encapsulate.pl
98        perl encapsulate.pl perlwrap.pm owl_perlwrap_codebuff > perlwrap.c
99
[aaf6071]100# Only move owl_prototypes.h into place if the new one is different
[0ff8fb57]101owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
102        perl codelist.pl > owl_prototypes.h.new
103        @cmp -s owl_prototypes.h.new $@ || { \
[8c92848]104         test -f $@ && echo 'Interfaces changed!'; \
[0ff8fb57]105         echo mv -f owl_prototypes.h.new $@; \
106              mv -f owl_prototypes.h.new $@; }
107#owl_prototypes.h:
[aaf6071]108
[d5ebf3a]109.PHONY: tags clean distclean proto test check-syntax
[aaf6071]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
[50558dc]116$(BASE_OBJS) varstubs.h: owl.h config.h owl_prototypes.h
[d09e5a1]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)
[aaf6071]128
[ac70242]129install: all installdirs
[88cbd0a]130        ${INSTALL_PROGRAM} $(EXE) ${DESTDIR}${bindir}/$(EXE)
[2c90da9]131        ${INSTALL_DATA} doc/barnowl.1 ${DESTDIR}${mandir}/man1/barnowl.1
[b547aa4]132        ${INSTALL} -d ${DESTDIR}${datadir}/lib
[e98a9f9]133        ${INSTALL} -d ${DESTDIR}${datadir}/modules
[2bdfed9]134        tar -C perl/lib --exclude .svn -cf - . | tar -C ${DESTDIR}${datadir}/lib -xf -
[b547aa4]135        for i in $(PERL_MODULES); do \
[e98a9f9]136                ${INSTALL_DATA} perl/modules/$$i/$$i.par ${DESTDIR}${datadir}/modules/$$i.par; \
[b547aa4]137        done
[ac70242]138
139installdirs: mkinstalldirs
[88cbd0a]140        ${srcdir}/mkinstalldirs ${DESTDIR}${bindir} ${DESTDIR}${mandir}/man1 ${DESTDIR}${datadir}
[d5ebf3a]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.