]> jfr.im git - irc/freenode/ircd-seven.git/blob - Makefile.in
m_kline: insert a safety zero early
[irc/freenode/ircd-seven.git] / Makefile.in
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
22 RM=@RM@
23 prefix = @prefix@
24 exec_prefix = @exec_prefix@
25 bindir = @bindir@
26 mandir = @mandir@
27 moduledir = @moduledir@
28 helpdir = @helpdir@
29 confdir = @confdir@
30 logdir = @logdir@
31
32 # Default CFLAGS
33 # CFLAGS = -g -O2 -DNDEBUG
34 CFLAGS = @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"
48 SHELL=/bin/sh
49 SUBDIRS=libratbox modules extensions src tools ssld bandb doc help
50 CLEANDIRS = ${SUBDIRS}
51 RSA_FILES=rsa_respond/README rsa_respond/respond.c rsa_respond/Makefile
52
53 MAKE = make ${MFLAGS}
54
55 all: build
56
57
58 autoconf: configure.ac
59 autoconf
60 autoheader
61 ${RM} -f config.cache
62
63 build:
64 -@if [ ! -f include/setup.h ] ; then \
65 echo "Hmm...doesn't look like you've run configure..."; \
66 echo "Doing so now."; \
67 sh configure; \
68 fi
69 @if [ -d .git ] ; then \
70 revh=`git show --pretty=format:"%H-%ci" |sed -r 's/^(.{12})[^-]+-([0-9]+)-([0-9]+)-([0-9]+) .*/\2\3\4-\1/; q'`; \
71 [ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \
72 fi
73 @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h
74 @for i in $(SUBDIRS); do \
75 echo "build ==> $$i";\
76 cd $$i;\
77 ${MAKE} || exit; cd ..;\
78 done
79
80 clean:
81 ${RM} -f *~ core rsa_respond.tar rsa_respond.tar.gz
82 @for i in $(CLEANDIRS); do \
83 echo "clean ==> $$i";\
84 cd $$i;\
85 ${MAKE} clean; cd ..;\
86 done
87 -@if [ -f include/setup.h ] ; then \
88 echo "To really restart installation, make distclean" ; \
89 fi
90
91 distclean:
92 ${RM} -f Makefile *~ *.rej *.orig core ircd.core
93 ${RM} -f config.status config.cache config.log
94 cd include; ${RM} -f setup.h *~ *.rej *.orig ; cd ..
95 @for i in $(CLEANDIRS); do \
96 echo "distclean ==> $$i";\
97 cd $$i;\
98 ${MAKE} distclean; cd ..;\
99 done
100
101 depend:
102 @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h
103 @for i in $(SUBDIRS); do \
104 echo "depend ==> $$i";\
105 cd $$i;\
106 ${MAKE} depend; cd ..;\
107 done
108
109 lint:
110 @for i in $(SUBDIRS); do \
111 echo "lint ==> $$i";\
112 cd $$i;\
113 ${MAKE} lint; cd ..;\
114 done
115
116 install-mkdirs:
117 @echo "ircd: setting up ircd directory structure"
118 -@if test ! -d $(DESTDIR)$(prefix); then \
119 mkdir $(DESTDIR)$(prefix); \
120 fi
121 -@if test ! -d $(DESTDIR)$(bindir); then \
122 mkdir $(DESTDIR)$(bindir); \
123 fi
124 -@if test ! -d $(DESTDIR)$(confdir); then \
125 mkdir $(DESTDIR)$(confdir); \
126 fi
127 -@if test ! -d $(DESTDIR)$(mandir); then \
128 mkdir $(DESTDIR)$(mandir); \
129 fi
130 -@if test ! -d $(DESTDIR)$(moduledir); then \
131 mkdir $(DESTDIR)$(moduledir); \
132 fi
133 -@if test ! -d $(DESTDIR)$(helpdir); then \
134 mkdir $(DESTDIR)$(helpdir); \
135 fi
136 -@if test ! -d $(DESTDIR)$(logdir); then \
137 mkdir $(DESTDIR)$(logdir); \
138 fi
139
140 install: install-mkdirs all
141 @for i in $(SUBDIRS); do \
142 echo "install ==> $$i";\
143 cd $$i;\
144 ${MAKE} install; \
145 cd ..; \
146 done
147
148 rsa_respond:
149 @cd tools;\
150 echo "Creating rsa_respond.tar.gz";\
151 tar cf ../rsa_respond.tar $(RSA_FILES);\
152 cd ..;\
153 gzip rsa_respond.tar