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 |
datarootdir = $(DESTDIR)@datarootdir@ |
35 |
|
36 |
# The make used HAS to set $(MAKE). But then, if we don't do it this |
37 |
# way, people lose the option to use a 'make' called something other |
38 |
# than `make.' If it doesn't set $(MAKE), fall back to the old behavior |
39 |
# by substing SET_MAKE. |
40 |
|
41 |
@SET_MAKE@ |
42 |
|
43 |
all: build |
44 |
|
45 |
build: include/setup.h depend |
46 |
@for i in $(BUILD_DIRS); do \ |
47 |
echo "build ==> $$i";\ |
48 |
cd $$i && ${MAKE} ${MFLAGS} build || exit; cd ..;\ |
49 |
done |
50 |
|
51 |
clean: |
52 |
${RM} -f *~ core rsa_respond.tar rsa_respond.tar.gz |
53 |
@for i in $(CLEAN_DIRS); do \ |
54 |
echo "clean ==> $$i";\ |
55 |
cd $$i && ${MAKE} ${MFLAGS} clean || exit; cd ..;\ |
56 |
done |
57 |
-@if [ -f include/setup.h ] ; then \ |
58 |
echo "To really restart installation, ${MAKE} distclean" ; \ |
59 |
fi |
60 |
|
61 |
distclean: |
62 |
${RM} -f Makefile *~ *.rej *.orig *core |
63 |
${RM} -f config.status config.cache config.log |
64 |
${RM} -rf autom4te.cache |
65 |
cd include; ${RM} -f setup.h *~ *.rej *.orig ; cd .. |
66 |
@for i in $(DISTCLEAN_DIRS); do \ |
67 |
echo "distclean ==> $$i";\ |
68 |
cd $$i && ${MAKE} ${MFLAGS} distclean || exit; cd ..; \ |
69 |
done |
70 |
|
71 |
depend: |
72 |
@for i in $(DEPEND_DIRS); do \ |
73 |
echo "depend ==> $$i";\ |
74 |
cd $$i && ${MAKE} ${MFLAGS} .depend || exit; cd .. ; \ |
75 |
done |
76 |
|
77 |
install: all |
78 |
@for i in $(INSTALL_DIRS); do \ |
79 |
echo "install ==> $$i";\ |
80 |
cd $$i && ${MAKE} ${MFLAGS} install || exit; cd ..; \ |
81 |
done |
82 |
|
83 |
include/setup.h: |
84 |
@sh configure |
85 |
|
86 |
# A la Linux kernel config :) |
87 |
dep: depend |