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.37 2003/02/23 12:02:26 alex Exp $
14 AUTOMAKE_OPTIONS = ../portab/ansi2knr
16 INCLUDES = -I$(srcdir)/../portab -I$(srcdir)/../tool
18 LINTARGS = -weak -warnunixlib +unixlib -booltype BOOLEAN
20 sbin_PROGRAMS = ngircd
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 \
25 rendezvous.c resolve.c
27 ngircd_LDFLAGS = -L../portab -L../tool
29 ngircd_LDADD = -lngportab -lngtool
31 noinst_HEADERS = ngircd.h channel.h client.h conf.h conn.h conn-zip.h conn-func.h \
32 hash.h irc.h irc-channel.h irc-info.h irc-login.h irc-mode.h irc-op.h \
33 irc-oper.h irc-server.h irc-write.h lists.h log.h match.h parse.h \
34 rendezvous.h resolve.h \
38 rm -f check-version check-help lint.out cvs-version.*
40 maintainer-clean-local:
41 rm -f Makefile Makefile.in
43 check-version: Makefile
44 echo "#!/bin/sh" > check-version
45 echo "./ngircd --version | grep ngircd > /dev/null 2>&1" >> check-version
46 chmod 755 check-version
49 echo "#!/bin/sh" > check-help
50 echo "./ngircd --help | grep help > /dev/null 2>&1" >> check-help
56 echo "checking $$f ..."; \
57 splint $$f $(LINTARGS) -I./.. -I./../portab $(AM_CFLAGS) > lint.out 2>&1; \
58 grep "no warnings" lint.out > /dev/null 2>&1; \
59 if [ $$? -ne 0 ]; then \
60 echo; cat lint.out; echo; \
64 ngircd.c: cvs-date cvs-version.h
67 grep VERSION ../config.h | grep "CVS" \
68 && echo "#define CVSDATE \"$$( grep "\$$Id" $(srcdir)/*.c \
69 | $(AWK) "{ print \$$9 }" | sort | tail -1 \
70 | sed -e "s/\//-/g" )\"" > cvs-version.new \
71 || echo "" > cvs-version.new
72 diff cvs-version.h cvs-version.new || cp cvs-version.new cvs-version.h
74 TESTS = check-version check-help