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