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