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. ####
29 #### End of system configuration section. ####
32 IRCD_MAKEFILES = Makefile doc/Makefile ircd/Makefile
36 .PHONY: server build depend install
37 # Some versions of make give a warning when this is empty:
40 build: ${IRCD_MAKEFILES}
41 @for i in ${SUBDIRS}; do \
42 echo "Building $$i..."; \
43 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; \
53 sub-clean: ${IRCD_MAKEFILES}
54 @for i in ${SUBDIRS}; do \
55 echo "Cleaning $$i..."; \
56 cd $$i; ${MAKE} clean; cd ..;\
59 clean: root-clean sub-clean
61 root-distclean: root-clean
62 @for i in '*.rej'; do \
63 echo "Removing $$i"; \
64 REMOVE_FILES="`find . -name "$$i" -print`"; \
65 test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \
68 sub-distclean: ${IRCD_MAKEFILES}
69 @for i in ${SUBDIRS}; do \
70 echo "Dist-cleaning $$i..."; \
71 cd $$i; ${MAKE} distclean; cd ..;\
74 distclean: root-distclean sub-distclean
75 ${RM} -f Makefile config.h config.log config.cache config.status \
78 maintainer-clean: root-distclean ${IRCD_MAKEFILES}
79 @for i in ${SUBDIRS}; do \
80 echo "maintainer-cleaning $$i..."; \
81 cd $$i; ${MAKE} maintainer-clean; cd ..;\
84 depend: ${IRCD_MAKEFILES}
85 @for i in ${SUBDIRS}; do \
86 echo "Making dependencies in $$i..."; \
87 cd $$i; ${MAKE} depend; cd ..; \
90 install: ${IRCD_MAKEFILES}
91 test -d ${prefix} || mkdir ${prefix}
92 @for i in ${SUBDIRS}; do \
93 echo "Installing $$i..."; \
94 cd $$i; ${MAKE} install; cd ..; \
97 uninstall: ${IRCD_MAKEFILES}
98 @for i in ${SUBDIRS}; do \
99 echo "Uninstalling $$i..."; \
100 cd $$i; ${MAKE} uninstall; cd ..; \
103 ${srcdir}/aclocal.m4: acinclude.m4
104 cd ${srcdir} && aclocal
106 ${srcdir}/configure: configure.in aclocal.m4
107 cd ${srcdir} && autoconf
109 # autoheader might not change config.h.in, so touch a stamp file.
110 ${srcdir}/config.h.in: stamp-h.in
111 ${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h
112 cd ${srcdir} && autoheader
113 echo timestamp > ${srcdir}/stamp-h.in
116 stamp-h: config.h.in config.status
119 Makefile: Makefile.in config.status
122 doc/Makefile: doc/Makefile.in config.status
125 ircd/Makefile: ircd/Makefile.in config.status
128 config.status: configure
129 ./config.status --recheck
131 # Some versions of 'make' do not support the .PHONY target :
134 # Indent all headers and source files:
136 @test "`indent --version`" = "GNU indent 2.1.0" || \
137 (echo "You need GNU indent 2.1.0; See doc/readme.indent" && exit -1);
138 VERSION_CONTROL=none indent include/*.h ircd/*.c