source: Makefile.in @ 5f3168a

barnowl_perlaimdebianrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 5f3168a was 5f3168a, checked in by Alejandro R. Sedeño <asedeno@mit.edu>, 16 years ago
Merged revisions 928-950 via svnmerge from file:///afs/sipb.mit.edu/project/barnowl/src/svn/trunk ........ r937 | nelhage | 2008-02-11 23:09:54 -0500 (Mon, 11 Feb 2008) | 2 lines Bind M-left and M-right by default in the editor ........ r947 | nelhage | 2008-02-18 16:45:22 -0500 (Mon, 18 Feb 2008) | 2 lines We need to stick modules on the beginning of @INC, not the end ........ r949 | asedeno | 2008-02-18 19:43:09 -0500 (Mon, 18 Feb 2008) | 1 line Merging in the select branch. ........ r950 | asedeno | 2008-02-18 20:54:45 -0500 (Mon, 18 Feb 2008) | 1 line Merging in the select branch, part 2. select.c ........
  • Property mode set to 100644
File size: 3.7 KB
Line 
1# $Id$
2
3srcdir = @srcdir@
4VPATH = @srcdir@
5prefix = @prefix@
6exec_prefix = @exec_prefix@
7datadir = @datadir@/barnowl
8bindir = @bindir@
9mandir = @mandir@
10
11CC=@CC@
12LIBS=@LIBS@ -L./libfaim -lfaim
13CFLAGS=@CFLAGS@ -I. -I./libfaim -DDATADIR=\"${datadir}\" -DOWL_SVN_REVNO=$(shell ./svkversion)
14LDFLAGS=@LDFLAGS@
15XSUBPPDIR=@XSUBPPDIR@
16XSUBPPFLAGS=@XSUBPPFLAGS@
17INSTALL=@INSTALL@
18INSTALL_PROGRAM=@INSTALL_PROGRAM@
19INSTALL_DATA=@INSTALL_DATA@
20ATHSTATIC=@ATHSTATIC@
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 \
24     perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \
25     regex.c history.c view.c dict.c variable.c filterelement.c pair.c \
26     keypress.c keymap.c keybinding.c cmd.c context.c zcrypt.c \
27     aim.c buddy.c buddylist.c timer.c style.c stylefunc.c errqueue.c \
28     zbuddylist.c muxevents.c popexec.c obarray.c select.c wcwidth.c \
29     glib_compat.c
30OWL_SRC = owl.c
31TESTER_SRC = tester.c
32
33EXE = barnowl
34PERL_MODULES = Jabber
35MODULE_DIRS = $(PERL_MODULES:%=perl/modules/%)
36
37BASE_OBJS = $(BASE_SRCS:.c=.o)
38
39GEN_C = varstubs.c perlglue.c perlwrap.c
40GEN_H = owl_prototypes.h
41GEN_O = $(GEN_C:.c=.o)
42
43OBJS = $(BASE_OBJS) $(GEN_O)
44
45AUTOGEN=$(GEN_C) $(GEN_H)
46#AUTOGEN=$(GEN_C)
47
48HEADERS=$(GEN_H) owl.h config.h test.h
49
50%.o: %.c $(HEADERS)
51        $(CC) -c $(CFLAGS) $< -o $@
52
53$(EXE): $(AUTOGEN) $(OBJS) owl.o libfaim
54        $(ATHSTATIC) $(CC) -o $(EXE) owl.o $(OBJS) $(LDFLAGS) $(LIBS)
55
56tester: $(AUTOGEN) $(OBJS) tester.o
57        $(ATHSTATIC) $(CC) -o tester tester.o $(OBJS) $(LDFLAGS) $(LIBS)
58
59test: tester
60        ./tester reg
61
62clean: libfaimclean modules_clean
63        $(RM) $(EXE) tester *.o $(AUTOGEN) owl_prototypes.h.new
64
65distclean: clean libfaimdistclean
66        $(RM) config.cache config.log config.status  Makefile config.h TAGS *~ core
67
68.PHONY: $(MODULE_DIRS)
69
70modules: $(MODULE_DIRS)
71modules_clean:
72        for i in $(MODULE_DIRS); do \
73                cd $$i; test ! -f Makefile || make clean; \
74        done
75
76$(MODULE_DIRS): %: %/Makefile
77        ( cd $@ && make $(notdir $@).par )
78
79$(MODULE_DIRS:=/Makefile): %/Makefile: %/Makefile.PL
80        ( cd $(dir $@) && perl -I../../lib Makefile.PL )
81
82proto: owl_prototypes.h
83
84perlglue.c: perlglue.xs Makefile
85        perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
86
87varstubs.c: variable.c stubgen.pl
88        perl stubgen.pl > varstubs.c
89
90perlwrap.c: perlwrap.pm encapsulate.pl
91        perl encapsulate.pl perlwrap.pm owl_perlwrap_codebuff > perlwrap.c
92
93# Only move owl_prototypes.h into place if the new one is different
94owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
95        perl codelist.pl > owl_prototypes.h.new
96        @cmp -s owl_prototypes.h.new $@ || { \
97         test -f $@ && echo 'Interfaces changed!'; \
98         echo mv -f owl_prototypes.h.new $@; \
99              mv -f owl_prototypes.h.new $@; }
100#owl_prototypes.h:
101
102.PHONY: tags clean distclean proto test
103
104tags: TAGS
105
106TAGS: $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
107        etags $(BASE_SRCS) $(OWL_SRC) $(TESTER_SRC) $(GEN_C) owl.h $(GEN_H)
108
109$(BASE_OBJS) varstubs.h:: owl.h config.h owl_prototypes.h
110#$(BASE_OBJS) varstubs.h:: owl.h config.h
111
112libfaim: libfaim/libfaim.a
113
114libfaim/libfaim.a:
115        (cd libfaim; $(MAKE))
116
117libfaimclean:
118        (cd libfaim; $(MAKE) clean)
119
120libfaimdistclean:
121        (cd libfaim; $(MAKE) distclean)
122
123all: $(EXE) $(MODULE_DIRS)
124
125install: all installdirs
126        ${INSTALL_PROGRAM} $(EXE) ${DESTDIR}${bindir}/$(EXE)
127        ${INSTALL_DATA} doc/owl.1 ${DESTDIR}${mandir}/man1/barnowl.1
128        ${INSTALL} -d ${DESTDIR}${datadir}/lib
129        ${INSTALL} -d ${DESTDIR}${datadir}/modules
130        tar -C perl/lib --exclude .svn -cf - . | tar -C ${DESTDIR}${datadir}/lib -xf -
131        for i in $(PERL_MODULES); do \
132                ${INSTALL_DATA} perl/modules/$$i/$$i.par ${DESTDIR}${datadir}/modules/$$i.par; \
133        done
134
135installdirs: mkinstalldirs
136        ${srcdir}/mkinstalldirs ${DESTDIR}${bindir} ${DESTDIR}${mandir}/man1 ${DESTDIR}${datadir}
Note: See TracBrowser for help on using the repository browser.