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