1 |
# |
2 |
# Makefile.in for ircd/src |
3 |
# |
4 |
# $Id$ |
5 |
# |
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 |
NETIO_SRC = s_bsd_@SELECT_TYPE@.c |
30 |
INET_MISC = @INET_MISC@ |
31 |
|
32 |
# If you wish to change this, look in include/defaults.h also and change SPATH |
33 |
PROGS = ircd |
34 |
|
35 |
SSL_LIBS = @SSL_LIBS@ |
36 |
SSL_INCLUDES = @SSL_INCLUDES@ |
37 |
IRCDLIBS = @MODULES_LIBS@ @LIBS@ ../lib/pcre/libpcre.a $(SSL_LIBS) |
38 |
INCLUDES = -I../include -I../lib/pcre $(SSL_INCLUDES) |
39 |
CPPFLAGS = ${INCLUDES} @CPPFLAGS@ |
40 |
|
41 |
default: all |
42 |
|
43 |
y.tab.o: y.tab.c ircd_parser.y |
44 |
${CC} ${CPPFLAGS} ${CFLAGS} -I. -c y.tab.c |
45 |
|
46 |
lex.yy.o: y.tab.c lex.yy.c ircd_lexer.l |
47 |
${CC} ${CPPFLAGS} ${CFLAGS} -I. -c lex.yy.c |
48 |
|
49 |
SSL_SRCS = rsa.c |
50 |
|
51 |
BASE_SRCS = \ |
52 |
@BALLOC_C@ \ |
53 |
channel.c \ |
54 |
channel_mode.c \ |
55 |
client.c \ |
56 |
@CRYPT_C@ \ |
57 |
csvlib.c \ |
58 |
dbuf.c \ |
59 |
@DYNLINK_C@ \ |
60 |
event.c \ |
61 |
fdlist.c \ |
62 |
fileio.c \ |
63 |
getopt.c \ |
64 |
hash.c \ |
65 |
hook.c \ |
66 |
hostmask.c \ |
67 |
@INET_MISC@ \ |
68 |
irc_getaddrinfo.c \ |
69 |
irc_getnameinfo.c \ |
70 |
irc_res.c \ |
71 |
irc_reslib.c \ |
72 |
irc_string.c \ |
73 |
ircd.c \ |
74 |
ircd_signal.c \ |
75 |
lex.yy.c \ |
76 |
list.c \ |
77 |
listener.c \ |
78 |
m_error.c \ |
79 |
match.c \ |
80 |
memory.c \ |
81 |
modules.c \ |
82 |
motd.c \ |
83 |
numeric.c \ |
84 |
packet.c \ |
85 |
parse.c \ |
86 |
restart.c \ |
87 |
resv.c \ |
88 |
@SSL_SRCS_ENABLE@ \ |
89 |
s_auth.c \ |
90 |
s_bsd.c \ |
91 |
s_conf.c \ |
92 |
s_gline.c \ |
93 |
s_log.c \ |
94 |
s_misc.c \ |
95 |
s_serv.c \ |
96 |
s_stats.c \ |
97 |
s_user.c \ |
98 |
send.c \ |
99 |
@SNPRINTF_C@ \ |
100 |
sprintf_irc.c \ |
101 |
tools.c \ |
102 |
version.c \ |
103 |
whowas.c \ |
104 |
y.tab.c |
105 |
|
106 |
SRCS = ${BASE_SRCS} $(NETIO_SRC) |
107 |
OBJS = ${SRCS:.c=.o} |
108 |
|
109 |
all: .depend ircd |
110 |
|
111 |
build: all |
112 |
|
113 |
ircd: @MODULES_LIBS@ ../lib/libpcre.a $(OBJS) |
114 |
${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} ${IRCDLIBS} |
115 |
|
116 |
../modules/libmodules.a: |
117 |
cd ../modules && ${MAKE} ${MFLAGS} |
118 |
../lib/libpcre.a: |
119 |
cd ../lib/pcre && ${MAKE} ${MFLAGS} |
120 |
|
121 |
install-mkdirs: |
122 |
mkdir -p $(DESTDIR)$(prefix) $(exec_prefix) $(bindir) $(sysconfdir) \ |
123 |
$(localstatedir)/logs |
124 |
|
125 |
install: install-mkdirs build |
126 |
@for i in $(PROGS); do \ |
127 |
if test -f $(bindir)/$$i -a -z "$(CLOBBER)"; then \ |
128 |
echo $(MV) $(bindir)/$$i $(bindir)/$$i.old; \ |
129 |
$(MV) $(bindir)/$$i $(bindir)/$$i.old; \ |
130 |
fi; \ |
131 |
echo $(INSTALL_BIN) $$i $(bindir); \ |
132 |
$(INSTALL_BIN) $$i $(bindir); \ |
133 |
done |
134 |
|
135 |
# this is really the default rule for c files |
136 |
.c.o: |
137 |
${CC} ${CPPFLAGS} ${CFLAGS} -c $< |
138 |
|
139 |
.depend: |
140 |
${MKDEP} ${CPPFLAGS} ${BASE_SRCS} ${NETIO_SRC} ${STDOUT} |
141 |
@${SED} -e '/^# Autogenerated - do not delete/,$$d' <Makefile >Makefile.depend |
142 |
@echo "# Autogenerated - do not delete" >> Makefile.depend |
143 |
@echo "include .depend" >> Makefile.depend |
144 |
@${MV} Makefile.depend Makefile |
145 |
|
146 |
clean: |
147 |
${RM} -f *.o *.exe *~ *core ircd |
148 |
|
149 |
distclean: clean |
150 |
${RM} -f Makefile .depend |
151 |
|
152 |
.PHONY: clean distclean install install-mkdirs build |