]> jfr.im git - solanum.git/blame - modules/Makefile.in
whois: Fix UID leak.
[solanum.git] / modules / Makefile.in
CommitLineData
212380e3
AC
1#
2# Makefile.in for ircd/modules
3#
607cf49f 4# $Id: Makefile.in 3372 2007-04-03 10:18:07Z nenolod $
212380e3
AC
5#
6CC = @CC@
7AR = @AR@
8RANLIB = @RANLIB@
9RM = @RM@
10SED = @SED@
11LEX = @LEX@
12LEXLIB = @LEXLIB@
13CFLAGS = @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\"
14PICFLAGS = @PICFLAGS@
15MKDEP = @MKDEP@ -DIRCD_PREFIX=\"@prefix@\"
16INSTALL = @INSTALL@
17INSTALL_PROGRAM = @INSTALL_PROGRAM@
18INSTALL_DATA = @INSTALL_DATA@
19INSTALL_SUID = @INSTALL_PROGRAM@ -o root -m 4755
20SEDOBJ = @SEDOBJ@
21SHELL = /bin/sh
22MV = @MV@
23LD = @LD@
24
25SSL_LIBS = @SSL_LIBS@
26SSL_INCLUDES = @SSL_INCLUDES@
27
28IRCDLIBS = @LIBS@ $(SSL_LIBS)
29
30prefix = @prefix@
c74836dc
NPB
31exec_prefix = @exec_prefix@
32libdir = @libdir@
33pkglibdir = @pkglibdir@
212380e3 34moduledir = @moduledir@
c74836dc 35PACKAGE_TARNAME = @PACKAGE_TARNAME@
212380e3
AC
36# Change this later! -- adrian
37automoduledir = @moduledir@/autoload
38
f24a7dfb 39INCLUDES = -I../include -I../libratbox/include $(SSL_INCLUDES)
212380e3
AC
40CPPFLAGS = ${INCLUDES} @CPPFLAGS@
41
42CORE_SRCS = \
431a1a27 43 core/m_ban.c \
212380e3
AC
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 \
212380e3
AC
55 core/m_squit.c
56
57TSRCS = \
67aeaba5 58 chm_nocolour.c \
f30a5ee4 59 chm_noctcp.c \
212380e3
AC
60 m_accept.c \
61 m_admin.c \
62 m_away.c \
63 m_cap.c \
64 m_capab.c \
8eda114a 65 m_certfp.c \
212380e3
AC
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 \
212380e3
AC
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 \
607cf49f 81 m_list.c \
212380e3
AC
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 \
7b7e1640 94 m_privs.c \
212380e3
AC
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 \
21f715a9 104 m_starttls.c \
212380e3
AC
105 m_stats.c \
106 m_svinfo.c \
107 m_tb.c \
108 m_testline.c \
109 m_testmask.c \
bc4dea69 110 m_tginfo.c \
212380e3
AC
111 m_time.c \
112 m_topic.c \
113 m_trace.c \
114 m_user.c \
115 m_userhost.c \
116 m_users.c \
117 m_version.c \
118 m_wallops.c \
119 m_who.c \
120 m_whois.c \
121 m_whowas.c \
122 m_unreject.c \
123 m_xline.c \
124 sno_routing.c
125
126SRCS = ${TSRCS}
127
128ALL_SRCS = $(CORE_SRCS) \
129 $(SRCS)
130
131SH_OBJS = ${SRCS:.c=.so}
132SH_CORE_OBJS = ${CORE_SRCS:.c=.so}
133
134HPUX_OBJS = ${SH_OBJS:.so=.sl}
135HPUX_CORE_OBJS = ${SH_CORE_OBJS:.so=.sl}
136
137S_OBJS = ${ALL_SRCS:.c=.o}
138
139DOLLAR = $$
140
141default: build
142build: all
143all: @MOD_TARGET@
144
145shared_modules: $(SH_CORE_OBJS) $(SH_OBJS)
146
147hpux_modules: $(HPUX_CORE_OBJS) $(HPUX_OBJS)
148
149hpux_shared: $(SH_CORE_OBJS) $(SH_OBJS)
150 ${MAKE} hpux_modules
151
152static_modules.c: static_modules.c.SH
153 /bin/sh ./static_modules.c.SH $(S_OBJS)
154
155libmodules.a: $(S_OBJS) static_modules.o
156 $(RM) -f $@
157 $(AR) cqv $@ $(S_OBJS) static_modules.o
158 $(RANLIB) $@
159
160
161install-mkdirs:
162 @echo "ircd: setting up modular directory structure"
212380e3
AC
163 -@if test -d $(DESTDIR)$(moduledir)-old; then \
164 rm -rf $(DESTDIR)$(moduledir)-old; \
165 fi
166 -@if test -d $(DESTDIR)$(moduledir); then \
167 echo "ircd: backing up modules"; \
168 mv $(DESTDIR)$(moduledir) $(DESTDIR)$(moduledir)-old; \
169 fi
170
171 @mkdir -p -m 755 $(DESTDIR)$(moduledir)
172 @mkdir -p -m 755 $(DESTDIR)$(automoduledir)
173
174install: install_@MOD_TARGET@
175
176install_libmodules.a: libmodules.a
177# Ye olde noop here.
178
179install_shared_modules: install-mkdirs
180 @echo "ircd: installing modules"
181 @for file in $(SH_CORE_OBJS); do \
182 $(INSTALL_DATA) $$file $(DESTDIR)$(moduledir); \
183 done
184 @for file in $(SH_OBJS); do \
185 $(INSTALL_DATA) $$file $(DESTDIR)$(automoduledir); \
186 done
187
188install_hpux_shared: install-mkdirs
189 @echo "ircd: installing modules"
190 @for file in $(HPUX_CORE_OBJS); do \
191 $(INSTALL_DATA) $$file $(DESTDIR)$(moduledir); \
192 done
193 @for file in $(HPUX_OBJS); do \
194 $(INSTALL_DATA) $$file $(DESTDIR)$(automoduledir); \
195 done
196
197.SUFFIXES: .sl .so .o
198
199.c.o:
200 ${CC} ${CPPFLAGS} ${CFLAGS} -DMODNAME=`basename $< .c`_mheader -c $< -o $@
201
202.c.so:
f02e3a26 203 ${CC} ${PICFLAGS} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} $< -o $@
212380e3
AC
204
205.so.sl:
206 $(LD) -b $< -o $@
207
208.PHONY: depend clean distclean
209depend:
210 @$(RM) -f .depend
211 ${MKDEP} ${CPPFLAGS} ${ALL_SRCS} > .depend
212 @$(SED) -e '${SEDOBJ}' < .depend > .depend.tmp-1
baacec41 213 @$(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
212380e3
AC
214 @$(MV) -f .depend.tmp .depend
215 @$(RM) -f .depend.tmp-1
216
217clean:
218 ${RM} -f *.so *.sl *~ *.o *.a
219 ${RM} -f core/*.so core/*.sl core/*~ core/*.o
220
221lint:
222 lint -aacgprxhH ${CPPFLAGS} -DIRCD_PREFIX=\"@prefix@\" $(ALL_SRCS) >../lint.out
223
224distclean: clean
225 ${RM} -f Makefile
226
227include .depend