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. ####
34 .PHONY: server build depend install config update diff patch export update
35 # Some versions of make give a warning when this is empty:
39 @for i in ${SUBDIRS}; do \
40 echo "Building $$i..."; \
41 cd $$i; ${MAKE} build; cd ..; \
45 @for i in '*.orig' '.*.orig' '\#*' '*~' '.*~' '*.bak' '.*.bak' core; do\
46 echo "Removing $$i"; \
47 REMOVE_FILES="`find . -name "$$i" -print`"; \
48 test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \
52 @for i in ${SUBDIRS}; do \
53 echo "Cleaning $$i..."; \
54 cd $$i; ${MAKE} clean; cd ..;\
57 clean: root-clean sub-clean
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 @for i in ${SUBDIRS}; do \
68 echo "Dist-cleaning $$i..."; \
69 cd $$i; ${MAKE} distclean; cd ..;\
72 distclean: root-distclean sub-distclean
73 ${RM} -f Makefile config.h config.log config.cache config.status \
76 maintainer-clean: root-distclean
77 @for i in ${SUBDIRS}; do \
78 echo "maintainer-cleaning $$i..."; \
79 cd $$i; ${MAKE} maintainer-clean; cd ..;\
83 @for i in ${SUBDIRS}; do \
84 echo "Making dependencies in $$i..."; \
85 cd $$i; ${MAKE} depend; cd ..; \
89 @for i in ${SUBDIRS}; do \
90 echo "Installing $$i..."; \
91 cd $$i; ${MAKE} install; cd ..; \
95 @for i in ${SUBDIRS}; do \
96 echo "Uninstalling $$i..."; \
97 cd $$i; ${MAKE} uninstall; cd ..; \
100 ${srcdir}/aclocal.m4: acinclude.m4
101 cd ${srcdir} && aclocal
103 ${srcdir}/configure: configure.in aclocal.m4
104 cd ${srcdir} && autoconf
106 # autoheader might not change config.h.in, so touch a stamp file.
107 ${srcdir}/config.h.in: stamp-h.in
108 ${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h
109 cd ${srcdir} && autoheader
110 echo timestamp > ${srcdir}/stamp-h.in
113 stamp-h: config.h.in config.status
116 Makefile: Makefile.in config.status
119 doc/Makefile: doc/Makefile.in config.status
122 ircd/Makefile: ircd/Makefile.in config.status
125 config.status: configure
126 ./config.status --recheck
128 # Some versions of 'make' do not support the .PHONY target :
131 # Indent all headers and source files:
133 @test "`indent --version`" = "GNU indent 2.1.0" || \
134 (echo "You need GNU indent 2.1.0; See doc/readme.indent" && exit -1);
135 VERSION_CONTROL=none indent include/*.h ircd/*.c