]>
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 \ | |
60 | channel.c \ | |
61 | chmode.c \ | |
62 | class.c \ | |
63 | client.c \ | |
64 | extban.c \ | |
65 | getopt.c \ | |
66 | hash.c \ | |
67 | hook.c \ | |
68 | hostmask.c \ | |
d6bda36d | 69 | irc_dictionary.c \ |
212380e3 AC |
70 | ircd.c \ |
71 | ircd_signal.c \ | |
212380e3 | 72 | listener.c \ |
4016731b | 73 | logger.c \ |
212380e3 AC |
74 | match.c \ |
75 | modules.c \ | |
76 | monitor.c \ | |
77 | newconf.c \ | |
78 | numeric.c \ | |
79 | packet.c \ | |
80 | parse.c \ | |
9c3f080b | 81 | privilege.c \ |
212380e3 AC |
82 | res.c \ |
83 | reslib.c \ | |
84 | reject.c \ | |
85 | restart.c \ | |
86 | s_auth.c \ | |
87 | s_conf.c \ | |
88 | s_newconf.c \ | |
212380e3 | 89 | s_serv.c \ |
212380e3 AC |
90 | s_user.c \ |
91 | scache.c \ | |
92 | send.c \ | |
93 | snomask.c \ | |
c6d72037 | 94 | sslproc.c \ |
92fb5c31 | 95 | substitution.c \ |
212380e3 | 96 | supported.c \ |
4f2685f3 | 97 | tgchange.c \ |
6c8cbf34 | 98 | whowas.c |
212380e3 AC |
99 | |
100 | OBJS = ${SRCS:.c=.o} | |
101 | ||
102 | all: ircd | |
103 | ||
104 | build: all | |
105 | ||
106 | ircd: $(OBJS) y.tab.o lex.yy.o version.o | |
107 | ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} lex.yy.o y.tab.o version.o ${IRCDLIBS} ${LEXLIB} | |
108 | mv version.c version.c.last | |
109 | ||
110 | install-mkdirs: | |
111 | -@if test ! -d $(DESTDIR)$(prefix); then \ | |
112 | echo "ircd: setting up ircd directory structure"; \ | |
113 | mkdir $(DESTDIR)$(prefix); \ | |
114 | fi | |
115 | -@if test ! -d $(DESTDIR)$(exec_prefix); then \ | |
116 | mkdir $(DESTDIR)$(exec_prefix); \ | |
117 | fi | |
118 | -@if test ! -d $(DESTDIR)$(bindir); then \ | |
119 | mkdir $(DESTDIR)$(bindir); \ | |
120 | fi | |
121 | -@if test ! -d $(DESTDIR)$(libdir); then \ | |
122 | mkdir $(DESTDIR)$(libdir); \ | |
123 | fi | |
124 | ||
125 | install: install-mkdirs build | |
126 | -@if test -f $(DESTDIR)$(bindir)/ircd; then \ | |
127 | echo "ircd: backing up ircd"; \ | |
128 | fi | |
129 | @echo "ircd: installing ircd ($(PROGS))" | |
130 | @for i in $(PROGS); do \ | |
131 | if test -f $(DESTDIR)$(bindir)/$$i; then \ | |
132 | $(MV) $(DESTDIR)$(bindir)/$$i $(DESTDIR)$(bindir)/$$i.old; \ | |
133 | fi; \ | |
134 | $(INSTALL_BIN) $$i $(DESTDIR)$(bindir); \ | |
135 | done | |
136 | ||
137 | version.c: version.c.SH | |
138 | /bin/sh ./version.c.SH | |
139 | ||
140 | ||
141 | # this is really the default rule for c files | |
142 | .c.o: | |
143 | ${CC} ${CPPFLAGS} ${CFLAGS} -c $< | |
144 | .s.o: | |
145 | ${CC} ${CPPFLAGS} ${CFLAGS} -c $< | |
146 | ||
147 | .PHONY: depend clean distclean | |
148 | depend: | |
baacec41 | 149 | ${MKDEP} ${CPPFLAGS} ${SRCS} > .depend |
212380e3 AC |
150 | |
151 | clean: | |
152 | ${RM} -f *.o *.exe *~ y.tab.* lex.yy.c ircd.core core ircd | |
153 | ||
154 | lint: | |
155 | lint -aacgprxhH $(CPPFLAGS) -DIRCD_PREFIX=\"@prefix@\" $(SRCS) >>../lint.out | |
156 | ||
157 | distclean: clean | |
158 | ${RM} -f Makefile version.c.last | |
159 | ||
160 | include .depend |