]> jfr.im git - solanum.git/blame - Makefile.in
Do not assign to MAKE in the main Makefile.
[solanum.git] / Makefile.in
CommitLineData
212380e3
AC
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: Makefile.in 1347 2006-05-17 14:49:13Z nenolod $
20#*/
21
22RM=@RM@
23prefix = @prefix@
24exec_prefix = @exec_prefix@
25bindir = @bindir@
26mandir = @mandir@
27moduledir = @moduledir@
28helpdir = @helpdir@
29confdir = @confdir@
30logdir = @logdir@
31
32# Default CFLAGS
33# CFLAGS = -g -O2 -DNDEBUG
34CFLAGS = @CFLAGS@
35# Developers CFLAGS
36#CFLAGS= -g -O2 -Wunused -Wall -ggdb -pedantic -Wshadow -Wmissing-declarations
37
38# Default make flags - you may want to uncomment this on a multicpu machine
39#MFLAGS = -j 4
40
41#
42# For developers
43#CFLAGS= -g -O2 -Wall
44
45# You may need to define the FD_SETSIZE in order to overrule
46# the system one.
47#CFLAGS= -DNDEBUG -g -O2 -D"FD_SETSIZE=1024"
48SHELL=/bin/sh
734ce253 49SUBDIRS=libratbox modules extensions src tools ssld bandb doc help
212380e3
AC
50CLEANDIRS = ${SUBDIRS}
51RSA_FILES=rsa_respond/README rsa_respond/respond.c rsa_respond/Makefile
52
212380e3
AC
53all: build
54
55
56autoconf: configure.ac
57 autoconf
58 autoheader
59 ${RM} -f config.cache
60
61build:
62 -@if [ ! -f include/setup.h ] ; then \
63 echo "Hmm...doesn't look like you've run configure..."; \
64 echo "Doing so now."; \
65 sh configure; \
66 fi
014e2aa0 67 @if [ -d .hg ] ; then \
62a360ea 68 revh=`hg parents --template '{date|shortdate}_{node|short}' 2>/dev/null | sed -e s/-//g -e s/_/-/`;\
014e2aa0
JT
69 [ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \
70 fi
71 @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h
212380e3
AC
72 @for i in $(SUBDIRS); do \
73 echo "build ==> $$i";\
74 cd $$i;\
0620a364 75 ${MAKE} || exit; cd ..;\
212380e3
AC
76 done
77
78clean:
79 ${RM} -f *~ core rsa_respond.tar rsa_respond.tar.gz
80 @for i in $(CLEANDIRS); do \
81 echo "clean ==> $$i";\
82 cd $$i;\
83 ${MAKE} clean; cd ..;\
84 done
85 -@if [ -f include/setup.h ] ; then \
86 echo "To really restart installation, make distclean" ; \
87 fi
88
89distclean:
90 ${RM} -f Makefile *~ *.rej *.orig core ircd.core
91 ${RM} -f config.status config.cache config.log
92 cd include; ${RM} -f setup.h *~ *.rej *.orig ; cd ..
93 @for i in $(CLEANDIRS); do \
94 echo "distclean ==> $$i";\
95 cd $$i;\
96 ${MAKE} distclean; cd ..;\
97 done
98
99depend:
014e2aa0 100 @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h
212380e3
AC
101 @for i in $(SUBDIRS); do \
102 echo "depend ==> $$i";\
103 cd $$i;\
104 ${MAKE} depend; cd ..;\
105 done
106
107lint:
108 @for i in $(SUBDIRS); do \
109 echo "lint ==> $$i";\
110 cd $$i;\
111 ${MAKE} lint; cd ..;\
112 done
113
114install-mkdirs:
115 @echo "ircd: setting up ircd directory structure"
116 -@if test ! -d $(DESTDIR)$(prefix); then \
117 mkdir $(DESTDIR)$(prefix); \
118 fi
119 -@if test ! -d $(DESTDIR)$(bindir); then \
120 mkdir $(DESTDIR)$(bindir); \
121 fi
122 -@if test ! -d $(DESTDIR)$(confdir); then \
123 mkdir $(DESTDIR)$(confdir); \
124 fi
125 -@if test ! -d $(DESTDIR)$(mandir); then \
126 mkdir $(DESTDIR)$(mandir); \
127 fi
128 -@if test ! -d $(DESTDIR)$(moduledir); then \
129 mkdir $(DESTDIR)$(moduledir); \
130 fi
131 -@if test ! -d $(DESTDIR)$(helpdir); then \
132 mkdir $(DESTDIR)$(helpdir); \
133 fi
134 -@if test ! -d $(DESTDIR)$(logdir); then \
135 mkdir $(DESTDIR)$(logdir); \
136 fi
137
138install: install-mkdirs all
139 @for i in $(SUBDIRS); do \
140 echo "install ==> $$i";\
141 cd $$i;\
142 ${MAKE} install; \
143 cd ..; \
144 done
145
146rsa_respond:
147 @cd tools;\
148 echo "Creating rsa_respond.tar.gz";\
149 tar cf ../rsa_respond.tar $(RSA_FILES);\
150 cd ..;\
151 gzip rsa_respond.tar