1 | |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | srcdir = @srcdir@ |
---|
5 | VPATH = @srcdir@ |
---|
6 | |
---|
7 | prefix = @prefix@ |
---|
8 | exec_prefix = @exec_prefix@ |
---|
9 | |
---|
10 | datadir = @datadir@ |
---|
11 | bindir = @bindir@ |
---|
12 | mandir = @mandir@ |
---|
13 | |
---|
14 | CC=@CC@ |
---|
15 | LIBS=@LIBS@ |
---|
16 | #CFLAGS=@CFLAGS@ @DEFS@ |
---|
17 | CFLAGS=@CFLAGS@ -DDATADIR=\"${datadir}\" |
---|
18 | LDFLAGS=@LDFLAGS@ |
---|
19 | XSUBPPDIR=@XSUBPPDIR@ |
---|
20 | INSTALL = @INSTALL@ |
---|
21 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
---|
22 | INSTALL_DATA = @INSTALL_DATA@ |
---|
23 | |
---|
24 | OBJS=list.o message.o mainwin.o popwin.o zephyr.o messagelist.o commands.o \ |
---|
25 | global.o text.o fmtext.o editwin.o util.o logging.o readconfig.o keys.o \ |
---|
26 | functions.o zwrite.o viewwin.o help.o filter.o regex.o history.o view.o \ |
---|
27 | dict.o variable.o varstubs.o filterelement.o pair.o \ |
---|
28 | keypress.o keymap.o keybinding.o cmd.o context.o perlglue.o zcrypt.o |
---|
29 | |
---|
30 | AUTOGEN=owl_prototypes.h varstubs.c perlglue.c |
---|
31 | |
---|
32 | owl: $(AUTOGEN) $(OBJS) owl.o |
---|
33 | ./athstatic $(CC) -o owl owl.o $(OBJS) $(LDFLAGS) $(LIBS) |
---|
34 | |
---|
35 | tester: $(AUTOGEN) $(OBJS) tester.o |
---|
36 | $(CC) -o tester tester.o $(OBJS) $(LDFLAGS) $(LIBS) |
---|
37 | |
---|
38 | test: tester |
---|
39 | ./tester reg |
---|
40 | |
---|
41 | clean: |
---|
42 | $(RM) owl tester *.o $(AUTOGEN) owl_prototypes.h.new |
---|
43 | |
---|
44 | distclean: clean |
---|
45 | $(RM) config.cache config.log config.status Makefile config.h TAGS *~ core |
---|
46 | |
---|
47 | proto: owl_prototypes.h |
---|
48 | |
---|
49 | perlglue.c: perlglue.xs |
---|
50 | perl $(XSUBPPDIR)/xsubpp -typemap $(XSUBPPDIR)/typemap -prototypes perlglue.xs > perlglue.c |
---|
51 | |
---|
52 | varstubs.c: variable.c stubgen.pl |
---|
53 | perl stubgen.pl > varstubs.c |
---|
54 | |
---|
55 | all: owl |
---|
56 | |
---|
57 | install: all installdirs |
---|
58 | ${INSTALL_PROGRAM} owl ${bindir}/owl |
---|
59 | ${INSTALL_DATA} doc/owl.1 ${mandir}/man1/owl.1 |
---|
60 | |
---|
61 | installdirs: mkinstalldirs |
---|
62 | ${srcdir}/mkinstalldirs ${bindir} ${mandir}/man1 ${datadir}/owl |
---|
63 | |
---|
64 | # Only move owl_prototypes.h into place if the new one is different |
---|
65 | owl_prototypes.h: codelist.pl varstubs.c $(OBJS:.o=.c) |
---|
66 | perl codelist.pl | grep -v ZWRITEOPTIONS > owl_prototypes.h.new |
---|
67 | @cmp -s owl_prototypes.h.new owl_prototypes.h || echo 'Interfaces changed!' |
---|
68 | @cmp -s owl_prototypes.h.new owl_prototypes.h || mv -f owl_prototypes.h.new owl_prototypes.h |
---|
69 | |
---|
70 | tags: |
---|
71 | etags *.[ch] |
---|
72 | |
---|
73 | *.o:: owl.h config.h owl_prototypes.h |
---|