#
# Makefile for irchat
#
# $Id: Makefile,v 1.7 1994/02/23 15:05:00 tmo Exp $
#

#
# If you don't have jwz's optimizing byte-compiler, uncomment the following
# lines.  A better idea would be to get it from archive.cis.ohio-state.edu
# in the file pub/gnu/emacs/elisp-archive/packages/bytecomp.tar.Z. It also
# comes with emacs19
#
DEFSUBST_SRC=  defsubst.el
# DEFSUBST_BIN=  defsubst.elc
# DEFSUBST_LOAD= -l ./$(DEFSUBST_BIN)

EMACS	= emacs
TAR	= gtar
CC 	= gcc
LD	= $(CC)

# LDFLAGS for DCC 
# Sparc-Solaris2.3 & other SVR4?
LDFLAGS	= -lgen -lnsl -lsocket
# BSD 4.3, Solaris 1.1, Ultrix &c
# LDFLAGS	=
#
# You shouldn't need to change anything after this point.

SOURCE = 	irchat-inlines.el	\
		irchat-globals.el	\
		irchat-filter.el	\
		irchat-copyright.el	\
		irchat-vars.el		\
		gnus-caesar.el		\
		irchat-commands.el	\
		irchat-handle.el	\
		irchat.el 

all: irchat dcc doc

dcc:	dcc.o
	$(LD) -o $@ dcc.c $(LDFLAGS)

irchat:	
	$(EMACS) -batch -q -l ./setpath.el -f batch-byte-compile  $(DEFSUBST_SRC) $(SOURCE)

doc:	irchat.texinfo
	$(EMACS) -batch -q irchat.texinfo \
		 -f texinfo-format-buffer -f save-buffer

clean: 
	-rm -f *.elc irchat dcc.o dcc

EXTRAS = 	Makefile irchat.texinfo irchat-hooks.el		\
		dcc.c irchat-dcc.el 				\
		irchat-oldrevisions.el defsubst.el setpath.el

dist:	$(SOURCE) $(EXTRAS)
	$(TAR) cf irchat-`date +%d.%b.%Y`.tar $(SOURCE) $(EXTRAS)
	compress irchat-`date +%d.%b.%Y`.tar
