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