#
# Makefile for eep .newsrc editor
#
# The following flags are important:
#  UNIX   - compiles UNIX version of code 
#  DIRENT - does your system have dirent.h?
#           See eep.h -- you might need to change path to sys/dirent.h
#  ANSI   - Try to follow ANSI conventions
#
# Note that if you build EEP! this makefile will send a very brief
# message to the author.  If you don't want to do this, just delete
# those lines.  It will help me to know how EEP! is spreading.
#
# For NNTP (or INND) support, you must have the source code
# for an NNTP client available on your system, and the path
# to the compiled client object file.  If you don't want
# NNTP, the following few lines should be commented out.
#
#NNTPDEF=-DNNTP
#NNTPSRC=/wren1/src/News/nntp-1.5.11/common
#NNTPCLIENT=$(NNTPSRC)/clientlib.o
#NNTPINCL=-I$(NNTPSRC)

CC=cc
#CC=gcc
 
# On SunOS 4.x systems you will need the following
#LIBS=-lcurses -L/usr/5lib -ltermcap
#HDRS=-I/usr/5include -I/usr/include $(NNTPINCL)

# Standard UNIX systems use the following
LIBS=-lcurses

# Some systems (e.g. ISC V.3) keep networking in this library.
# This is only needed if you require NNTP.
#LIBS=-lcurses  -linet

HDRS=$(NNTPINCL)
 
CCFLAGS=-O -DUNIX -DDIRENT -DANSI $(NNTPDEF) $(HDRS)

HDR=eep.h

eep:		eepmain.o eepmisc.o eepmenu.o eepview.o 
		$(CC) -o eep eepmain.o eepmisc.o eepmenu.o \
                    eepview.o $(NNTPCLIENT) $(LIBS)
		strip eep
		echo "Telling Paul Gillingwater that EEP! 1.9 compiled OK!"
		echo Built eep on `uname -a` | mail paul@actrix.co.at

eepmain.o:	eepmain.c $(HDR)
		$(CC) $(CCFLAGS) -c eepmain.c

eepmisc.o:	eepmisc.c $(HDR)
		$(CC) $(CCFLAGS) -c eepmisc.c

eepmenu.o:	eepmenu.c $(HDR)
		$(CC) $(CCFLAGS) -c eepmenu.c

eepview.o:	eepview.c $(HDR)
		$(CC) $(CCFLAGS) -c eepview.c

shar:
		shar README eepmain.c eepmenu.c eepmisc.c eepview.c \
		    makefile.dos makefile.unx eep.h eep.1 ndir.h > eep.shar

tar:
		tar cvf eep.tar README eepmain.c eepmenu.c eepmisc.c eepview.c \
		    makefile makefile.dos makefile.unx eep.h eep.1 ndir.h
