source: Makefile.in @ eeeef20

barnowl_perlaimdebianrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since eeeef20 was 11be665, checked in by Sam Hartman <hartmans@mit.edu>, 18 years ago
perlglue.c depends on Makefile so when datadir changes it will be reflected in the executable
  • Property mode set to 100644
File size: 2.8 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
13CFLAGS=@CFLAGS@ -I. -I./libfaim -DDATADIR=\"${datadir}\"
[7d4fbcd]14LDFLAGS=@LDFLAGS@
[15bd5ef]15XSUBPPDIR=@XSUBPPDIR@
[4ad3480]16XSUBPPFLAGS=@XSUBPPFLAGS@
[aaf6071]17INSTALL=@INSTALL@
18INSTALL_PROGRAM=@INSTALL_PROGRAM@
19INSTALL_DATA=@INSTALL_DATA@
20
21BASE_SRCS=list.c message.c mainwin.c popwin.c zephyr.c messagelist.c \
22     commands.c global.c text.c fmtext.c editwin.c util.c logging.c \
[f1e629d]23     perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \
[aaf6071]24     regex.c history.c view.c dict.c variable.c filterelement.c pair.c \
[aa5f725]25     keypress.c keymap.c keybinding.c cmd.c context.c zcrypt.c \
[5a95b69]26     aim.c buddy.c buddylist.c timer.c style.c stylefunc.c errqueue.c \
[afbf668]27     zbuddylist.c muxevents.c popexec.c
[aaf6071]28OWL_SRC = owl.c
29TESTER_SRC = tester.c
30
[3354cea5]31EXE = barnowl
32
[aaf6071]33BASE_OBJS = $(BASE_SRCS:.c=.o)
[7d4fbcd]34
[f1e629d]35GEN_C = varstubs.c perlglue.c perlwrap.c
[aaf6071]36GEN_H = owl_prototypes.h
37GEN_O = $(GEN_C:.c=.o)
38
39OBJS = $(BASE_OBJS) $(GEN_O)
40
[0ff8fb57]41AUTOGEN=$(GEN_C) $(GEN_H)
42#AUTOGEN=$(GEN_C)
[7d4fbcd]43
44
[d09e5a1]45owl: $(AUTOGEN) $(OBJS) owl.o libfaim
[3354cea5]46        ./athstatic $(CC) -o $(EXE) owl.o $(OBJS) $(LDFLAGS) $(LIBS)
[7d4fbcd]47
[094009a]48tester: $(AUTOGEN) $(OBJS) tester.o
49        ./athstatic $(CC) -o tester tester.o $(OBJS) $(LDFLAGS) $(LIBS)
[7d4fbcd]50
51test: tester
52        ./tester reg
53
[d09e5a1]54clean: libfaimclean
[3354cea5]55        $(RM) $(EXE) tester *.o $(AUTOGEN) owl_prototypes.h.new
[7d4fbcd]56
[d09e5a1]57distclean: clean libfaimdistclean
[e9b1f60]58        $(RM) config.cache config.log config.status Makefile config.h TAGS *~ core
[7d4fbcd]59
[0ff8fb57]60proto: owl_prototypes.h
[7d4fbcd]61
[11be665]62perlglue.c: perlglue.xs Makefile
[15bd5ef]63        perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
[7d4fbcd]64
65varstubs.c: variable.c stubgen.pl
66        perl stubgen.pl > varstubs.c
67
[f1e629d]68perlwrap.c: perlwrap.pm encapsulate.pl
69        perl encapsulate.pl perlwrap.pm owl_perlwrap_codebuff > perlwrap.c
70
[aaf6071]71# Only move owl_prototypes.h into place if the new one is different
[0ff8fb57]72owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
73        perl codelist.pl > owl_prototypes.h.new
74        @cmp -s owl_prototypes.h.new $@ || { \
[8c92848]75         test -f $@ && echo 'Interfaces changed!'; \
[0ff8fb57]76         echo mv -f owl_prototypes.h.new $@; \
77              mv -f owl_prototypes.h.new $@; }
78#owl_prototypes.h:
[aaf6071]79
80.PHONY: tags clean distclean proto test
81
82tags: TAGS
83
84TAGS: $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
85        etags $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
86
[0ff8fb57]87$(BASE_OBJS) varstubs.h:: owl.h config.h owl_prototypes.h
88#$(BASE_OBJS) varstubs.h:: owl.h config.h
[d09e5a1]89
90libfaim: libfaim/libfaim.a
91
92libfaim/libfaim.a:
93        (cd libfaim; $(MAKE))
94
95libfaimclean:
96        (cd libfaim; $(MAKE) clean)
97
98libfaimdistclean:
99        (cd libfaim; $(MAKE) distclean)
[aaf6071]100
[3354cea5]101all: $(EXE)
[ac70242]102
103install: all installdirs
[3354cea5]104        ${INSTALL_PROGRAM} $(EXE) ${bindir}/$(EXE)
105        ${INSTALL_DATA} doc/owl.1 ${mandir}/man1/barnowl.1
106        tar -C perl -c . | tar -C ${datadir} -x
[ac70242]107
108installdirs: mkinstalldirs
[3354cea5]109        ${srcdir}/mkinstalldirs ${bindir} ${mandir}/man1 ${datadir}
Note: See TracBrowser for help on using the repository browser.