1 #************************************************************************
2 #* IRC - Internet Relay Chat, Makefile
3 #* Copyright (C) 1990, Jarkko Oikarinen
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)
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.
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.
19 #* $Id: Makefile.in 1347 2006-05-17 14:49:13Z nenolod $
24 exec_prefix = @exec_prefix@
27 moduledir = @moduledir@
33 # CFLAGS = -g -O2 -DNDEBUG
36 #CFLAGS= -g -O2 -Wunused -Wall -ggdb -pedantic -Wshadow -Wmissing-declarations
38 # Default make flags - you may want to uncomment this on a multicpu machine
45 # You may need to define the FD_SETSIZE in order to overrule
47 #CFLAGS= -DNDEBUG -g -O2 -D"FD_SETSIZE=1024"
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
56 autoconf: configure.ac
62 -@if [ ! -f include/setup.h ] ; then \
63 echo "Hmm...doesn't look like you've run configure..."; \
64 echo "Doing so now."; \
67 @if [ -d .git ] ; then \
68 revh=`git log -1 --date=short --pretty=format:%cd_%h 2>/dev/null | sed -e s/-//g -e s/_/-/`;\
69 [ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \
70 elif [ -d .hg ] ; then \
71 revh=`hg parents --template '{date|shortdate}_{node|short}' 2>/dev/null | sed -e s/-//g -e s/_/-/`;\
72 [ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \
74 @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h
75 @for i in $(SUBDIRS); do \
76 echo "build ==> $$i";\
78 ${MAKE} || exit; cd ..;\
82 ${RM} -f *~ core rsa_respond.tar rsa_respond.tar.gz
83 @for i in $(CLEANDIRS); do \
84 echo "clean ==> $$i";\
86 ${MAKE} clean; cd ..;\
88 -@if [ -f include/setup.h ] ; then \
89 echo "To really restart installation, make distclean" ; \
93 ${RM} -f Makefile *~ *.rej *.orig core ircd.core
94 ${RM} -f config.status config.cache config.log
95 cd include; ${RM} -f setup.h *~ *.rej *.orig ; cd ..
96 @for i in $(CLEANDIRS); do \
97 echo "distclean ==> $$i";\
99 ${MAKE} distclean; cd ..;\
103 @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h
104 @for i in $(SUBDIRS); do \
105 echo "depend ==> $$i";\
107 ${MAKE} depend; cd ..;\
111 @for i in $(SUBDIRS); do \
112 echo "lint ==> $$i";\
114 ${MAKE} lint; cd ..;\
118 @echo "ircd: setting up ircd directory structure"
119 -@if test ! -d $(DESTDIR)$(prefix); then \
120 mkdir $(DESTDIR)$(prefix); \
122 -@if test ! -d $(DESTDIR)$(bindir); then \
123 mkdir $(DESTDIR)$(bindir); \
125 -@if test ! -d $(DESTDIR)$(confdir); then \
126 mkdir $(DESTDIR)$(confdir); \
128 -@if test ! -d $(DESTDIR)$(mandir); then \
129 mkdir $(DESTDIR)$(mandir); \
131 -@if test ! -d $(DESTDIR)$(moduledir); then \
132 mkdir $(DESTDIR)$(moduledir); \
134 -@if test ! -d $(DESTDIR)$(helpdir); then \
135 mkdir $(DESTDIR)$(helpdir); \
137 -@if test ! -d $(DESTDIR)$(logdir); then \
138 mkdir $(DESTDIR)$(logdir); \
141 install: install-mkdirs all
142 @for i in $(SUBDIRS); do \
143 echo "install ==> $$i";\
151 echo "Creating rsa_respond.tar.gz";\
152 tar cf ../rsa_respond.tar $(RSA_FILES);\