# $Id: Makefile.in,v 1.6 2004/02/06 22:53:39 ircd Exp $

SED				= @SED@
MV				= @MV@
RM				= @RM@
CP				= @CP@
AUTOMODULEDIR   = @prefix@/modules

default: all
all: services

services:
	-@if test -f services.conf ; then \
		./services.pl; \
		cd ../../contrib; \
		${MV} Makefile Makefile.bak; \
		cat Makefile.bak | ${SED} -e 's/example_module.c/example_module.c m_services.c/g' > Makefile; \
		${RM} -f Makefile.bak; \
		make m_services.so; \
		${CP} m_services.so $(AUTOMODULEDIR); \
	fi

clean:

distclean: clean
	@${RM} -f Makefile services.pl
