]>
Commit | Line | Data |
---|---|---|
212380e3 AC |
1 | # |
2 | # Makefile.in for ircd/src | |
3 | # | |
6c8cbf34 | 4 | # $Id: Makefile.in 3360 2007-04-03 09:37:03Z nenolod $ |
212380e3 AC |
5 | # |
6 | CC = @CC@ | |
7 | INSTALL = @INSTALL@ | |
8 | INSTALL_BIN = @INSTALL_PROGRAM@ | |
9 | INSTALL_DATA = @INSTALL_DATA@ | |
10 | INSTALL_SUID = @INSTALL_PROGRAM@ -o root -m 4755 | |
11 | RM = @RM@ | |
12 | LEX = @LEX@ | |
13 | LEXLIB = @LEXLIB@ | |
14 | PICFLAGS = @PICFLAGS@ | |
c74836dc | 15 | CFLAGS = @IRC_CFLAGS@ |
212380e3 AC |
16 | LDFLAGS = @LDFLAGS@ |
17 | MKDEP = @MKDEP@ -DIRCD_PREFIX=\"@prefix@\" | |
18 | MV = @MV@ | |
19 | RM = @RM@ | |
20 | YACC = @YACC@ | |
21 | prefix = @prefix@ | |
22 | exec_prefix = @exec_prefix@ | |
23 | bindir = @bindir@ | |
24 | libdir = @libdir@ | |
25 | libexecdir = @libexecdir@ | |
c74836dc NPB |
26 | pkglibexecdir = @pkglibexecdir@ |
27 | ||
28 | PROGRAM_PREFIX = @PROGRAM_PREFIX@ | |
212380e3 | 29 | |
212380e3 AC |
30 | DOLLAR = $$ |
31 | ||
32 | IRCD_EXE = ircd | |
33 | ||
34 | PROGS = $(IRCD_EXE) | |
35 | ||
36 | SSL_LIBS = @SSL_LIBS@ | |
37 | SSL_INCLUDES = @SSL_INCLUDES@ | |
38 | ||
794816af | 39 | IRCDLIBS = @MODULES_LIBS@ -L../libratbox/src/.libs -lratbox @LIBS@ $(SSL_LIBS) |
212380e3 | 40 | |
f24a7dfb | 41 | INCLUDES = -I../include -I../libratbox/include $(SSL_INCLUDES) |
c74836dc | 42 | CPPFLAGS = ${INCLUDES} -DIRCD_PREFIX=\"@prefix@\" @CPPFLAGS@ |
212380e3 AC |
43 | |
44 | default: all | |
45 | ||
46 | y.tab.o: y.tab.c ircd_parser.y | |
47 | ${CC} ${CPPFLAGS} ${PICFLAGS} ${CFLAGS} -I. -c y.tab.c | |
48 | ||
49 | # Note GNU bison uses <file>.tab.c not y.tab.c | |
50 | y.tab.c: ircd_parser.y | |
51 | ${YACC} -d ircd_parser.y | |
414c5f7d | 52 | y.tab.h: y.tab.c |
212380e3 | 53 | |
414c5f7d | 54 | lex.yy.o: lex.yy.c ircd_lexer.l y.tab.h |
212380e3 AC |
55 | ${CC} ${CPPFLAGS} ${PICFLAGS} ${CFLAGS} -I. -c lex.yy.c |
56 | ||
57 | lex.yy.c: ircd_lexer.l | |
58 | ${LEX} ircd_lexer.l | |
59 | ||
6c8cbf34 | 60 | SRCS = \ |
83595e60 | 61 | bandbi.c \ |
212380e3 AC |
62 | blacklist.c \ |
63 | cache.c \ | |
64b56afd | 64 | capability.c \ |
212380e3 AC |
65 | channel.c \ |
66 | chmode.c \ | |
67 | class.c \ | |
68 | client.c \ | |
69 | extban.c \ | |
70 | getopt.c \ | |
71 | hash.c \ | |
72 | hook.c \ | |
73 | hostmask.c \ | |
524a5b3a | 74 | ipv4_from_ipv6.c \ |
d6bda36d | 75 | irc_dictionary.c \ |
212380e3 AC |
76 | ircd.c \ |
77 | ircd_signal.c \ | |
212380e3 | 78 | listener.c \ |
4016731b | 79 | logger.c \ |
212380e3 AC |
80 | match.c \ |
81 | modules.c \ | |
82 | monitor.c \ | |
83 | newconf.c \ | |
84 | numeric.c \ | |
27f616dd | 85 | operhash.c \ |
212380e3 AC |
86 | packet.c \ |
87 | parse.c \ | |
9c3f080b | 88 | privilege.c \ |
e88a1f1b | 89 | ratelimit.c \ |
212380e3 AC |
90 | res.c \ |
91 | reslib.c \ | |
92 | reject.c \ | |
93 | restart.c \ | |
94 | s_auth.c \ | |
95 | s_conf.c \ | |
96 | s_newconf.c \ | |
212380e3 | 97 | s_serv.c \ |
212380e3 AC |
98 | s_user.c \ |
99 | scache.c \ | |
100 | send.c \ | |
101 | snomask.c \ | |
c6d72037 | 102 | sslproc.c \ |
92fb5c31 | 103 | substitution.c \ |
212380e3 | 104 | supported.c \ |
4f2685f3 | 105 | tgchange.c \ |
6c8cbf34 | 106 | whowas.c |
212380e3 AC |
107 | |
108 | OBJS = ${SRCS:.c=.o} | |
109 | ||
110 | all: ircd | |
111 | ||
112 | build: all | |
113 | ||
114 | ircd: $(OBJS) y.tab.o lex.yy.o version.o | |
115 | ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} lex.yy.o y.tab.o version.o ${IRCDLIBS} ${LEXLIB} | |
116 | mv version.c version.c.last | |
117 | ||
118 | install-mkdirs: | |
119 | -@if test ! -d $(DESTDIR)$(prefix); then \ | |
120 | echo "ircd: setting up ircd directory structure"; \ | |
121 | mkdir $(DESTDIR)$(prefix); \ | |
122 | fi | |
123 | -@if test ! -d $(DESTDIR)$(exec_prefix); then \ | |
124 | mkdir $(DESTDIR)$(exec_prefix); \ | |
125 | fi | |
126 | -@if test ! -d $(DESTDIR)$(bindir); then \ | |
127 | mkdir $(DESTDIR)$(bindir); \ | |
128 | fi | |
129 | -@if test ! -d $(DESTDIR)$(libdir); then \ | |
130 | mkdir $(DESTDIR)$(libdir); \ | |
131 | fi | |
132 | ||
133 | install: install-mkdirs build | |
134 | -@if test -f $(DESTDIR)$(bindir)/ircd; then \ | |
135 | echo "ircd: backing up ircd"; \ | |
136 | fi | |
137 | @echo "ircd: installing ircd ($(PROGS))" | |
138 | @for i in $(PROGS); do \ | |
c74836dc NPB |
139 | if test -f $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i; then \ |
140 | $(MV) $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i.old; \ | |
212380e3 | 141 | fi; \ |
c74836dc | 142 | $(INSTALL_BIN) $$i $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i; \ |
212380e3 AC |
143 | done |
144 | ||
145 | version.c: version.c.SH | |
146 | /bin/sh ./version.c.SH | |
147 | ||
148 | ||
149 | # this is really the default rule for c files | |
150 | .c.o: | |
151 | ${CC} ${CPPFLAGS} ${CFLAGS} -c $< | |
152 | .s.o: | |
153 | ${CC} ${CPPFLAGS} ${CFLAGS} -c $< | |
154 | ||
155 | .PHONY: depend clean distclean | |
156 | depend: | |
baacec41 | 157 | ${MKDEP} ${CPPFLAGS} ${SRCS} > .depend |
212380e3 AC |
158 | |
159 | clean: | |
160 | ${RM} -f *.o *.exe *~ y.tab.* lex.yy.c ircd.core core ircd | |
161 | ||
162 | lint: | |
163 | lint -aacgprxhH $(CPPFLAGS) -DIRCD_PREFIX=\"@prefix@\" $(SRCS) >>../lint.out | |
164 | ||
165 | distclean: clean | |
166 | ${RM} -f Makefile version.c.last | |
167 | ||
168 | include .depend |