]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/Makefile.am
- Updated documentation.
[ngircd-alex.git] / src / ngircd / Makefile.am
1 #
2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it 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 # Please read the file COPYING, README and AUTHORS for more information.
10 #
11 # $Id: Makefile.am,v 1.36 2003/01/13 12:20:16 alex Exp $
12 #
13
14 AUTOMAKE_OPTIONS = ../portab/ansi2knr
15
16 INCLUDES = -I$(srcdir)/../portab -I$(srcdir)/../tool
17
18 LINTARGS = -weak -warnunixlib +unixlib -booltype BOOLEAN
19
20 sbin_PROGRAMS = ngircd
21
22 ngircd_SOURCES = ngircd.c channel.c client.c conf.c conn.c conn-zip.c conn-func.c \
23         hash.c irc.c irc-channel.c irc-info.c irc-login.c irc-mode.c irc-op.c \
24         irc-oper.c irc-server.c irc-write.c lists.c log.c match.c parse.c resolve.c
25
26 ngircd_LDFLAGS = -L../portab -L../tool
27
28 ngircd_LDADD = -lngportab -lngtool
29
30 noinst_HEADERS = ngircd.h channel.h client.h conf.h conn.h conn-zip.h conn-func.h \
31         hash.h irc.h irc-channel.h irc-info.h irc-login.h irc-mode.h irc-op.h \
32         irc-oper.h irc-server.h irc-write.h lists.h log.h match.h parse.h resolve.h \
33         messages.h defines.h
34
35 clean-local:
36         rm -f check-version check-help lint.out cvs-version.*
37
38 maintainer-clean-local:
39         rm -f Makefile Makefile.in
40
41 check-version: Makefile
42         echo "#!/bin/sh" > check-version
43         echo "./ngircd --version | grep ngircd > /dev/null 2>&1" >> check-version
44         chmod 755 check-version
45
46 check-help: Makefile
47         echo "#!/bin/sh" > check-help
48         echo "./ngircd --help | grep help > /dev/null 2>&1" >> check-help
49         chmod 755 check-help
50
51 lint:
52         rm -f lint.out
53         for f in *.c; do \
54          echo "checking $$f ..."; \
55          splint $$f $(LINTARGS) -I./.. -I./../portab $(AM_CFLAGS) > lint.out 2>&1; \
56          grep "no warnings" lint.out > /dev/null 2>&1; \
57          if [ $$? -ne 0 ]; then \
58           echo; cat lint.out; echo; \
59          fi; \
60         done;
61
62 ngircd.c: cvs-date cvs-version.h
63
64 cvs-date:
65         grep VERSION ../config.h | grep "CVS" \
66          && echo "#define CVSDATE \"$$( grep "\$$Id" $(srcdir)/*.c \
67             | $(AWK) "{ print \$$9 }" | sort | tail -1 \
68             | sed -e "s/\//-/g" )\"" > cvs-version.new \
69          || echo "" > cvs-version.new
70         diff cvs-version.h cvs-version.new || cp cvs-version.new cvs-version.h
71
72 TESTS = check-version check-help
73
74 # -eof-