2007-01-25 07:40:21 +01:00
|
|
|
#
|
|
|
|
# Makefile.in for ircd/src
|
|
|
|
#
|
2007-04-03 11:37:03 +02:00
|
|
|
# $Id: Makefile.in 3360 2007-04-03 09:37:03Z nenolod $
|
2007-01-25 07:40:21 +01:00
|
|
|
#
|
|
|
|
CC = @CC@
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_BIN = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
INSTALL_SUID = @INSTALL_PROGRAM@ -o root -m 4755
|
|
|
|
RM = @RM@
|
|
|
|
LEX = @LEX@
|
|
|
|
LEXLIB = @LEXLIB@
|
|
|
|
PICFLAGS = @PICFLAGS@
|
2012-03-01 03:41:09 +01:00
|
|
|
CFLAGS = @IRC_CFLAGS@
|
2007-01-25 07:40:21 +01:00
|
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
MKDEP = @MKDEP@ -DIRCD_PREFIX=\"@prefix@\"
|
|
|
|
MV = @MV@
|
|
|
|
RM = @RM@
|
|
|
|
YACC = @YACC@
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
|
|
libdir = @libdir@
|
|
|
|
libexecdir = @libexecdir@
|
2012-03-01 03:41:09 +01:00
|
|
|
pkglibexecdir = @pkglibexecdir@
|
|
|
|
|
|
|
|
PROGRAM_PREFIX = @PROGRAM_PREFIX@
|
2007-01-25 07:40:21 +01:00
|
|
|
|
|
|
|
DOLLAR = $$
|
|
|
|
|
|
|
|
IRCD_EXE = ircd
|
|
|
|
|
|
|
|
PROGS = $(IRCD_EXE)
|
|
|
|
|
|
|
|
SSL_LIBS = @SSL_LIBS@
|
|
|
|
SSL_INCLUDES = @SSL_INCLUDES@
|
|
|
|
|
2008-05-17 17:46:37 +02:00
|
|
|
IRCDLIBS = @MODULES_LIBS@ -L../libratbox/src/.libs -lratbox @LIBS@ $(SSL_LIBS)
|
2007-01-25 07:40:21 +01:00
|
|
|
|
2008-04-02 00:18:44 +02:00
|
|
|
INCLUDES = -I../include -I../libratbox/include $(SSL_INCLUDES)
|
2012-03-01 03:41:09 +01:00
|
|
|
CPPFLAGS = ${INCLUDES} -DIRCD_PREFIX=\"@prefix@\" @CPPFLAGS@
|
2007-01-25 07:40:21 +01:00
|
|
|
|
|
|
|
default: all
|
|
|
|
|
|
|
|
y.tab.o: y.tab.c ircd_parser.y
|
|
|
|
${CC} ${CPPFLAGS} ${PICFLAGS} ${CFLAGS} -I. -c y.tab.c
|
|
|
|
|
|
|
|
# Note GNU bison uses <file>.tab.c not y.tab.c
|
|
|
|
y.tab.c: ircd_parser.y
|
|
|
|
${YACC} -d ircd_parser.y
|
2011-07-14 14:23:33 +02:00
|
|
|
y.tab.h: y.tab.c
|
2007-01-25 07:40:21 +01:00
|
|
|
|
2011-07-14 14:23:33 +02:00
|
|
|
lex.yy.o: lex.yy.c ircd_lexer.l y.tab.h
|
2007-01-25 07:40:21 +01:00
|
|
|
${CC} ${CPPFLAGS} ${PICFLAGS} ${CFLAGS} -I. -c lex.yy.c
|
|
|
|
|
|
|
|
lex.yy.c: ircd_lexer.l
|
|
|
|
${LEX} ircd_lexer.l
|
|
|
|
|
2007-04-03 11:37:03 +02:00
|
|
|
SRCS = \
|
2010-01-08 00:10:16 +01:00
|
|
|
bandbi.c \
|
2007-01-25 07:40:21 +01:00
|
|
|
blacklist.c \
|
|
|
|
cache.c \
|
2012-02-04 06:58:53 +01:00
|
|
|
capability.c \
|
2007-01-25 07:40:21 +01:00
|
|
|
channel.c \
|
|
|
|
chmode.c \
|
|
|
|
class.c \
|
|
|
|
client.c \
|
|
|
|
extban.c \
|
|
|
|
getopt.c \
|
|
|
|
hash.c \
|
|
|
|
hook.c \
|
|
|
|
hostmask.c \
|
2012-01-08 15:27:26 +01:00
|
|
|
ipv4_from_ipv6.c \
|
2007-12-02 16:06:25 +01:00
|
|
|
irc_dictionary.c \
|
2007-01-25 07:40:21 +01:00
|
|
|
ircd.c \
|
|
|
|
ircd_signal.c \
|
|
|
|
listener.c \
|
2008-04-03 04:52:01 +02:00
|
|
|
logger.c \
|
2007-01-25 07:40:21 +01:00
|
|
|
match.c \
|
|
|
|
modules.c \
|
|
|
|
monitor.c \
|
|
|
|
newconf.c \
|
2010-03-01 01:23:22 +01:00
|
|
|
operhash.c \
|
2007-01-25 07:40:21 +01:00
|
|
|
packet.c \
|
|
|
|
parse.c \
|
2008-08-17 13:27:59 +02:00
|
|
|
privilege.c \
|
2012-02-18 04:54:44 +01:00
|
|
|
ratelimit.c \
|
2007-01-25 07:40:21 +01:00
|
|
|
res.c \
|
|
|
|
reslib.c \
|
|
|
|
reject.c \
|
|
|
|
restart.c \
|
|
|
|
s_auth.c \
|
|
|
|
s_conf.c \
|
|
|
|
s_newconf.c \
|
|
|
|
s_serv.c \
|
|
|
|
s_user.c \
|
|
|
|
scache.c \
|
|
|
|
send.c \
|
|
|
|
snomask.c \
|
2008-04-06 16:52:42 +02:00
|
|
|
sslproc.c \
|
2007-01-25 08:08:21 +01:00
|
|
|
substitution.c \
|
2007-01-25 07:40:21 +01:00
|
|
|
supported.c \
|
2010-02-15 21:58:34 +01:00
|
|
|
tgchange.c \
|
2007-04-03 11:37:03 +02:00
|
|
|
whowas.c
|
2007-01-25 07:40:21 +01:00
|
|
|
|
|
|
|
OBJS = ${SRCS:.c=.o}
|
|
|
|
|
|
|
|
all: ircd
|
|
|
|
|
|
|
|
build: all
|
|
|
|
|
|
|
|
ircd: $(OBJS) y.tab.o lex.yy.o version.o
|
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} lex.yy.o y.tab.o version.o ${IRCDLIBS} ${LEXLIB}
|
|
|
|
mv version.c version.c.last
|
|
|
|
|
|
|
|
install-mkdirs:
|
|
|
|
-@if test ! -d $(DESTDIR)$(prefix); then \
|
|
|
|
echo "ircd: setting up ircd directory structure"; \
|
|
|
|
mkdir $(DESTDIR)$(prefix); \
|
|
|
|
fi
|
|
|
|
-@if test ! -d $(DESTDIR)$(exec_prefix); then \
|
|
|
|
mkdir $(DESTDIR)$(exec_prefix); \
|
|
|
|
fi
|
|
|
|
-@if test ! -d $(DESTDIR)$(bindir); then \
|
|
|
|
mkdir $(DESTDIR)$(bindir); \
|
|
|
|
fi
|
|
|
|
-@if test ! -d $(DESTDIR)$(libdir); then \
|
|
|
|
mkdir $(DESTDIR)$(libdir); \
|
|
|
|
fi
|
|
|
|
|
|
|
|
install: install-mkdirs build
|
|
|
|
-@if test -f $(DESTDIR)$(bindir)/ircd; then \
|
|
|
|
echo "ircd: backing up ircd"; \
|
|
|
|
fi
|
|
|
|
@echo "ircd: installing ircd ($(PROGS))"
|
|
|
|
@for i in $(PROGS); do \
|
2012-03-01 03:41:09 +01:00
|
|
|
if test -f $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i; then \
|
|
|
|
$(MV) $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i.old; \
|
2007-01-25 07:40:21 +01:00
|
|
|
fi; \
|
2012-03-01 03:41:09 +01:00
|
|
|
$(INSTALL_BIN) $$i $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i; \
|
2007-01-25 07:40:21 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
version.c: version.c.SH
|
|
|
|
/bin/sh ./version.c.SH
|
|
|
|
|
|
|
|
|
|
|
|
# this is really the default rule for c files
|
|
|
|
.c.o:
|
|
|
|
${CC} ${CPPFLAGS} ${CFLAGS} -c $<
|
|
|
|
.s.o:
|
|
|
|
${CC} ${CPPFLAGS} ${CFLAGS} -c $<
|
|
|
|
|
|
|
|
.PHONY: depend clean distclean
|
|
|
|
depend:
|
2008-07-12 01:52:14 +02:00
|
|
|
${MKDEP} ${CPPFLAGS} ${SRCS} > .depend
|
2007-01-25 07:40:21 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
${RM} -f *.o *.exe *~ y.tab.* lex.yy.c ircd.core core ircd
|
|
|
|
|
|
|
|
lint:
|
|
|
|
lint -aacgprxhH $(CPPFLAGS) -DIRCD_PREFIX=\"@prefix@\" $(SRCS) >>../lint.out
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
${RM} -f Makefile version.c.last
|
|
|
|
|
|
|
|
include .depend
|