# $Id: Makefile.in,v 1.2 2002/08/17 02:08:51 andy Exp $
CC		= @CC@
INSTALL		= @INSTALL@
INSTALL_BIN	= @INSTALL_PROGRAM@
INSTALL_DATA	= @INSTALL_DATA@
INSTALL_SUID	= @INSTALL_PROGRAM@ -o root -m 4755
RM		= @RM@
LEX		= @LEX@
LEXLIB		= @LEXLIB@
CFLAGS		= @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\"
LDFLAGS		= @LDFLAGS@
MKDEP		= ${CC} -MM
MV		= @MV@
RM		= @RM@
CP		= @CP@

prefix		= @prefix@
exec_prefix	= @exec_prefix@
exec_suffix	= @exec_suffix@
bindir		= @bindir@
libexecdir	= @libexecdir@
sysconfdir	= @sysconfdir@
localstatedir	= @localstatedir@
# Change this later! -- adrian
moduledir	= @prefix@/modules
automoduledir	= @prefix@/modules/autoload

# Local to the etc Makefile
mandir          = @prefix@/man8
MANPAGES        = ircd.8

CONFS		= example.conf example.efnet.conf example.blitzed.conf
DEFAULTCONFS	= ircd.motd kline.conf dline.conf

SSL_LIBS	= @SSL_LIBS@
SSL_INCLUDES	= @SSL_INCLUDES@

IRCDLIBS	= @LIBS@ $(SSL_LIBS)

INCLUDES	= -I../include $(SSL_INCLUDES)
CPPFLAGS	= ${INCLUDES} @CPPFLAGS@
 
install-mkdirs:
	-@if test ! -d $(sysconfdir); then \
		echo "mkdir $(sysconfdir)"; \
		mkdir $(sysconfdir); \
	fi

	-@if test ! -d $(mandir); then \
		echo "mkdir $(mandir)"; \
		mkdir $(mandir); \
	fi

install: install-mkdirs build
	@for i in $(CONFS); do \
		if test -f $(sysconfdir)/$$i; then \
			echo $(MV) $(sysconfdir)/$$i $(sysconfdir)/$$i.old; \
			$(MV) $(sysconfdir)/$$i $(sysconfdir)/$$i.old; \
		fi; \
		echo $(INSTALL_DATA) $$i $(sysconfdir); \
		$(INSTALL_DATA) $$i $(sysconfdir); \
	done

	@for i in $(DEFAULTCONFS); do \
		if test ! -f $(sysconfdir)/$$i; then \
			echo $(INSTALL_DATA) $$i $(sysconfdir); \
			$(INSTALL_DATA) $$i $(sysconfdir); \
		fi; \
	done

	@for i in $(MANPAGES); do \
		if test ! -f $(mandir)/$$i; then \
			echo $(INSTALL_DATA) $$i $(mandir); \
			$(INSTALL_DATA) $$i $(mandir); \
		fi; \
	done

	$(CP) convertconf-example.conf $(sysconfdir)/.convertconf-example.conf

build:

clean:

depend:

lint:

distclean:
	${RM} -f Makefile
