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 adns_subdir = @ADNS_SUBDIR@
30 #### End of system configuration section. ####
32 SUBDIRS = doc ${adns_subdir} ircd
33 IRCD_MAKEFILES = Makefile doc/Makefile adns/Makefile ircd/Makefile
37 .PHONY: server build depend install config update diff patch export update
38 # Some versions of make give a warning when this is empty:
41 build: ${IRCD_MAKEFILES}
42 @for i in ${SUBDIRS}; do \
43 echo "Building $$i..."; \
44 cd $$i; ${MAKE} build; cd ..; \
48 @echo "*************************************************************"
49 @echo "* The \"make config\" step is now DEPRECATED. Most *"
50 @echo "* server options are now configurable via the configuration *"
51 @echo "* file using F-lines; the rest are specified on the command *"
52 @echo "* line to \"./configure\". To aid the transition, a shell *"
53 @echo "* script has been provided to generate the necessary *"
54 @echo "* configuration lines for you. You may run this script by *"
55 @echo "* typing \"tools/transition\"; please pay attention to its *"
56 @echo "* output. This message will be removed for the next major *"
57 @echo "* release of ircu. *"
58 @echo "*************************************************************"
61 @for i in '*.orig' '.*.orig' '\#*' '*~' '.*~' '*.bak' '.*.bak' core; do\
62 echo "Removing $$i"; \
63 REMOVE_FILES="`find . -name "$$i" -print`"; \
64 test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \
67 sub-clean: ${IRCD_MAKEFILES}
68 @for i in ${SUBDIRS}; do \
69 echo "Cleaning $$i..."; \
70 cd $$i; ${MAKE} clean; cd ..;\
73 clean: root-clean sub-clean
75 root-distclean: root-clean
76 @for i in '*.rej'; do \
77 echo "Removing $$i"; \
78 REMOVE_FILES="`find . -name "$$i" -print`"; \
79 test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \
82 sub-distclean: ${IRCD_MAKEFILES}
83 @for i in ${SUBDIRS}; do \
84 echo "Dist-cleaning $$i..."; \
85 cd $$i; ${MAKE} distclean; cd ..;\
88 distclean: root-distclean sub-distclean
89 ${RM} -f Makefile config.h config.log config.cache config.status \
92 maintainer-clean: root-distclean ${IRCD_MAKEFILES}
93 @for i in ${SUBDIRS}; do \
94 echo "maintainer-cleaning $$i..."; \
95 cd $$i; ${MAKE} maintainer-clean; cd ..;\
98 depend: ${IRCD_MAKEFILES}
99 @for i in ${SUBDIRS}; do \
100 echo "Making dependencies in $$i..."; \
101 cd $$i; ${MAKE} depend; cd ..; \
104 install: ${IRCD_MAKEFILES}
105 test -d ${prefix} || mkdir ${prefix}
106 test -d ${prefix}/include || mkdir ${prefix}/include
107 @for i in ${SUBDIRS}; do \
108 echo "Installing $$i..."; \
109 cd $$i; ${MAKE} install; cd ..; \
112 uninstall: ${IRCD_MAKEFILES}
113 @for i in ${SUBDIRS}; do \
114 echo "Uninstalling $$i..."; \
115 cd $$i; ${MAKE} uninstall; cd ..; \
118 ${srcdir}/aclocal.m4: acinclude.m4
119 cd ${srcdir} && aclocal
121 ${srcdir}/configure: configure.in aclocal.m4
122 cd ${srcdir} && autoconf
124 # autoheader might not change config.h.in, so touch a stamp file.
125 ${srcdir}/config.h.in: stamp-h.in
126 ${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h
127 cd ${srcdir} && autoheader
128 echo timestamp > ${srcdir}/stamp-h.in
131 stamp-h: config.h.in config.status
134 Makefile: Makefile.in config.status
137 doc/Makefile: doc/Makefile.in config.status
140 ircd/Makefile: ircd/Makefile.in config.status
143 config.status: configure
144 ./config.status --recheck
146 # Some versions of 'make' do not support the .PHONY target :
149 # Indent all headers and source files:
151 @test "`indent --version`" = "GNU indent 2.1.0" || \
152 (echo "You need GNU indent 2.1.0; See doc/readme.indent" && exit -1);
153 VERSION_CONTROL=none indent include/*.h ircd/*.c