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

CSPECIAL =

CC = @CC@
CFLAGS = @CPPFLAGS@ @CFLAGS@ @DEFS@ $(CSPECIAL)
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@

RM = 'rm'

# --- Nothing below needs to be changed

PRG = ../dancer
DEPEND = .depends

OBJS = dancer.o function.o server.o command.o ctcp.o netstuff.o \
       user.o explain.o seen.o country.o regex.o bans.o transfer.o \
       setup.o tell.o list.o language.o parse.o flood.o ourcrypt.o \
       link.o servfunc.o fplrun.o convert.o news.o strio.o trio.o
SRCS = $(OBJS:%.o=%.c)
HDRS = $(OBJS:%.o=%.h)

all: config.h $(PRG)

config.h:
	(cd ..; $(MAKE) configure)

debug:
	$(MAKE) CSPECIAL="-g -DRCS -DDEBUG" $(PRG)

ddebug:
	$(MAKE) CSPECIAL="-g -DDBUG" $(PRG)

profile:
	$(MAKE) CSPECIAL="-g -p -DPROFILING" LSPECIAL="-p" $(PRG)

$(PRG): $(OBJS)
	$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PRG)

$(DEPEND):
	$(CC) -MM $(CFLAGS) $(SRCS) > $(DEPEND)

touch:
	touch $(HDRS)

clean:
	-$(RM) $(OBJS) 2>/dev/null

veryclean: clean
	-$(RM) config.cache config.log config.h config.status $(DEPEND) 2>/dev/null

tgz:
	(cd .. ; tar -cf $(PRG).tar `cat $(PRG)/FILES` ; \
	gzip $(PRG).tar ; chmod a+r $(PRG).tar.gz ; mv $(PRG).tar.gz $(PRG)/)

lha:
	(cd .. ; cat $(PRG)/FILES | lha a $(PRG).lha ; mv $(PRG).lha $(PRG)/)


# Dependencies
include $(DEPEND)
