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