source: Makefile.in @ 7ccc780

barnowl_perlaimdebianrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 7ccc780 was 7ccc780, checked in by Nelson Elhage <nelhage@mit.edu>, 14 years ago
Making athstatic conditional on --enable-athstatic to ./configure
  • Property mode set to 100644
File size: 3.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
[d08162a]13CFLAGS=@CFLAGS@ -I. -I./libfaim -DDATADIR=\"${datadir}\" -DOWL_SVN_REVNO=`svnversion`
[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 \
[5a95b69]27     aim.c buddy.c buddylist.c timer.c style.c stylefunc.c errqueue.c \
[124aebc]28     zbuddylist.c muxevents.c popexec.c obarray.c
[aaf6071]29OWL_SRC = owl.c
30TESTER_SRC = tester.c
31
[3354cea5]32EXE = barnowl
33
[aaf6071]34BASE_OBJS = $(BASE_SRCS:.c=.o)
[7d4fbcd]35
[f1e629d]36GEN_C = varstubs.c perlglue.c perlwrap.c
[aaf6071]37GEN_H = owl_prototypes.h
38GEN_O = $(GEN_C:.c=.o)
39
40OBJS = $(BASE_OBJS) $(GEN_O)
41
[0ff8fb57]42AUTOGEN=$(GEN_C) $(GEN_H)
43#AUTOGEN=$(GEN_C)
[7d4fbcd]44
45
[7f1f1e7]46$(EXE): $(AUTOGEN) $(OBJS) owl.o libfaim
[7ccc780]47        $(ATHSTATIC) $(CC) -o $(EXE) owl.o $(OBJS) $(LDFLAGS) $(LIBS)
[7d4fbcd]48
[094009a]49tester: $(AUTOGEN) $(OBJS) tester.o
[7ccc780]50        $(ATHSTATIC) $(CC) -o tester tester.o $(OBJS) $(LDFLAGS) $(LIBS)
[7d4fbcd]51
52test: tester
53        ./tester reg
54
[d09e5a1]55clean: libfaimclean
[3354cea5]56        $(RM) $(EXE) tester *.o $(AUTOGEN) owl_prototypes.h.new
[7d4fbcd]57
[d09e5a1]58distclean: clean libfaimdistclean
[42c33a6]59        $(RM) config.cache config.log config.status  Makefile config.h TAGS *~ core
[7d4fbcd]60
[0ff8fb57]61proto: owl_prototypes.h
[7d4fbcd]62
[11be665]63perlglue.c: perlglue.xs Makefile
[15bd5ef]64        perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
[7d4fbcd]65
66varstubs.c: variable.c stubgen.pl
67        perl stubgen.pl > varstubs.c
68
[f1e629d]69perlwrap.c: perlwrap.pm encapsulate.pl
70        perl encapsulate.pl perlwrap.pm owl_perlwrap_codebuff > perlwrap.c
71
[aaf6071]72# Only move owl_prototypes.h into place if the new one is different
[0ff8fb57]73owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
74        perl codelist.pl > owl_prototypes.h.new
75        @cmp -s owl_prototypes.h.new $@ || { \
[8c92848]76         test -f $@ && echo 'Interfaces changed!'; \
[0ff8fb57]77         echo mv -f owl_prototypes.h.new $@; \
78              mv -f owl_prototypes.h.new $@; }
79#owl_prototypes.h:
[aaf6071]80
81.PHONY: tags clean distclean proto test
82
83tags: TAGS
84
85TAGS: $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
86        etags $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
87
[0ff8fb57]88$(BASE_OBJS) varstubs.h:: owl.h config.h owl_prototypes.h
89#$(BASE_OBJS) varstubs.h:: owl.h config.h
[d09e5a1]90
91libfaim: libfaim/libfaim.a
92
93libfaim/libfaim.a:
94        (cd libfaim; $(MAKE))
95
96libfaimclean:
97        (cd libfaim; $(MAKE) clean)
98
99libfaimdistclean:
100        (cd libfaim; $(MAKE) distclean)
[aaf6071]101
[3354cea5]102all: $(EXE)
[ac70242]103
104install: all installdirs
[88cbd0a]105        ${INSTALL_PROGRAM} $(EXE) ${DESTDIR}${bindir}/$(EXE)
106        ${INSTALL_DATA} doc/owl.1 ${DESTDIR}${mandir}/man1/barnowl.1
107        tar -C perl -c . | tar -C ${DESTDIR}${datadir} -x
[ac70242]108
109installdirs: mkinstalldirs
[88cbd0a]110        ${srcdir}/mkinstalldirs ${DESTDIR}${bindir} ${DESTDIR}${mandir}/man1 ${DESTDIR}${datadir}
Note: See TracBrowser for help on using the repository browser.