1
0

Makefile.am 2.9 KB

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