]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Makefile.in for ircd/modules | |
3 | # | |
4 | # $Id: Makefile.in 3372 2007-04-03 10:18:07Z nenolod $ | |
5 | # | |
6 | CC = @CC@ | |
7 | AR = @AR@ | |
8 | RANLIB = @RANLIB@ | |
9 | RM = @RM@ | |
10 | SED = @SED@ | |
11 | LEX = @LEX@ | |
12 | LEXLIB = @LEXLIB@ | |
13 | CFLAGS = @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\" | |
14 | PICFLAGS = @PICFLAGS@ | |
15 | MKDEP = @MKDEP@ -DIRCD_PREFIX=\"@prefix@\" | |
16 | INSTALL = @INSTALL@ | |
17 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
18 | INSTALL_DATA = @INSTALL_DATA@ | |
19 | INSTALL_SUID = @INSTALL_PROGRAM@ -o root -m 4755 | |
20 | SEDOBJ = @SEDOBJ@ | |
21 | SHELL = /bin/sh | |
22 | MV = @MV@ | |
23 | LD = @LD@ | |
24 | ||
25 | SSL_LIBS = @SSL_LIBS@ | |
26 | SSL_INCLUDES = @SSL_INCLUDES@ | |
27 | ||
28 | IRCDLIBS = @LIBS@ $(SSL_LIBS) | |
29 | ||
30 | prefix = @prefix@ | |
31 | moduledir = @moduledir@ | |
32 | # Change this later! -- adrian | |
33 | automoduledir = @moduledir@/autoload | |
34 | ||
35 | INCLUDES = -I../include -I../libratbox/include $(SSL_INCLUDES) | |
36 | CPPFLAGS = ${INCLUDES} @CPPFLAGS@ | |
37 | ||
38 | CORE_SRCS = \ | |
39 | core/m_ban.c \ | |
40 | core/m_die.c \ | |
41 | core/m_error.c \ | |
42 | core/m_join.c \ | |
43 | core/m_kick.c \ | |
44 | core/m_kill.c \ | |
45 | core/m_message.c \ | |
46 | core/m_mode.c \ | |
47 | core/m_nick.c \ | |
48 | core/m_part.c \ | |
49 | core/m_quit.c \ | |
50 | core/m_server.c \ | |
51 | core/m_squit.c | |
52 | ||
53 | TSRCS = \ | |
54 | m_accept.c \ | |
55 | m_admin.c \ | |
56 | m_away.c \ | |
57 | m_cap.c \ | |
58 | m_capab.c \ | |
59 | m_certfp.c \ | |
60 | m_challenge.c \ | |
61 | m_chghost.c \ | |
62 | m_close.c \ | |
63 | m_cmessage.c \ | |
64 | m_connect.c \ | |
65 | m_dline.c \ | |
66 | m_encap.c \ | |
67 | m_etrace.c \ | |
68 | m_help.c \ | |
69 | m_info.c \ | |
70 | m_invite.c \ | |
71 | m_ison.c \ | |
72 | m_kline.c \ | |
73 | m_knock.c \ | |
74 | m_links.c \ | |
75 | m_list.c \ | |
76 | m_locops.c \ | |
77 | m_lusers.c \ | |
78 | m_map.c \ | |
79 | m_monitor.c \ | |
80 | m_motd.c \ | |
81 | m_names.c \ | |
82 | m_oper.c \ | |
83 | m_operspy.c \ | |
84 | m_pass.c \ | |
85 | m_ping.c \ | |
86 | m_pong.c \ | |
87 | m_post.c \ | |
88 | m_privs.c \ | |
89 | m_rehash.c \ | |
90 | m_restart.c \ | |
91 | m_resv.c \ | |
92 | m_sasl.c \ | |
93 | m_scan.c \ | |
94 | m_services.c \ | |
95 | m_set.c \ | |
96 | m_signon.c \ | |
97 | m_snote.c \ | |
98 | m_stats.c \ | |
99 | m_svinfo.c \ | |
100 | m_tb.c \ | |
101 | m_testline.c \ | |
102 | m_testmask.c \ | |
103 | m_time.c \ | |
104 | m_topic.c \ | |
105 | m_trace.c \ | |
106 | m_user.c \ | |
107 | m_userhost.c \ | |
108 | m_users.c \ | |
109 | m_version.c \ | |
110 | m_wallops.c \ | |
111 | m_who.c \ | |
112 | m_whois.c \ | |
113 | m_whowas.c \ | |
114 | m_unreject.c \ | |
115 | m_xline.c \ | |
116 | sno_routing.c | |
117 | ||
118 | SRCS = ${TSRCS} | |
119 | ||
120 | ALL_SRCS = $(CORE_SRCS) \ | |
121 | $(SRCS) | |
122 | ||
123 | SH_OBJS = ${SRCS:.c=.so} | |
124 | SH_CORE_OBJS = ${CORE_SRCS:.c=.so} | |
125 | ||
126 | HPUX_OBJS = ${SH_OBJS:.so=.sl} | |
127 | HPUX_CORE_OBJS = ${SH_CORE_OBJS:.so=.sl} | |
128 | ||
129 | S_OBJS = ${ALL_SRCS:.c=.o} | |
130 | ||
131 | DOLLAR = $$ | |
132 | ||
133 | default: build | |
134 | build: all | |
135 | all: @MOD_TARGET@ | |
136 | ||
137 | shared_modules: $(SH_CORE_OBJS) $(SH_OBJS) | |
138 | ||
139 | hpux_modules: $(HPUX_CORE_OBJS) $(HPUX_OBJS) | |
140 | ||
141 | hpux_shared: $(SH_CORE_OBJS) $(SH_OBJS) | |
142 | ${MAKE} hpux_modules | |
143 | ||
144 | static_modules.c: static_modules.c.SH | |
145 | /bin/sh ./static_modules.c.SH $(S_OBJS) | |
146 | ||
147 | libmodules.a: $(S_OBJS) static_modules.o | |
148 | $(RM) -f $@ | |
149 | $(AR) cqv $@ $(S_OBJS) static_modules.o | |
150 | $(RANLIB) $@ | |
151 | ||
152 | ||
153 | install-mkdirs: | |
154 | @echo "ircd: setting up modular directory structure" | |
155 | -@if test ! -d $(DESTDIR)$(moduledir); then \ | |
156 | mkdir $(DESTDIR)$(moduledir); \ | |
157 | fi | |
158 | -@if test -d $(DESTDIR)$(moduledir)-old; then \ | |
159 | rm -rf $(DESTDIR)$(moduledir)-old; \ | |
160 | fi | |
161 | -@if test -d $(DESTDIR)$(moduledir); then \ | |
162 | echo "ircd: backing up modules"; \ | |
163 | mv $(DESTDIR)$(moduledir) $(DESTDIR)$(moduledir)-old; \ | |
164 | fi | |
165 | ||
166 | @mkdir -p -m 755 $(DESTDIR)$(moduledir) | |
167 | @mkdir -p -m 755 $(DESTDIR)$(automoduledir) | |
168 | ||
169 | install: install_@MOD_TARGET@ | |
170 | ||
171 | install_libmodules.a: libmodules.a | |
172 | # Ye olde noop here. | |
173 | ||
174 | install_shared_modules: install-mkdirs | |
175 | @echo "ircd: installing modules" | |
176 | @for file in $(SH_CORE_OBJS); do \ | |
177 | $(INSTALL_DATA) $$file $(DESTDIR)$(moduledir); \ | |
178 | done | |
179 | @for file in $(SH_OBJS); do \ | |
180 | $(INSTALL_DATA) $$file $(DESTDIR)$(automoduledir); \ | |
181 | done | |
182 | ||
183 | install_hpux_shared: install-mkdirs | |
184 | @echo "ircd: installing modules" | |
185 | @for file in $(HPUX_CORE_OBJS); do \ | |
186 | $(INSTALL_DATA) $$file $(DESTDIR)$(moduledir); \ | |
187 | done | |
188 | @for file in $(HPUX_OBJS); do \ | |
189 | $(INSTALL_DATA) $$file $(DESTDIR)$(automoduledir); \ | |
190 | done | |
191 | ||
192 | .SUFFIXES: .sl .so .o | |
193 | ||
194 | .c.o: | |
195 | ${CC} ${CPPFLAGS} ${CFLAGS} -DMODNAME=`basename $< .c`_mheader -c $< -o $@ | |
196 | ||
197 | .c.so: | |
198 | ${CC} ${PICFLAGS} ${CPPFLAGS} ${CFLAGS} $< -o $@ | |
199 | ||
200 | .so.sl: | |
201 | $(LD) -b $< -o $@ | |
202 | ||
203 | .PHONY: depend clean distclean | |
204 | depend: | |
205 | @$(RM) -f .depend | |
206 | ${MKDEP} ${CPPFLAGS} ${ALL_SRCS} > .depend | |
207 | @$(SED) -e '${SEDOBJ}' < .depend > .depend.tmp-1 | |
208 | @$(SED) -e 's#^m_die\.#core/&#' -e 's#^m_error\.#core/&#' -e 's#^m_join\.#core/&#' -e 's#^m_kick\.#core/&#' -e 's#^m_kill\.#core/&#' -e 's#^m_message\.#core/&#' -e 's#^m_mode\.#core/&#' -e 's#^m_nick\.#core/&#' -e 's#^m_part\.#core/&#' -e 's#^m_quit\.#core/&#' -e 's#^m_server\.#core/&#' -e 's#^m_squit\.#core/&#' .depend.tmp-1 > .depend.tmp | |
209 | @$(MV) -f .depend.tmp .depend | |
210 | @$(RM) -f .depend.tmp-1 | |
211 | ||
212 | clean: | |
213 | ${RM} -f *.so *.sl *~ *.o *.a | |
214 | ${RM} -f core/*.so core/*.sl core/*~ core/*.o | |
215 | ||
216 | lint: | |
217 | lint -aacgprxhH ${CPPFLAGS} -DIRCD_PREFIX=\"@prefix@\" $(ALL_SRCS) >../lint.out | |
218 | ||
219 | distclean: clean | |
220 | ${RM} -f Makefile | |
221 | ||
222 | include .depend |