#************************************************************************
#*   IRC - Internet Relay Chat, src/modules/Makefile
#*   Copyright (C) Carsten V. Munk 2001
#*
#*   This program is free software; you can redistribute it and/or modify
#*   it under the terms of the GNU General Public License as published by
#*   the Free Software Foundation; either version 1, or (at your option)
#*   any later version.
#*
#*   This program is distributed in the hope that it will be useful,
#*   but WITHOUT ANY WARRANTY; without even the implied warranty of
#*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#*   GNU General Public License for more details.
#*
#*   You should have received a copy of the GNU General Public License
#*   along with this program; if not, write to the Free Software
#*   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#*   
#*   $Id: Makefile.in,v 1.1.6.4 2004/07/03 19:04:32 syzop Exp $
#*/

INCLUDES = ../include/struct.h ../include/config.h \
	../include/sys.h ../include/common.h ../include/version.h \
	../include/h.h ../include/numeric.h ../include/msg.h \
	../include/dynconf.h ../include/modules.h ../include/setup.h

R_MODULES=m_sethost.so m_chghost.so m_chgident.so m_setname.so \
		m_setident.so m_sdesc.so m_svsmode.so m_swhois.so\
		m_svsmotd.so m_svsnline.so m_who.so m_mkpasswd.so \
		m_away.so m_svsnoop.so m_svso.so m_svsnick.so \
	 m_adminchat.so m_akill.so m_chgname.so m_guest.so m_htm.so m_kill.so \
 	 m_lag.so m_message.so m_nachat.so m_oper.so m_pingpong.so \
	 m_quit.so m_rakill.so m_rping.so m_sendumode.so m_sqline.so \
	 m_tsctl.so m_unkline.so m_unsqline.so m_unzline.so m_whois.so \
	 m_tkl.so m_vhost.so m_cycle.so m_svsjoin.so m_svspart.so \
	 m_svswatch.so m_svssilence.so m_sendsno.so m_svssno.so \
	 m_sajoin.so m_sapart.so m_samode.so m_kick.so m_topic.so \
	 m_invite.so m_list.so m_time.so m_svskill.so m_sjoin.so \
	 m_pass.so m_userhost.so m_ison.so m_silence.so m_knock.so \
	 m_umode2.so m_squit.so m_protoctl.so m_addline.so m_addomotd.so \
	 m_wallops.so m_admin.so m_globops.so m_locops.so m_chatops.so \
	 m_trace.so m_netinfo.so m_links.so m_help.so m_rules.so \
	 m_close.so m_map.so m_eos.so m_server.so m_stats.so \
	 m_svsfline.so m_dccdeny.so m_undccdeny.so m_whowas.so \
	 m_connect.so cloak.so oldcloak.so m_dccallow.so

COMMANDS=m_sethost.c m_chghost.c m_chgident.c m_setname.c m_setident.c \
         m_sdesc.c m_svsmode.c m_swhois.c m_svsmotd.c m_svsnline.c \
	 m_who.c m_mkpasswd.c m_away.c m_svsnoop.c m_svso.c m_svsnick.c \
	 m_adminchat.c m_akill.c m_chgname.c m_guest.c m_htm.c m_kill.c \
 	 m_lag.c m_message.c m_nachat.c m_oper.c m_pingpong.c \
	 m_quit.c m_rakill.c m_rping.c m_sendumode.c m_sqline.c \
	 m_tsctl.c m_unkline.c m_unsqline.c m_unzline.c m_whois.c \
	 m_tkl.c m_vhost.c m_cycle.c m_svsjoin.c m_svspart.c \
	 m_svslusers.c m_svswatch.c m_svssilence.c m_sendsno.c \
	 m_svssno.c m_sajoin.c m_sapart.c m_samode.c m_kick.c m_topic.c \
	 m_invite.c m_list.c m_time.c m_svskill.c m_sjoin.c \
	 m_pass.c m_userhost.c m_ison.c m_silence.c m_knock.c m_umode2.c \
	 m_squit.c m_protoctl.c m_addline.c m_addmotd.c m_addomotd.c \
	 m_wallops.c m_admin.c m_globops.c m_locops.c m_chatops.c \
	 m_trace.c m_netinfo.c m_links.c m_help.c m_rules.c \
	 m_close.c m_map.c m_eos.c m_server.c m_stats.c \
	 m_svsfline.c m_dccdeny.c m_undccdeny.c m_whowas.c \
	 m_connect.c m_dccallow.c


MODULES=commands.so $(R_MODULES)
MODULEFLAGS=@MODULEFLAGS@

all: build

build: $(MODULES)

custommodule: $(MODULEFILE).c
	$(CC) $(CFLAGS) $(MODULEFLAGS) $(EXLIBS) -DDYNAMIC_LINKING \
		-o $(MODULEFILE).so $(MODULEFILE).c		

commands.so: l_commands.c $(COMMANDS) $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -o commands.so l_commands.c \
	$(COMMANDS)

m_adminchat.so: m_adminchat.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_adminchat.so m_adminchat.c

m_akill.so: m_akill.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_akill.so m_akill.c

m_chgname.so: m_chgname.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_chgname.so m_chgname.c

m_guest.so: m_guest.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_guest.so m_guest.c

m_htm.so: m_htm.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_htm.so m_htm.c

m_kill.so: m_kill.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_kill.so m_kill.c

m_lag.so: m_lag.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_lag.so m_lag.c

m_message.so: m_message.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_message.so m_message.c

m_nachat.so: m_nachat.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_nachat.so m_nachat.c

m_oper.so: m_oper.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_oper.so m_oper.c

m_pingpong.so: m_pingpong.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_pingpong.so m_pingpong.c

m_quit.so: m_quit.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_quit.so m_quit.c

m_rakill.so: m_rakill.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_rakill.so m_rakill.c

m_rping.so: m_rping.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_rping.so m_rping.c

m_sendumode.so: m_sendumode.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_sendumode.so m_sendumode.c

m_sqline.so: m_sqline.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_sqline.so m_sqline.c

m_tsctl.so: m_tsctl.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_tsctl.so m_tsctl.c

m_unkline.so: m_unkline.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_unkline.so m_unkline.c

m_unsqline.so: m_unsqline.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_unsqline.so m_unsqline.c

m_unzline.so: m_unzline.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_unzline.so m_unzline.c

m_whois.so: m_whois.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_whois.so m_whois.c

m_sethost.so: m_sethost.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_sethost.so m_sethost.c

m_chghost.so: m_chghost.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		 -o m_chghost.so m_chghost.c

m_chgident.so: m_chgident.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		 -o m_chgident.so m_chgident.c

m_setident.so: m_setident.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		 -o m_setident.so m_setident.c

m_setname.so: m_setname.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		 -o m_setname.so m_setname.c

m_sdesc.so: m_sdesc.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		 -o m_sdesc.so m_sdesc.c

m_svsmode.so: m_svsmode.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		 -o m_svsmode.so m_svsmode.c

m_swhois.so: m_swhois.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		 -o m_swhois.so m_swhois.c

m_svsmotd.so: m_svsmotd.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		 -o m_svsmotd.so m_svsmotd.c

m_svsnline.so: m_svsnline.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		 -o m_svsnline.so m_svsnline.c

m_who.so: m_who.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		 -o m_who.so m_who.c

m_mkpasswd.so: m_mkpasswd.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_mkpasswd.so m_mkpasswd.c

m_away.so: m_away.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_away.so m_away.c

m_svsnoop.so: m_svsnoop.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_svsnoop.so m_svsnoop.c

m_svso.so: m_svso.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_svso.so m_svso.c

m_svsnick.so: m_svsnick.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_svsnick.so m_svsnick.c

m_tkl.so: m_tkl.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_tkl.so m_tkl.c

m_vhost.so: m_vhost.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_vhost.so m_vhost.c

m_cycle.so: m_cycle.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_cycle.so m_cycle.c

m_svsjoin.so: m_svsjoin.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_svsjoin.so m_svsjoin.c

m_svspart.so: m_svspart.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_svspart.so m_svspart.c

m_svslusers.so: m_svslusers.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_svslusers.so m_svslusers.c

m_svswatch.so: m_svswatch.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_svswatch.so m_svswatch.c

m_svssilence.so: m_svssilence.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_svssilence.so m_svssilence.c

m_sendsno.so: m_sendsno.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_sendsno.so m_sendsno.c

m_svssno.so: m_svssno.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_svssno.so m_svssno.c

m_sajoin.so: m_sajoin.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_sajoin.so m_sajoin.c

m_sapart.so: m_sapart.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_sapart.so m_sapart.c

m_samode.so: m_samode.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_samode.so m_samode.c

m_kick.so: m_kick.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_kick.so m_kick.c

m_topic.so: m_topic.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_topic.so m_topic.c

m_invite.so: m_invite.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_invite.so m_invite.c

m_list.so: m_list.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_list.so m_list.c

m_time.so: m_time.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_time.so m_time.c

m_svskill.so: m_svskill.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_svskill.so m_svskill.c

m_sjoin.so: m_sjoin.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_sjoin.so m_sjoin.c

m_pass.so: m_pass.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_pass.so m_pass.c

m_userhost.so: m_userhost.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_userhost.so m_userhost.c

m_ison.so: m_ison.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_ison.so m_ison.c

m_silence.so: m_silence.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_silence.so m_silence.c

m_knock.so: m_knock.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_knock.so m_knock.c

m_umode2.so: m_umode2.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_umode2.so m_umode2.c

m_squit.so: m_squit.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_squit.so m_squit.c

m_protoctl.so: m_protoctl.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_protoctl.so m_protoctl.c

m_addline.so: m_addline.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_addline.so m_addline.c

m_addmotd.so: m_addmotd.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_addmotd.so m_addmotd.c

m_addomotd.so: m_addomotd.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_addomotd.so m_addomotd.c

m_wallops.so: m_wallops.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_wallops.so m_wallops.c

m_admin.so: m_admin.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_admin.so m_admin.c

m_globops.so: m_globops.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_globops.so m_globops.c

m_locops.so: m_locops.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_locops.so m_locops.c

m_chatops.so: m_chatops.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_chatops.so m_chatops.c

m_trace.so: m_trace.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_trace.so m_trace.c

m_netinfo.so: m_netinfo.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_netinfo.so m_netinfo.c

m_links.so: m_links.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_links.so m_links.c

m_help.so: m_help.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_help.so m_help.c

m_rules.so: m_rules.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_rules.so m_rules.c

m_close.so: m_close.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_close.so m_close.c

m_map.so: m_map.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_map.so m_map.c

m_eos.so: m_eos.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_eos.so m_eos.c

m_server.so: m_server.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_server.so m_server.c

m_stats.so: m_stats.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_stats.so m_stats.c

m_svsfline.so: m_svsfline.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_svsfline.so m_svsfline.c

m_dccdeny.so: m_dccdeny.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_dccdeny.so m_dccdeny.c

m_undccdeny.so: m_undccdeny.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_undccdeny.so m_undccdeny.c

m_whowas.so: m_whowas.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_whowas.so m_whowas.c

m_connect.so: m_connect.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_connect.so m_connect.c

m_dccallow.so: m_dccallow.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o m_dccallow.so m_dccallow.c

cloak.so: cloak.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o cloak.so cloak.c

oldcloak.so: oldcloak.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o oldcloak.so oldcloak.c

clean:
	$(RM) -f *.o *.so *~ core
