]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/Makefile.am
New configuration option "NoZeroConf" to disable ZeroConf registration
[ngircd-alex.git] / src / ngircd / Makefile.am
1 #
2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001-2010 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
12 AUTOMAKE_OPTIONS = ../portab/ansi2knr
13
14 INCLUDES = -I$(srcdir)/../portab -I$(srcdir)/../tool -I$(srcdir)/../ipaddr
15
16 LINTARGS = -weak -warnunixlib +unixlib -booltype BOOLEAN \
17  -varuse -retvalother -emptyret -unrecog
18
19 sbin_PROGRAMS = ngircd
20
21 ngircd_SOURCES = ngircd.c array.c channel.c client.c conf.c conn.c conn-func.c \
22         conn-ssl.c conn-zip.c hash.c io.c irc.c irc-channel.c irc-info.c irc-login.c \
23         irc-mode.c irc-op.c irc-oper.c irc-server.c irc-write.c lists.c log.c \
24         match.c op.c numeric.c pam.c parse.c proc.c rendezvous.c resolve.c sighandlers.c
25
26 ngircd_LDFLAGS = -L../portab -L../tool -L../ipaddr
27
28 ngircd_LDADD = -lngportab -lngtool -lngipaddr
29
30 noinst_HEADERS = ngircd.h array.h channel.h client.h conf.h conf-ssl.h conn.h \
31         conn-func.h conn-ssl.h conn-zip.h hash.h io.h irc.h irc-channel.h \
32         irc-info.h irc-login.h irc-mode.h irc-op.h irc-oper.h irc-server.h \
33         irc-write.h lists.h log.h match.h numeric.h op.h pam.h parse.h proc.h \
34         rendezvous.h resolve.h sighandlers.h defines.h messages.h
35
36 clean-local:
37         rm -f check-version check-help lint.out
38
39 maintainer-clean-local:
40         rm -f Makefile Makefile.in
41
42 check-version: Makefile
43         echo "#!/bin/sh" > check-version
44         echo "./ngircd --version | grep ngircd >/dev/null 2>&1" >>check-version
45         chmod 755 check-version
46
47 check-help: Makefile
48         echo "#!/bin/sh" > check-help
49         echo "./ngircd --help | grep help >/dev/null 2>&1" >>check-help
50         chmod 755 check-help
51
52 lint:
53         @splint --version >/dev/null 2>&1 \
54          || ( echo; echo "Error: \"splint\" not found!"; echo; exit 1 )
55         @echo; warnings=0; files=0; \
56         for f in *.c; do \
57          echo "checking $$f ..."; \
58          splint $$f $(LINTARGS) -I$(srcdir) -I$(srcdir)/.. \
59           $(INCLUDES) $(AM_CFLAGS) >lint.out 2>&1; \
60          grep "no warnings" lint.out > /dev/null 2>&1; \
61          if [ $$? -ne 0 ]; then \
62           waswarning=1; \
63           echo; grep -v "^Command Line: " lint.out; echo; \
64           w=$$( grep "code warning" lint.out | $(AWK) "{ print \$$4 }" ); \
65           [ "$$w" -gt 0 ] && warnings=`expr $$warnings + $$w`; \
66           files=`expr $$files + 1`; \
67          else \
68           waswarning=0; \
69          fi; \
70          rm -f lint.out; \
71         done; \
72         [ $$waswarning -eq 0 ] && echo; \
73         [ $$warnings -gt 0 ] \
74          && echo "Result: $$warnings warning(s) in $$files file(s)!" \
75          || echo "Result: no warnings found."; \
76         echo; [ $$warnings -gt 0 ] && exit 1
77
78 TESTS = check-version check-help
79
80 # -eof-