source: Makefile.in @ e005862

barnowl_perlaimdebianrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since e005862 was 9c7a701, checked in by Alejandro R. Sedeño <asedeno@mit.edu>, 14 years ago
Initial select() changes. stdin, zephyr, jabber, and irc are checked and have dispatch functions. aim is hacked in -- not entirely pretty, but documented and isolated. We still want timers.
  • Property mode set to 100644
File size: 3.7 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 \
[5a95b69]27     aim.c buddy.c buddylist.c timer.c style.c stylefunc.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
49%.o: %.c $(HEADERS)
50        $(CC) -c $(CFLAGS) $< -o $@
[7d4fbcd]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
58test: tester
59        ./tester reg
60
[b547aa4]61clean: libfaimclean modules_clean
[3354cea5]62        $(RM) $(EXE) tester *.o $(AUTOGEN) owl_prototypes.h.new
[7d4fbcd]63
[d09e5a1]64distclean: clean libfaimdistclean
[42c33a6]65        $(RM) config.cache config.log config.status  Makefile config.h TAGS *~ core
[7d4fbcd]66
[b547aa4]67.PHONY: $(MODULE_DIRS)
68
69modules: $(MODULE_DIRS)
70modules_clean:
71        for i in $(MODULE_DIRS); do \
72                cd $$i; test ! -f Makefile || make clean; \
73        done
74
75$(MODULE_DIRS): %: %/Makefile
76        ( cd $@ && make $(notdir $@).par )
77
78$(MODULE_DIRS:=/Makefile): %/Makefile: %/Makefile.PL
79        ( cd $(dir $@) && perl -I../../lib Makefile.PL )
80
[0ff8fb57]81proto: owl_prototypes.h
[7d4fbcd]82
[11be665]83perlglue.c: perlglue.xs Makefile
[15bd5ef]84        perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
[7d4fbcd]85
86varstubs.c: variable.c stubgen.pl
87        perl stubgen.pl > varstubs.c
88
[f1e629d]89perlwrap.c: perlwrap.pm encapsulate.pl
90        perl encapsulate.pl perlwrap.pm owl_perlwrap_codebuff > perlwrap.c
91
[aaf6071]92# Only move owl_prototypes.h into place if the new one is different
[0ff8fb57]93owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
94        perl codelist.pl > owl_prototypes.h.new
95        @cmp -s owl_prototypes.h.new $@ || { \
[8c92848]96         test -f $@ && echo 'Interfaces changed!'; \
[0ff8fb57]97         echo mv -f owl_prototypes.h.new $@; \
98              mv -f owl_prototypes.h.new $@; }
99#owl_prototypes.h:
[aaf6071]100
101.PHONY: tags clean distclean proto test
102
103tags: TAGS
104
105TAGS: $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
106        etags $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
107
[0ff8fb57]108$(BASE_OBJS) varstubs.h:: owl.h config.h owl_prototypes.h
109#$(BASE_OBJS) varstubs.h:: owl.h config.h
[d09e5a1]110
111libfaim: libfaim/libfaim.a
112
113libfaim/libfaim.a:
114        (cd libfaim; $(MAKE))
115
116libfaimclean:
117        (cd libfaim; $(MAKE) clean)
118
119libfaimdistclean:
120        (cd libfaim; $(MAKE) distclean)
[aaf6071]121
[b547aa4]122all: $(EXE) $(MODULE_DIRS)
[ac70242]123
124install: all installdirs
[88cbd0a]125        ${INSTALL_PROGRAM} $(EXE) ${DESTDIR}${bindir}/$(EXE)
126        ${INSTALL_DATA} doc/owl.1 ${DESTDIR}${mandir}/man1/barnowl.1
[b547aa4]127        ${INSTALL} -d ${DESTDIR}${datadir}/lib
[e98a9f9]128        ${INSTALL} -d ${DESTDIR}${datadir}/modules
[2bdfed9]129        tar -C perl/lib --exclude .svn -cf - . | tar -C ${DESTDIR}${datadir}/lib -xf -
[b547aa4]130        for i in $(PERL_MODULES); do \
[e98a9f9]131                ${INSTALL_DATA} perl/modules/$$i/$$i.par ${DESTDIR}${datadir}/modules/$$i.par; \
[b547aa4]132        done
[ac70242]133
134installdirs: mkinstalldirs
[88cbd0a]135        ${srcdir}/mkinstalldirs ${DESTDIR}${bindir} ${DESTDIR}${mandir}/man1 ${DESTDIR}${datadir}
Note: See TracBrowser for help on using the repository browser.