chiark / gitweb /
d880a3be4c7977ef27414b5f1a87be8a00e0ed7a
[userv.git] / Makefile.in
1 #  userv - Makefile.in
2 #  
3 #  Copyright (C)1996-1997 Ian Jackson
4 #  
5 #  This is free software; you can redistribute it and/or modify it
6 #  under the terms of the GNU General Public License as published by
7 #  the Free Software Foundation; either version 2 of the License, or
8 #  (at your option) any later version.
9 #  
10 #  This program is distributed in the hope that it will be useful, but
11 #  WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 #  General Public License for more details.
14 #  
15 #  You should have received a copy of the GNU General Public License
16 #  along with userv; if not, write to the Free Software
17 #  Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 CC=@CC@
20 CFLAGS=@CFLAGS@ $(XCFLAGS)
21 OPTIMISE=@OPTIMISE@
22 CPPFLAGS=@DEBUGDEFS@ $(XCPPFLAGS)
23 LDLIBS=@DEBUGLIBS@ $(XLDLIBS)
24
25 M4=m4
26 M4FLAGS=
27 LEX=flex
28 CWD=$(shell pwd)
29
30 all:            daemon client
31
32 daemon:         daemon.o parserlexer.o ddebug.o lib.o
33
34 lexer.l:        language.i4
35
36 client.o:       config.h common.h pcsum.h
37
38 daemon.o:       config.h common.h pcsum.h daemon.h lib.h tokens.h
39
40 lib.o:          config.h lib.h
41
42 ddebug.o:       config.h common.h pcsum.h daemon.h lib.h tokens.h
43
44 parserlexer.o:  lexer.c parser.c config.h common.h pcsum.h daemon.h lib.h tokens.h
45 # lexer.c #include's parser.c at the end.  Blame flex.
46                 $(CC) -c $(CPPFLAGS) $(CFLAGS) lexer.c -o $@
47
48 pcsum.h:        common.h Makefile
49                 cat common.h Makefile | md5sum | perl -pe 's/../0x$$&,/g; s/,$$//;' \
50                         >pcsum.h.new && mv pcsum.h.new pcsum.h
51
52 tokens.h:       language.i4
53
54 autoconf configure:
55                 autoheader
56                 autoconf
57
58 clean:
59                 rm -f daemon client lexer.l lexer.c tokens.h pcsum.h
60                 rm -f overview.eps overview.ps
61                 rm -f spec.lout* spec.ps spec.text* lout.li
62                 rm -rf spec.html*
63                 rm -f *.o *~ core ./#*#
64
65 distclean:      clean
66                 rm -f config.status config.log Makefile config.h
67
68 realclean:      distclean
69                 rm -f configure config.h.in
70
71 %.l:            %.l.m4
72                 $(M4) $(M4FLAGS) -- $< >$@.new && mv $@.new $@
73
74 %.h:            %.h.m4
75                 $(M4) $(M4FLAGS) -- $< >$@.new && mv $@.new $@
76
77 %:              %.m4
78                 $(M4) $(M4FLAGS) -- $< >$@.new && mv $@.new $@