2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
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.
11 # $Id: Makefile.am,v 1.51 2008/02/26 22:04:17 fw Exp $
14 AUTOMAKE_OPTIONS = ../portab/ansi2knr
16 INCLUDES = -I$(srcdir)/../portab -I$(srcdir)/../tool -I$(srcdir)/../ipaddr
18 LINTARGS = -weak -warnunixlib +unixlib -booltype BOOLEAN \
19 -varuse -retvalother -emptyret -unrecog
21 sbin_PROGRAMS = ngircd
23 ngircd_SOURCES = ngircd.c array.c channel.c client.c conf.c conn.c conn-func.c \
24 conn-ssl.c conn-zip.c hash.c io.c irc.c irc-channel.c irc-info.c irc-login.c \
25 irc-mode.c irc-op.c irc-oper.c irc-server.c irc-write.c lists.c log.c \
26 match.c op.c numeric.c parse.c rendezvous.c resolve.c
28 ngircd_LDFLAGS = -L../portab -L../tool -L../ipaddr
30 ngircd_LDADD = -lngportab -lngtool -lngipaddr
32 noinst_HEADERS = ngircd.h array.h channel.h client.h conf.h conf-ssl.h conn.h \
33 conn-func.h conn-ssl.h conn-zip.h hash.h io.h irc.h irc-channel.h \
34 irc-info.h irc-login.h irc-mode.h irc-op.h irc-oper.h irc-server.h \
35 irc-write.h lists.h log.h match.h numeric.h op.h parse.h rendezvous.h \
36 resolve.h defines.h messages.h
39 rm -f check-version check-help lint.out
41 maintainer-clean-local:
42 rm -f Makefile Makefile.in
44 check-version: Makefile
45 echo "#!/bin/sh" > check-version
46 echo "./ngircd --version | grep ngircd >/dev/null 2>&1" >>check-version
47 chmod 755 check-version
50 echo "#!/bin/sh" > check-help
51 echo "./ngircd --help | grep help >/dev/null 2>&1" >>check-help
55 @splint --version >/dev/null 2>&1 \
56 || ( echo; echo "Error: \"splint\" not found!"; echo; exit 1 )
57 @echo; warnings=0; files=0; \
59 echo "checking $$f ..."; \
60 splint $$f $(LINTARGS) -I$(srcdir) -I$(srcdir)/.. \
61 $(INCLUDES) $(AM_CFLAGS) >lint.out 2>&1; \
62 grep "no warnings" lint.out > /dev/null 2>&1; \
63 if [ $$? -ne 0 ]; then \
65 echo; grep -v "^Command Line: " lint.out; echo; \
66 w=$$( grep "code warning" lint.out | $(AWK) "{ print \$$4 }" ); \
67 [ "$$w" -gt 0 ] && warnings=`expr $$warnings + $$w`; \
68 files=`expr $$files + 1`; \
74 [ $$waswarning -eq 0 ] && echo; \
75 [ $$warnings -gt 0 ] \
76 && echo "Result: $$warnings warning(s) in $$files file(s)!" \
77 || echo "Result: no warnings found."; \
78 echo; [ $$warnings -gt 0 ] && exit 1
80 TESTS = check-version check-help