3 # Copyright (C)1996-1997 Ian Jackson
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.
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.
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.
20 CFLAGS=@CFLAGS@ $(XCFLAGS)
22 CPPFLAGS=@DEBUGDEFS@ $(XCPPFLAGS)
23 LDLIBS=@DEBUGLIBS@ $(XLDLIBS)
32 daemon: daemon.o parserlexer.o ddebug.o lib.o
36 client.o: config.h common.h pcsum.h
38 daemon.o: config.h common.h pcsum.h daemon.h lib.h tokens.h
42 ddebug.o: config.h common.h pcsum.h daemon.h lib.h tokens.h
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 $@
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
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
63 rm -f *.o *~ core ./#*#
66 rm -f config.status config.log Makefile config.h
69 rm -f configure config.h.in
72 $(M4) $(M4FLAGS) -- $< >$@.new && mv $@.new $@
75 $(M4) $(M4FLAGS) -- $< >$@.new && mv $@.new $@
78 $(M4) $(M4FLAGS) -- $< >$@.new && mv $@.new $@