1 # Makefile for the Undernet IRC Daemon.
2 # Copyright (C) 1997, Carlo Wood <carlo@runaway.xs4all.nl>
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 #### Start of system configuration section. ####
28 #### End of system configuration section. ####
32 .PHONY: server build depend install config update diff patch export
33 # Some versions of make give a warning when this is empty:
37 @if [ ! -f config/config.h ]; then \
40 for i in config ircd; do \
41 echo "Building $$i..."; \
42 cd $$i; ${MAKE} build; cd ..; \
47 @for i in '*.orig' '.*.orig' '\#*' '*~' '.*~' '*.bak' '.*.bak' core; do\
48 echo "Removing $$i"; \
49 REMOVE_FILES="`find . -name "$$i" -print`"; \
50 test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \
54 @for i in ircd config; do \
55 echo "Cleaning $$i..."; \
56 cd $$i; ${MAKE} clean; cd ..;\
59 root-distclean: root-clean
60 @for i in '*.rej'; do \
61 echo "Removing $$i"; \
62 REMOVE_FILES="`find . -name "$$i" -print`"; \
63 test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \
67 distclean: root-distclean
68 @for i in doc ircd config; do \
69 echo "Dist-cleaning $$i..."; \
70 cd $$i; ${MAKE} distclean; cd ..;\
73 maintainer-clean: root-distclean
74 @for i in doc ircd config; do \
75 echo "maintainer-cleaning $$i..."; \
76 cd $$i; ${MAKE} maintainer-clean; cd ..;\
81 echo "Making dependencies in $$i..."; \
82 cd $$i; ${MAKE} depend; cd ..; \
86 @if [ -f ircd/ircd ]; then \
87 for i in ircd doc; do \
88 echo "Installing $$i..."; \
89 cd $$i; ${MAKE} install; cd ..; \
92 echo "First run 'make'"; \
96 @for i in doc ircd; do \
97 echo "Uninstalling $$i..."; \
98 cd $$i; ${MAKE} uninstall; cd ..; \
102 @cd config; ${MAKE} config
104 @echo "The Undernet IRC daemon is now hopefully configured for your setup."
105 @echo "Next run 'make' to build the server."
108 # Coders: You need GNU make for this to work.
109 Makefile: config/config.status Makefile.in
110 @echo "recreating Makefile"
112 CONFIG_FILES=../Makefile CONFIG_HEADERS= ./config.status > /dev/null
114 config/config.status:
115 @cd config; ${MAKE} config.status
117 # Some versions of 'make' do not support the .PHONY target :
120 # Indent all headers and source files:
122 @test "`indent --version`" = "GNU indent 2.1.0" || \
123 (echo "You need GNU indent 2.1.0; See doc/readme.indent" && exit -1);
124 VERSION_CONTROL=none indent include/*.h ircd/*.c