#
# Makefile for slurp
#

# C compiler
CC=cc

# C compilation flags
CFLAGS= -O -Xa -I/usr/local/src/cnews/dbz

# Loader flags
LDFLAGS=

# Libraries needed
LIBS= /usr/local/src/cnews/dbz/dbz.o -lnsl -lsocket

# If you don't have syslog then uncomment these two lines
#FAKESRC=fakesyslog.c
#FAKEOBJ=fakesyslog.o


# Everything else probably doesn't need changing

SOURCE = slurp.c newnews.c articles.c history.c time.c sockets.c misc.c \
	 space.c ${FAKESRC}

OBJECT = slurp.o newnews.o articles.o history.o time.o sockets.o misc.o \
	 space.o ${FAKEOBJ}

MANIFEST = README slurp.c newnews.c articles.c history.c time.c sockets.c \
	   misc.c space.c fakesyslog.c conf.h slurp.h nntp.h fakesyslog.h \
	   Makefile slurp.sys slurp.tim slurp.1


slurp: ${OBJECT}
	${CC} ${LDFLAGS} ${OBJECT} -o slurp ${LIBS}

slurp.o: slurp.c slurp.h conf.h nntp.h
newnews.o: newnews.c slurp.h conf.h nntp.h
articles.o: articles.c slurp.h conf.h nntp.h
history.o: history.c slurp.h conf.h nntp.h
time.o: time.c slurp.h conf.h
sockets.o: sockets.c slurp.h conf.h nntp.h
misc.o: misc.c slurp.h conf.h
space.o: space.c slurp.h conf.h
fakesyslog.o: fakesyslog.c slurp.h conf.h

lint:
	lint -p ${CFLAGS} ${SOURCE} > slurp.lint

clean:
	-rm -f *.o slurp

shar:
	shar ${MANIFEST} > slurp.shar

taz:
	tar -cf - ${MANIFEST} | compress > slurp.tar.Z

# END-OF-FILE
