]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/Makefile.am
Introduce_Client() => Client_Introduce(), and move it to client.c
[ngircd-alex.git] / src / ngircd / Makefile.am
1 #
2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001-2012 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 = \
22         ngircd.c \
23         array.c \
24         channel.c \
25         class.c \
26         client.c \
27         conf.c \
28         conn.c \
29         conn-func.c \
30         conn-ssl.c \
31         conn-zip.c \
32         hash.c \
33         io.c \
34         irc.c \
35         irc-channel.c \
36         irc-info.c \
37         irc-login.c \
38         irc-mode.c \
39         irc-op.c \
40         irc-oper.c \
41         irc-server.c \
42         irc-write.c \
43         lists.c \
44         log.c \
45         match.c \
46         numeric.c \
47         op.c \
48         pam.c \
49         parse.c \
50         proc.c \
51         resolve.c \
52         sighandlers.c
53
54 ngircd_LDFLAGS = -L../portab -L../tool -L../ipaddr
55
56 ngircd_LDADD = -lngportab -lngtool -lngipaddr
57
58 noinst_HEADERS = \
59         ngircd.h \
60         array.h \
61         channel.h \
62         class.h \
63         client.h \
64         conf.h \
65         conf-ssl.h \
66         conn.h \
67         conn-func.h \
68         conn-ssl.h \
69         conn-zip.h \
70         defines.h \
71         hash.h \
72         io.h \
73         irc.h \
74         irc-channel.h \
75         irc-info.h \
76         irc-login.h \
77         irc-mode.h \
78         irc-op.h \
79         irc-oper.h \
80         irc-server.h \
81         irc-write.h \
82         lists.h \
83         log.h \
84         match.h \
85         messages.h \
86         numeric.h \
87         op.h \
88         pam.h \
89         parse.h \
90         proc.h \
91         resolve.h \
92         sighandlers.h
93
94 clean-local:
95         rm -f check-version check-help lint.out
96
97 maintainer-clean-local:
98         rm -f Makefile Makefile.in
99
100 check-version: Makefile
101         echo "#!/bin/sh" > check-version
102         echo "./ngircd --version | grep ngircd >/dev/null 2>&1" >>check-version
103         chmod 755 check-version
104
105 check-help: Makefile
106         echo "#!/bin/sh" > check-help
107         echo "./ngircd --help | grep help >/dev/null 2>&1" >>check-help
108         chmod 755 check-help
109
110 lint:
111         @splint --version >/dev/null 2>&1 \
112          || ( echo; echo "Error: \"splint\" not found!"; echo; exit 1 )
113         @echo; warnings=0; files=0; \
114         for f in *.c; do \
115          echo "checking $$f ..."; \
116          splint $$f $(LINTARGS) -I$(srcdir) -I$(srcdir)/.. \
117           $(INCLUDES) $(AM_CFLAGS) >lint.out 2>&1; \
118          grep "no warnings" lint.out > /dev/null 2>&1; \
119          if [ $$? -ne 0 ]; then \
120           waswarning=1; \
121           echo; grep -v "^Command Line: " lint.out; echo; \
122           w=$$( grep "code warning" lint.out | $(AWK) "{ print \$$4 }" ); \
123           [ "$$w" -gt 0 ] && warnings=`expr $$warnings + $$w`; \
124           files=`expr $$files + 1`; \
125          else \
126           waswarning=0; \
127          fi; \
128          rm -f lint.out; \
129         done; \
130         [ $$waswarning -eq 0 ] && echo; \
131         [ $$warnings -gt 0 ] \
132          && echo "Result: $$warnings warning(s) in $$files file(s)!" \
133          || echo "Result: no warnings found."; \
134         echo; [ $$warnings -gt 0 ] && exit 1
135
136 TESTS = check-version check-help
137
138 # -eof-