| 1 |
adx |
30 |
# |
| 2 |
|
|
# Makefile.in for ircd/src |
| 3 |
|
|
# |
| 4 |
knight |
31 |
# $Id$ |
| 5 |
adx |
30 |
# |
| 6 |
|
|
@SET_MAKE@ |
| 7 |
|
|
|
| 8 |
|
|
CC = @CC@ |
| 9 |
|
|
INSTALL = @INSTALL@ |
| 10 |
|
|
INSTALL_BIN = @INSTALL_PROGRAM@ |
| 11 |
|
|
INSTALL_DATA = @INSTALL_DATA@ |
| 12 |
|
|
CFLAGS = @IRC_CFLAGS@ |
| 13 |
|
|
LDFLAGS = @LDFLAGS@ |
| 14 |
|
|
MKDEP = @MKDEP@ |
| 15 |
|
|
STDOUT = @STDOUT@ |
| 16 |
|
|
MV = @MV@ |
| 17 |
|
|
RM = @RM@ |
| 18 |
|
|
SED = @SED@ |
| 19 |
|
|
|
| 20 |
|
|
prefix = @prefix@ |
| 21 |
|
|
exec_prefix = $(DESTDIR)@exec_prefix@ |
| 22 |
|
|
bindir = $(DESTDIR)@bindir@ |
| 23 |
|
|
sysconfdir = $(DESTDIR)@sysconfdir@ |
| 24 |
|
|
localstatedir = $(DESTDIR)@localstatedir@ |
| 25 |
|
|
|
| 26 |
|
|
# must not have whitespace here |
| 27 |
|
|
CLOBBER=@CLOBBER@ |
| 28 |
|
|
|
| 29 |
|
|
# If you wish to change this, look in include/defaults.h also and change SPATH |
| 30 |
|
|
PROGS = ircd |
| 31 |
|
|
|
| 32 |
|
|
SSL_LIBS = @SSL_LIBS@ |
| 33 |
|
|
SSL_INCLUDES = @SSL_INCLUDES@ |
| 34 |
adx |
59 |
IRCDLIBS = @MODULES_LIBS@ @LIBS@ ../libio/libio.a $(SSL_LIBS) |
| 35 |
adx |
61 |
INCLUDES = -I../include $(SSL_INCLUDES) |
| 36 |
adx |
30 |
CPPFLAGS = ${INCLUDES} @CPPFLAGS@ |
| 37 |
|
|
|
| 38 |
|
|
default: all |
| 39 |
|
|
|
| 40 |
|
|
y.tab.o: y.tab.c ircd_parser.y |
| 41 |
|
|
${CC} ${CPPFLAGS} ${CFLAGS} -I. -c y.tab.c |
| 42 |
|
|
|
| 43 |
|
|
lex.yy.o: y.tab.c lex.yy.c ircd_lexer.l |
| 44 |
|
|
${CC} ${CPPFLAGS} ${CFLAGS} -I. -c lex.yy.c |
| 45 |
|
|
|
| 46 |
|
|
SSL_SRCS = rsa.c |
| 47 |
|
|
|
| 48 |
adx |
59 |
SRCS = \ |
| 49 |
adx |
30 |
channel.c \ |
| 50 |
|
|
channel_mode.c \ |
| 51 |
|
|
client.c \ |
| 52 |
|
|
csvlib.c \ |
| 53 |
|
|
@DYNLINK_C@ \ |
| 54 |
|
|
getopt.c \ |
| 55 |
|
|
hash.c \ |
| 56 |
|
|
hostmask.c \ |
| 57 |
|
|
ircd.c \ |
| 58 |
|
|
ircd_signal.c \ |
| 59 |
|
|
lex.yy.c \ |
| 60 |
|
|
listener.c \ |
| 61 |
|
|
m_error.c \ |
| 62 |
|
|
modules.c \ |
| 63 |
|
|
motd.c \ |
| 64 |
|
|
numeric.c \ |
| 65 |
|
|
packet.c \ |
| 66 |
|
|
parse.c \ |
| 67 |
|
|
restart.c \ |
| 68 |
|
|
resv.c \ |
| 69 |
|
|
@SSL_SRCS_ENABLE@ \ |
| 70 |
|
|
s_auth.c \ |
| 71 |
|
|
s_conf.c \ |
| 72 |
|
|
s_gline.c \ |
| 73 |
|
|
s_misc.c \ |
| 74 |
|
|
s_serv.c \ |
| 75 |
|
|
s_stats.c \ |
| 76 |
|
|
s_user.c \ |
| 77 |
|
|
send.c \ |
| 78 |
|
|
version.c \ |
| 79 |
|
|
whowas.c \ |
| 80 |
|
|
y.tab.c |
| 81 |
|
|
|
| 82 |
|
|
OBJS = ${SRCS:.c=.o} |
| 83 |
|
|
|
| 84 |
|
|
all: .depend ircd |
| 85 |
|
|
|
| 86 |
|
|
build: all |
| 87 |
|
|
|
| 88 |
adx |
59 |
ircd: @MODULES_LIBS@ ../libio/libio.a $(OBJS) |
| 89 |
adx |
30 |
${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} ${IRCDLIBS} |
| 90 |
|
|
|
| 91 |
|
|
../modules/libmodules.a: |
| 92 |
|
|
cd ../modules && ${MAKE} ${MFLAGS} |
| 93 |
adx |
59 |
../libio/libio.a: |
| 94 |
|
|
cd ../libio && ${MAKE} ${MFLAGS} |
| 95 |
adx |
30 |
|
| 96 |
|
|
install-mkdirs: |
| 97 |
|
|
mkdir -p $(DESTDIR)$(prefix) $(exec_prefix) $(bindir) $(sysconfdir) \ |
| 98 |
|
|
$(localstatedir)/logs |
| 99 |
|
|
|
| 100 |
|
|
install: install-mkdirs build |
| 101 |
|
|
@for i in $(PROGS); do \ |
| 102 |
|
|
if test -f $(bindir)/$$i -a -z "$(CLOBBER)"; then \ |
| 103 |
|
|
echo $(MV) $(bindir)/$$i $(bindir)/$$i.old; \ |
| 104 |
|
|
$(MV) $(bindir)/$$i $(bindir)/$$i.old; \ |
| 105 |
|
|
fi; \ |
| 106 |
|
|
echo $(INSTALL_BIN) $$i $(bindir); \ |
| 107 |
|
|
$(INSTALL_BIN) $$i $(bindir); \ |
| 108 |
|
|
done |
| 109 |
|
|
|
| 110 |
|
|
# this is really the default rule for c files |
| 111 |
|
|
.c.o: |
| 112 |
|
|
${CC} ${CPPFLAGS} ${CFLAGS} -c $< |
| 113 |
|
|
|
| 114 |
|
|
.depend: |
| 115 |
adx |
59 |
${MKDEP} ${CPPFLAGS} ${SRCS} ${STDOUT} |
| 116 |
adx |
30 |
@${SED} -e '/^# Autogenerated - do not delete/,$$d' <Makefile >Makefile.depend |
| 117 |
|
|
@echo "# Autogenerated - do not delete" >> Makefile.depend |
| 118 |
|
|
@echo "include .depend" >> Makefile.depend |
| 119 |
|
|
@${MV} Makefile.depend Makefile |
| 120 |
|
|
|
| 121 |
|
|
clean: |
| 122 |
|
|
${RM} -f *.o *.exe *~ *core ircd |
| 123 |
|
|
|
| 124 |
|
|
distclean: clean |
| 125 |
|
|
${RM} -f Makefile .depend |
| 126 |
|
|
|
| 127 |
|
|
.PHONY: clean distclean install install-mkdirs build |