1 |
#************************************************************************ |
2 |
#* IRC - Internet Relay Chat, Makefile |
3 |
#* Copyright (C) 1990, Jarkko Oikarinen |
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 1, or (at your option) |
8 |
#* any later version. |
9 |
#* |
10 |
#* This program is distributed in the hope that it will be useful, |
11 |
#* but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
#* GNU General Public License for more details. |
14 |
#* |
15 |
#* You should have received a copy of the GNU General Public License |
16 |
#* along with this program; if not, write to the Free Software |
17 |
#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
18 |
#* |
19 |
#* $Id$ |
20 |
#*/ |
21 |
|
22 |
RM = @RM@ |
23 |
|
24 |
# Default make flags - you may want to uncomment this on a multicpu machine |
25 |
#MFLAGS = -j 4 |
26 |
DEPEND_DIRS = lib modules src servlink |
27 |
BUILD_DIRS = ${DEPEND_DIRS} tools |
28 |
INSTALL_DIRS = ${BUILD_DIRS} etc doc help |
29 |
CLEAN_DIRS = ${BUILD_DIRS} contrib |
30 |
# Anywhere that we can make install, we obviously can rm -f Makefile |
31 |
DISTCLEAN_DIRS = ${INSTALL_DIRS} contrib messages |
32 |
|
33 |
prefix = $(DESTDIR)@prefix@ |
34 |
|
35 |
# The make used HAS to set $(MAKE). But then, if we don't do it this |
36 |
# way, people lose the option to use a 'make' called something other |
37 |
# than `make.' If it doesn't set $(MAKE), fall back to the old behavior |
38 |
# by substing SET_MAKE. |
39 |
|
40 |
@SET_MAKE@ |
41 |
|
42 |
all: build |
43 |
|
44 |
build: include/setup.h depend |
45 |
@for i in $(BUILD_DIRS); do \ |
46 |
echo "build ==> $$i";\ |
47 |
cd $$i && ${MAKE} ${MFLAGS} build || exit; cd ..;\ |
48 |
done |
49 |
|
50 |
clean: |
51 |
${RM} -f *~ core rsa_respond.tar rsa_respond.tar.gz |
52 |
@for i in $(CLEAN_DIRS); do \ |
53 |
echo "clean ==> $$i";\ |
54 |
cd $$i && ${MAKE} ${MFLAGS} clean || exit; cd ..;\ |
55 |
done |
56 |
-@if [ -f include/setup.h ] ; then \ |
57 |
echo "To really restart installation, ${MAKE} distclean" ; \ |
58 |
fi |
59 |
|
60 |
distclean: |
61 |
${RM} -f Makefile *~ *.rej *.orig *core |
62 |
${RM} -f config.status config.cache config.log |
63 |
${RM} -rf autom4te.cache |
64 |
cd include; ${RM} -f setup.h *~ *.rej *.orig ; cd .. |
65 |
@for i in $(DISTCLEAN_DIRS); do \ |
66 |
echo "distclean ==> $$i";\ |
67 |
cd $$i && ${MAKE} ${MFLAGS} distclean || exit; cd ..; \ |
68 |
done |
69 |
|
70 |
depend: |
71 |
@for i in $(DEPEND_DIRS); do \ |
72 |
echo "depend ==> $$i";\ |
73 |
cd $$i && ${MAKE} ${MFLAGS} .depend || exit; cd .. ; \ |
74 |
done |
75 |
|
76 |
install: all |
77 |
@for i in $(INSTALL_DIRS); do \ |
78 |
echo "install ==> $$i";\ |
79 |
cd $$i && ${MAKE} ${MFLAGS} install || exit; cd ..; \ |
80 |
done |
81 |
|
82 |
include/setup.h: |
83 |
@sh configure |
84 |
|
85 |
# A la Linux kernel config :) |
86 |
dep: depend |