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@
|
|
|
|
CFLAGS = @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\"
|
|
|
|
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@
|
|
|
|
|
|
|
|
DOLLAR = $$
|
|
|
|
|
|
|
|
IRCD_EXE = ircd
|
|
|
|
|
|
|
|
PROGS = $(IRCD_EXE)
|
|
|
|
|
|
|
|
SSL_LIBS = @SSL_LIBS@
|
|
|
|
SSL_INCLUDES = @SSL_INCLUDES@
|
|
|
|
|
2008-04-03 03:26:48 +02:00
|
|
|
IRCDLIBS = @MODULES_LIBS@ -Wl,-rpath=@libdir@ -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)
|
2007-01-25 07:40:21 +01:00
|
|
|
CPPFLAGS = ${INCLUDES} @CPPFLAGS@
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
lex.yy.o: lex.yy.c ircd_lexer.l
|
|
|
|
${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 = \
|
2007-01-25 07:40:21 +01:00
|
|
|
blacklist.c \
|
|
|
|
cache.c \
|
|
|
|
channel.c \
|
|
|
|
chmode.c \
|
|
|
|
class.c \
|
|
|
|
client.c \
|
|
|
|
extban.c \
|
|
|
|
getopt.c \
|
|
|
|
hash.c \
|
|
|
|
hook.c \
|
|
|
|
hostmask.c \
|
|
|
|
irc_string.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 \
|
|
|
|
ircd_state.c \
|
|
|
|
kdparse.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 \
|
|
|
|
numeric.c \
|
|
|
|
packet.c \
|
|
|
|
parse.c \
|
|
|
|
res.c \
|
|
|
|
reslib.c \
|
|
|
|
reject.c \
|
|
|
|
restart.c \
|
|
|
|
s_auth.c \
|
|
|
|
s_conf.c \
|
|
|
|
s_newconf.c \
|
|
|
|
s_gline.c \
|
|
|
|
s_serv.c \
|
|
|
|
s_user.c \
|
|
|
|
scache.c \
|
|
|
|
send.c \
|
|
|
|
snomask.c \
|
2007-01-25 08:08:21 +01:00
|
|
|
substitution.c \
|
2007-01-25 07:40:21 +01:00
|
|
|
supported.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 \
|
|
|
|
if test -f $(DESTDIR)$(bindir)/$$i; then \
|
|
|
|
$(MV) $(DESTDIR)$(bindir)/$$i $(DESTDIR)$(bindir)/$$i.old; \
|
|
|
|
fi; \
|
|
|
|
$(INSTALL_BIN) $$i $(DESTDIR)$(bindir); \
|
|
|
|
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:
|
|
|
|
${MKDEP} ${CPPFLAGS} ${BASE_SRCS} > .depend
|
|
|
|
|
|
|
|
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
|