| 1 |
adx |
30 |
# |
| 2 |
|
|
# Makefile.in for ircd/modules |
| 3 |
|
|
# |
| 4 |
knight |
31 |
# $Id$ |
| 5 |
adx |
30 |
# |
| 6 |
|
|
CC = @CC@ |
| 7 |
|
|
AR = @AR@ |
| 8 |
|
|
RM = @RM@ |
| 9 |
|
|
SED = @SED@ |
| 10 |
|
|
SEDOBJ = @SEDOBJ@ |
| 11 |
|
|
STDOUT = @STDOUT@ |
| 12 |
|
|
CFLAGS = @IRC_CFLAGS@ |
| 13 |
|
|
PICFLAGS = @PICFLAGS@ |
| 14 |
|
|
MKDEP = @MKDEP@ |
| 15 |
|
|
INSTALL = @INSTALL@ |
| 16 |
|
|
INSTALL_DATA = @INSTALL_DATA@ |
| 17 |
|
|
MV = @MV@ |
| 18 |
|
|
LD = @LD@ |
| 19 |
|
|
|
| 20 |
|
|
SSL_LIBS = @SSL_LIBS@ |
| 21 |
|
|
SSL_INCLUDES = @SSL_INCLUDES@ |
| 22 |
|
|
IRCDLIBS = @LIBS@ $(SSL_LIBS) |
| 23 |
|
|
|
| 24 |
|
|
prefix = $(DESTDIR)@prefix@ |
| 25 |
|
|
# Change this later! -- adrian |
| 26 |
|
|
moduledir = ${prefix}/modules |
| 27 |
|
|
automoduledir = ${moduledir}/autoload |
| 28 |
|
|
|
| 29 |
|
|
INCLUDES = -I../include -I../lib/pcre $(SSL_INCLUDES) |
| 30 |
|
|
CPPFLAGS = ${INCLUDES} @CPPFLAGS@ |
| 31 |
|
|
|
| 32 |
|
|
CORE_SRCS = \ |
| 33 |
|
|
core/m_die.c \ |
| 34 |
|
|
core/m_join.c \ |
| 35 |
|
|
core/m_kick.c \ |
| 36 |
|
|
core/m_kill.c \ |
| 37 |
|
|
core/m_message.c \ |
| 38 |
|
|
core/m_mode.c \ |
| 39 |
|
|
core/m_nick.c \ |
| 40 |
|
|
core/m_part.c \ |
| 41 |
|
|
core/m_quit.c \ |
| 42 |
|
|
core/m_server.c \ |
| 43 |
|
|
core/m_sjoin.c \ |
| 44 |
|
|
core/m_squit.c |
| 45 |
|
|
|
| 46 |
|
|
SSL_SRCS = \ |
| 47 |
|
|
m_challenge.c \ |
| 48 |
|
|
m_cryptlink.c |
| 49 |
|
|
|
| 50 |
|
|
SRCS = \ |
| 51 |
|
|
m_accept.c \ |
| 52 |
|
|
m_admin.c \ |
| 53 |
|
|
m_away.c \ |
| 54 |
|
|
m_capab.c \ |
| 55 |
|
|
m_cburst.c \ |
| 56 |
|
|
m_close.c \ |
| 57 |
|
|
@SSL_SRCS_ENABLE@ \ |
| 58 |
|
|
m_connect.c \ |
| 59 |
|
|
m_drop.c \ |
| 60 |
|
|
m_encap.c \ |
| 61 |
|
|
m_eob.c \ |
| 62 |
|
|
m_etrace.c \ |
| 63 |
|
|
m_hash.c \ |
| 64 |
|
|
m_help.c \ |
| 65 |
|
|
m_gline.c \ |
| 66 |
|
|
m_info.c \ |
| 67 |
|
|
m_invite.c \ |
| 68 |
|
|
m_ison.c \ |
| 69 |
|
|
m_kline.c \ |
| 70 |
|
|
m_knock.c \ |
| 71 |
|
|
m_links.c \ |
| 72 |
|
|
m_list.c \ |
| 73 |
|
|
m_lljoin.c \ |
| 74 |
|
|
m_llnick.c \ |
| 75 |
|
|
m_locops.c \ |
| 76 |
|
|
m_lusers.c \ |
| 77 |
|
|
m_map.c \ |
| 78 |
|
|
m_motd.c \ |
| 79 |
|
|
m_names.c \ |
| 80 |
|
|
m_nburst.c \ |
| 81 |
|
|
m_omotd.c \ |
| 82 |
|
|
m_oper.c \ |
| 83 |
|
|
m_operwall.c \ |
| 84 |
|
|
m_pass.c \ |
| 85 |
|
|
m_ping.c \ |
| 86 |
|
|
m_pong.c \ |
| 87 |
|
|
m_post.c \ |
| 88 |
|
|
m_rehash.c \ |
| 89 |
|
|
m_restart.c \ |
| 90 |
|
|
m_resv.c \ |
| 91 |
|
|
m_rkline.c \ |
| 92 |
|
|
m_rxline.c \ |
| 93 |
|
|
m_set.c \ |
| 94 |
|
|
m_stats.c \ |
| 95 |
|
|
m_svinfo.c \ |
| 96 |
|
|
m_tb.c \ |
| 97 |
|
|
m_testmask.c \ |
| 98 |
|
|
m_testline.c \ |
| 99 |
|
|
m_time.c \ |
| 100 |
|
|
m_topic.c \ |
| 101 |
|
|
m_trace.c \ |
| 102 |
|
|
m_user.c \ |
| 103 |
|
|
m_userhost.c \ |
| 104 |
|
|
m_users.c \ |
| 105 |
|
|
m_version.c \ |
| 106 |
|
|
m_wallops.c \ |
| 107 |
|
|
m_who.c \ |
| 108 |
|
|
m_whois.c \ |
| 109 |
|
|
m_whowas.c \ |
| 110 |
|
|
m_xline.c |
| 111 |
|
|
|
| 112 |
|
|
ALL_SRCS = $(CORE_SRCS) $(SRCS) @SSL_SRCS_ENABLE@ |
| 113 |
|
|
|
| 114 |
|
|
SH_OBJS = ${SRCS:.c=.so} |
| 115 |
|
|
SH_CORE_OBJS = ${CORE_SRCS:.c=.so} |
| 116 |
|
|
|
| 117 |
|
|
HPUX_OBJS = ${SH_OBJS:.so=.sl} |
| 118 |
|
|
HPUX_CORE_OBJS = ${SH_CORE_OBJS:.so=.sl} |
| 119 |
|
|
|
| 120 |
|
|
S_OBJS = ${ALL_SRCS:.c=.o} |
| 121 |
|
|
|
| 122 |
|
|
default: build |
| 123 |
|
|
build: all |
| 124 |
|
|
all: .depend @MOD_TARGET@ |
| 125 |
|
|
|
| 126 |
|
|
shared_modules: $(SH_CORE_OBJS) $(SH_OBJS) |
| 127 |
|
|
|
| 128 |
|
|
hpux_shared: $(SH_CORE_OBJS) $(SH_OBJS) $(HPUX_CORE_OBJS) $(HPUX_OBJS) |
| 129 |
|
|
|
| 130 |
|
|
libmodules.a: $(S_OBJS) |
| 131 |
|
|
$(RM) -f $@ |
| 132 |
|
|
$(AR) csrv $@ $(S_OBJS) |
| 133 |
|
|
|
| 134 |
|
|
install-mkdirs: |
| 135 |
|
|
mkdir -p $(prefix) |
| 136 |
|
|
|
| 137 |
|
|
-@if test -d $(moduledir)-old; then \ |
| 138 |
|
|
echo "${RM} -rf $(moduledir)-old"; \ |
| 139 |
|
|
${RM} -rf $(moduledir)-old; \ |
| 140 |
|
|
fi |
| 141 |
|
|
-@if test -d $(moduledir); then \ |
| 142 |
|
|
echo "${MV} $(moduledir) $(moduledir)-old"; \ |
| 143 |
|
|
${MV} $(moduledir) $(moduledir)-old; \ |
| 144 |
|
|
fi |
| 145 |
|
|
|
| 146 |
|
|
mkdir -p $(moduledir) $(automoduledir) |
| 147 |
|
|
|
| 148 |
|
|
install: install_@MOD_TARGET@ |
| 149 |
|
|
|
| 150 |
|
|
install_libmodules.a: libmodules.a |
| 151 |
|
|
# Ye olde noop here. |
| 152 |
|
|
|
| 153 |
|
|
install_shared_modules: install-mkdirs |
| 154 |
|
|
@echo "Installing core modules into $(moduledir) .." |
| 155 |
|
|
@for file in $(SH_CORE_OBJS); do \ |
| 156 |
|
|
$(INSTALL_DATA) $$file $(moduledir); \ |
| 157 |
|
|
done |
| 158 |
|
|
@echo "Installing modules into $(automoduledir) .." |
| 159 |
|
|
@for file in $(SH_OBJS); do \ |
| 160 |
|
|
$(INSTALL_DATA) $$file $(automoduledir); \ |
| 161 |
|
|
done |
| 162 |
|
|
|
| 163 |
|
|
install_hpux_shared: install-mkdirs |
| 164 |
|
|
@echo "Installing core modules into $(moduledir) .." |
| 165 |
|
|
@for file in $(HPUX_CORE_OBJS); do \ |
| 166 |
|
|
$(INSTALL_DATA) $$file $(moduledir); \ |
| 167 |
|
|
done |
| 168 |
|
|
@echo "Installing modules into $(automoduledir) .." |
| 169 |
|
|
@for file in $(HPUX_OBJS); do \ |
| 170 |
|
|
$(INSTALL_DATA) $$file $(automoduledir); \ |
| 171 |
|
|
done |
| 172 |
|
|
|
| 173 |
|
|
.SUFFIXES: .sl .so .o |
| 174 |
|
|
|
| 175 |
|
|
.c.o: |
| 176 |
|
|
${CC} ${CPPFLAGS} ${CFLAGS} -c $< -o $@ |
| 177 |
|
|
|
| 178 |
|
|
.c.so: |
| 179 |
|
|
${CC} ${PICFLAGS} ${CPPFLAGS} ${CFLAGS} $< -o $@ |
| 180 |
|
|
|
| 181 |
|
|
.so.sl: |
| 182 |
|
|
$(LD) -b $< -o $@ |
| 183 |
|
|
|
| 184 |
|
|
.depend: |
| 185 |
|
|
${MKDEP} ${CPPFLAGS} ${ALL_SRCS} ${STDOUT} |
| 186 |
|
|
${SED} -e '${SEDOBJ}' < .depend > .depend.tmp-1 |
| 187 |
|
|
${SED} -e 's/^m_\(server\|squit\|die\|join\|kick\|kill\|message\|mode\|nick\|part\|quit\|sjoin\)/core\/m_\1/' .depend.tmp-1 > .depend.tmp |
| 188 |
|
|
@${SED} -e '/^# Autogenerated - do not delete/,$$d' <Makefile >Makefile.depend |
| 189 |
|
|
@echo '# Autogenerated - do not delete' >>Makefile.depend |
| 190 |
|
|
@echo 'include .depend' >> Makefile.depend |
| 191 |
|
|
@${MV} Makefile.depend Makefile |
| 192 |
|
|
${MV} -f .depend.tmp .depend |
| 193 |
|
|
${RM} -f .depend.tmp-1 |
| 194 |
|
|
|
| 195 |
|
|
clean: |
| 196 |
|
|
${RM} -f *.so *.sl *~ *.o *.a so_locations |
| 197 |
|
|
${RM} -f core/*.so core/*.sl core/*~ core/*.o |
| 198 |
|
|
|
| 199 |
|
|
distclean: clean |
| 200 |
|
|
${RM} -f Makefile .depend |
| 201 |
|
|
|
| 202 |
|
|
.PHONY: clean distclean install install_hpux_shared hpux_shared install_shared_modules shared_modules install_libmodules.a install-mkdirs build |