]> jfr.im git - solanum.git/blame - modules/Makefile.in
Fix viconf's dependencies on setup.h and config.h.
[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@
31moduledir = @moduledir@
32# Change this later! -- adrian
33automoduledir = @moduledir@/autoload
34
f24a7dfb 35INCLUDES = -I../include -I../libratbox/include $(SSL_INCLUDES)
212380e3
AC
36CPPFLAGS = ${INCLUDES} @CPPFLAGS@
37
38CORE_SRCS = \
431a1a27 39 core/m_ban.c \
212380e3
AC
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 \
212380e3
AC
51 core/m_squit.c
52
53TSRCS = \
54 m_accept.c \
55 m_admin.c \
56 m_away.c \
57 m_cap.c \
58 m_capab.c \
8eda114a 59 m_certfp.c \
212380e3
AC
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 \
212380e3
AC
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 \
607cf49f 75 m_list.c \
212380e3
AC
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 \
7b7e1640 88 m_privs.c \
212380e3
AC
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
118SRCS = ${TSRCS}
119
120ALL_SRCS = $(CORE_SRCS) \
121 $(SRCS)
122
123SH_OBJS = ${SRCS:.c=.so}
124SH_CORE_OBJS = ${CORE_SRCS:.c=.so}
125
126HPUX_OBJS = ${SH_OBJS:.so=.sl}
127HPUX_CORE_OBJS = ${SH_CORE_OBJS:.so=.sl}
128
129S_OBJS = ${ALL_SRCS:.c=.o}
130
131DOLLAR = $$
132
133default: build
134build: all
135all: @MOD_TARGET@
136
137shared_modules: $(SH_CORE_OBJS) $(SH_OBJS)
138
139hpux_modules: $(HPUX_CORE_OBJS) $(HPUX_OBJS)
140
141hpux_shared: $(SH_CORE_OBJS) $(SH_OBJS)
142 ${MAKE} hpux_modules
143
144static_modules.c: static_modules.c.SH
145 /bin/sh ./static_modules.c.SH $(S_OBJS)
146
147libmodules.a: $(S_OBJS) static_modules.o
148 $(RM) -f $@
149 $(AR) cqv $@ $(S_OBJS) static_modules.o
150 $(RANLIB) $@
151
152
153install-mkdirs:
154 @echo "ircd: setting up modular directory structure"
212380e3
AC
155 -@if test -d $(DESTDIR)$(moduledir)-old; then \
156 rm -rf $(DESTDIR)$(moduledir)-old; \
157 fi
158 -@if test -d $(DESTDIR)$(moduledir); then \
159 echo "ircd: backing up modules"; \
160 mv $(DESTDIR)$(moduledir) $(DESTDIR)$(moduledir)-old; \
161 fi
162
163 @mkdir -p -m 755 $(DESTDIR)$(moduledir)
164 @mkdir -p -m 755 $(DESTDIR)$(automoduledir)
165
166install: install_@MOD_TARGET@
167
168install_libmodules.a: libmodules.a
169# Ye olde noop here.
170
171install_shared_modules: install-mkdirs
172 @echo "ircd: installing modules"
173 @for file in $(SH_CORE_OBJS); do \
174 $(INSTALL_DATA) $$file $(DESTDIR)$(moduledir); \
175 done
176 @for file in $(SH_OBJS); do \
177 $(INSTALL_DATA) $$file $(DESTDIR)$(automoduledir); \
178 done
179
180install_hpux_shared: install-mkdirs
181 @echo "ircd: installing modules"
182 @for file in $(HPUX_CORE_OBJS); do \
183 $(INSTALL_DATA) $$file $(DESTDIR)$(moduledir); \
184 done
185 @for file in $(HPUX_OBJS); do \
186 $(INSTALL_DATA) $$file $(DESTDIR)$(automoduledir); \
187 done
188
189.SUFFIXES: .sl .so .o
190
191.c.o:
192 ${CC} ${CPPFLAGS} ${CFLAGS} -DMODNAME=`basename $< .c`_mheader -c $< -o $@
193
194.c.so:
f02e3a26 195 ${CC} ${PICFLAGS} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} $< -o $@
212380e3
AC
196
197.so.sl:
198 $(LD) -b $< -o $@
199
200.PHONY: depend clean distclean
201depend:
202 @$(RM) -f .depend
203 ${MKDEP} ${CPPFLAGS} ${ALL_SRCS} > .depend
204 @$(SED) -e '${SEDOBJ}' < .depend > .depend.tmp-1
baacec41 205 @$(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
206 @$(MV) -f .depend.tmp .depend
207 @$(RM) -f .depend.tmp-1
208
209clean:
210 ${RM} -f *.so *.sl *~ *.o *.a
211 ${RM} -f core/*.so core/*.sl core/*~ core/*.o
212
213lint:
214 lint -aacgprxhH ${CPPFLAGS} -DIRCD_PREFIX=\"@prefix@\" $(ALL_SRCS) >../lint.out
215
216distclean: clean
217 ${RM} -f Makefile
218
219include .depend