]>
Commit | Line | Data |
---|---|---|
212380e3 AC |
1 | # |
2 | # Makefile.in for ircd/src | |
3 | # | |
4 | # $Id: Makefile.in 1887 2006-08-29 13:42:56Z jilles $ | |
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 | ||
27 | FNVHASH_S = @FNVHASH_S@ | |
28 | ||
29 | DOLLAR = $$ | |
30 | ||
31 | IRCD_EXE = ircd | |
32 | ||
33 | PROGS = $(IRCD_EXE) | |
34 | ||
35 | SSL_LIBS = @SSL_LIBS@ | |
36 | SSL_INCLUDES = @SSL_INCLUDES@ | |
37 | ||
38 | IRCDLIBS = @MODULES_LIBS@ -L../libcharybdis -lcharybdis @LIBS@ $(SSL_LIBS) | |
39 | ||
40 | INCLUDES = -I../include -I../libcharybdis $(SSL_INCLUDES) | |
41 | CPPFLAGS = ${INCLUDES} @CPPFLAGS@ | |
42 | ||
43 | default: all | |
44 | ||
45 | y.tab.o: y.tab.c ircd_parser.y | |
46 | ${CC} ${CPPFLAGS} ${PICFLAGS} ${CFLAGS} -I. -c y.tab.c | |
47 | ||
48 | # Note GNU bison uses <file>.tab.c not y.tab.c | |
49 | y.tab.c: ircd_parser.y | |
50 | ${YACC} -d ircd_parser.y | |
51 | ||
52 | lex.yy.o: lex.yy.c ircd_lexer.l | |
53 | ${CC} ${CPPFLAGS} ${PICFLAGS} ${CFLAGS} -I. -c lex.yy.c | |
54 | ||
55 | lex.yy.c: ircd_lexer.l | |
56 | ${LEX} ircd_lexer.l | |
57 | ||
58 | BASE_SRCS = \ | |
59 | blacklist.c \ | |
60 | cache.c \ | |
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 \ | |
70 | irc_string.c \ | |
71 | ircd.c \ | |
72 | ircd_signal.c \ | |
73 | ircd_state.c \ | |
74 | kdparse.c \ | |
75 | listener.c \ | |
76 | match.c \ | |
77 | modules.c \ | |
78 | monitor.c \ | |
79 | newconf.c \ | |
80 | numeric.c \ | |
81 | packet.c \ | |
82 | parse.c \ | |
83 | patricia.c \ | |
84 | res.c \ | |
85 | reslib.c \ | |
86 | reject.c \ | |
87 | restart.c \ | |
88 | s_auth.c \ | |
89 | s_conf.c \ | |
90 | s_newconf.c \ | |
91 | s_gline.c \ | |
92 | s_log.c \ | |
93 | s_serv.c \ | |
94 | s_stats.c \ | |
95 | s_user.c \ | |
96 | scache.c \ | |
97 | send.c \ | |
98 | snomask.c \ | |
99 | supported.c \ | |
100 | whowas.c \ | |
101 | $(FNVHASH_S) | |
102 | ||
103 | SRCS = ${BASE_SRCS:.s=.o} | |
104 | ||
105 | OBJS = ${SRCS:.c=.o} | |
106 | ||
107 | all: ircd | |
108 | ||
109 | build: all | |
110 | ||
111 | ircd: $(OBJS) y.tab.o lex.yy.o version.o | |
112 | ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} lex.yy.o y.tab.o version.o ${IRCDLIBS} ${LEXLIB} | |
113 | mv version.c version.c.last | |
114 | ||
115 | install-mkdirs: | |
116 | -@if test ! -d $(DESTDIR)$(prefix); then \ | |
117 | echo "ircd: setting up ircd directory structure"; \ | |
118 | mkdir $(DESTDIR)$(prefix); \ | |
119 | fi | |
120 | -@if test ! -d $(DESTDIR)$(exec_prefix); then \ | |
121 | mkdir $(DESTDIR)$(exec_prefix); \ | |
122 | fi | |
123 | -@if test ! -d $(DESTDIR)$(bindir); then \ | |
124 | mkdir $(DESTDIR)$(bindir); \ | |
125 | fi | |
126 | -@if test ! -d $(DESTDIR)$(libdir); then \ | |
127 | mkdir $(DESTDIR)$(libdir); \ | |
128 | fi | |
129 | ||
130 | install: install-mkdirs build | |
131 | -@if test -f $(DESTDIR)$(bindir)/ircd; then \ | |
132 | echo "ircd: backing up ircd"; \ | |
133 | fi | |
134 | @echo "ircd: installing ircd ($(PROGS))" | |
135 | @for i in $(PROGS); do \ | |
136 | if test -f $(DESTDIR)$(bindir)/$$i; then \ | |
137 | $(MV) $(DESTDIR)$(bindir)/$$i $(DESTDIR)$(bindir)/$$i.old; \ | |
138 | fi; \ | |
139 | $(INSTALL_BIN) $$i $(DESTDIR)$(bindir); \ | |
140 | done | |
141 | ||
142 | version.c: version.c.SH | |
143 | /bin/sh ./version.c.SH | |
144 | ||
145 | ||
146 | # this is really the default rule for c files | |
147 | .c.o: | |
148 | ${CC} ${CPPFLAGS} ${CFLAGS} -c $< | |
149 | .s.o: | |
150 | ${CC} ${CPPFLAGS} ${CFLAGS} -c $< | |
151 | ||
152 | .PHONY: depend clean distclean | |
153 | depend: | |
154 | ${MKDEP} ${CPPFLAGS} ${BASE_SRCS} > .depend | |
155 | ||
156 | clean: | |
157 | ${RM} -f *.o *.exe *~ y.tab.* lex.yy.c ircd.core core ircd | |
158 | ||
159 | lint: | |
160 | lint -aacgprxhH $(CPPFLAGS) -DIRCD_PREFIX=\"@prefix@\" $(SRCS) >>../lint.out | |
161 | ||
162 | distclean: clean | |
163 | ${RM} -f Makefile version.c.last | |
164 | ||
165 | include .depend |