# $Id$ srcdir = @srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@/barnowl bindir = @bindir@ mandir = @mandir@ CC=@CC@ LIBS=@LIBS@ -L./libfaim -lfaim CFLAGS=@CFLAGS@ -I. -I./libfaim -DDATADIR=\"${datadir}\" LDFLAGS=@LDFLAGS@ XSUBPPDIR=@XSUBPPDIR@ XSUBPPFLAGS=@XSUBPPFLAGS@ INSTALL=@INSTALL@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ INSTALL_DATA=@INSTALL_DATA@ BASE_SRCS=list.c message.c mainwin.c popwin.c zephyr.c messagelist.c \ commands.c global.c text.c fmtext.c editwin.c util.c logging.c \ perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \ regex.c history.c view.c dict.c variable.c filterelement.c pair.c \ keypress.c keymap.c keybinding.c cmd.c context.c zcrypt.c \ aim.c buddy.c buddylist.c timer.c style.c stylefunc.c errqueue.c \ zbuddylist.c muxevents.c popexec.c OWL_SRC = owl.c TESTER_SRC = tester.c EXE = barnowl BASE_OBJS = $(BASE_SRCS:.c=.o) GEN_C = varstubs.c perlglue.c perlwrap.c GEN_H = owl_prototypes.h GEN_O = $(GEN_C:.c=.o) OBJS = $(BASE_OBJS) $(GEN_O) AUTOGEN=$(GEN_C) $(GEN_H) #AUTOGEN=$(GEN_C) owl: $(AUTOGEN) $(OBJS) owl.o libfaim ./athstatic $(CC) -o $(EXE) owl.o $(OBJS) $(LDFLAGS) $(LIBS) tester: $(AUTOGEN) $(OBJS) tester.o ./athstatic $(CC) -o tester tester.o $(OBJS) $(LDFLAGS) $(LIBS) test: tester ./tester reg clean: libfaimclean $(RM) $(EXE) tester *.o $(AUTOGEN) owl_prototypes.h.new distclean: clean libfaimdistclean $(RM) config.cache config.log config.status Makefile config.h TAGS *~ core proto: owl_prototypes.h perlglue.c: perlglue.xs Makefile perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c varstubs.c: variable.c stubgen.pl perl stubgen.pl > varstubs.c perlwrap.c: perlwrap.pm encapsulate.pl perl encapsulate.pl perlwrap.pm owl_perlwrap_codebuff > perlwrap.c # Only move owl_prototypes.h into place if the new one is different owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS) perl codelist.pl > owl_prototypes.h.new @cmp -s owl_prototypes.h.new $@ || { \ test -f $@ && echo 'Interfaces changed!'; \ echo mv -f owl_prototypes.h.new $@; \ mv -f owl_prototypes.h.new $@; } #owl_prototypes.h: .PHONY: tags clean distclean proto test tags: TAGS TAGS: $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H) etags $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H) $(BASE_OBJS) varstubs.h:: owl.h config.h owl_prototypes.h #$(BASE_OBJS) varstubs.h:: owl.h config.h libfaim: libfaim/libfaim.a libfaim/libfaim.a: (cd libfaim; $(MAKE)) libfaimclean: (cd libfaim; $(MAKE) clean) libfaimdistclean: (cd libfaim; $(MAKE) distclean) all: $(EXE) install: all installdirs ${INSTALL_PROGRAM} $(EXE) ${bindir}/$(EXE) ${INSTALL_DATA} doc/owl.1 ${mandir}/man1/barnowl.1 tar -C perl -c . | tar -C ${datadir} -x installdirs: mkinstalldirs ${srcdir}/mkinstalldirs ${bindir} ${mandir}/man1 ${datadir}