###############################################################################
#                    Internetting Cooperating Programmers
# -----------------------------------------------------------------------------
#
#  ____    PROJECT
# |  _ \  __ _ _ __   ___ ___ _ __ 
# | | | |/ _` | '_ \ / __/ _ \ '__|
# | |_| | (_| | | | | (_|  __/ |   
# |____/ \__,_|_| |_|\___\___|_|   the IRC bot
#
# All files in this archive are subject to the GNU General Public License.
#
# $Source: /cvsroot/dancer/dancer/Makefile,v $
# $Revision: 1.1.1.1 $
# $Date: 2000/11/13 02:42:36 $
# $Author: holsta $
# $State: Exp $
# $Locker:  $
#
# -----------------------------------------------------------------------------
###############################################################################

PRG = dancer

all: src/config.h
	(cd src; make debug)

src/config.h:
	(cd src; ./configure; cd ..; /bin/sh fplcheck)

configure:
	(cd src; ./configure; cd ..; /bin/sh fplcheck)

install:
	# /bin/sh installbot
	install -m 755 -D -o root -g root dancer $(DESTDIR)/usr/bin/dancer-bot
	install -m 755 -D -o root -g root installbot $(DESTDIR)/usr/share/dancer-bot/installbot

tgz:
	@(dir=`pwd`;name=`basename $$dir`;echo Creates $$name.tar.gz; cd .. ; \
	tar -cf $$name.tar `cat $$name/FILES | sed "s:^dancer/:$$name/:g"` ; \
	gzip $$name.tar ; chmod a+r $$name.tar.gz ; mv $$name.tar.gz $$name/)

lha:
	@(dir=`pwd`;name=`basename $$dir`;echo Creates $$name.lha; cd .. ; \
	cat $$name/FILES | sed "s:^dancer/:$$name/:g" | lha a $$name.lha ; \
	chmod a+r $$name.lha ; mv $$name.lha $$name/)
clean:
	(cd src && make clean)
	rm -f dancer
	find ./ -name '*.rej'|xargs rm -f
	find ./ -name '*.orig'|xargs rm -f

