#
# Minimal makefile for 'sfingerd'
#   Safe & Small finger daemon replacement
#      by Laurent Demailly
#	<dl@hplyot.obspm.fr>
# see README

VERS = 1.8

# add -DNO_STRERROR on OS without strerror() [SunOS for instance]
#CFLAGS=-O -s -DNO_STRERROR


# To change default compiler
#CC=gcc

RM = rm -f

LDFLAGS= $(CFLAGS)

OBJECTS= sfingerd.o
TARGET = fingerd

warning:
	@echo "Carefully Read & Edit sfingerd.c FIRST, then 'make fingerd'"
	@echo "Then setup the CHROOT_PATH directory or use 'make-files' script,"
	@echo "only then you can change the inetd.conf to make use of this new"
	@echo "safe fingerd... do some tests, look at your syslog to check..."

$(TARGET):  $(OBJECTS)
	$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS)

sfingerd: fingerd
	@echo "done"

tgz: clean
	rm -f CHECKSUMS.asc
	md5sum * > ../CHECKSUMS
	mv ../CHECKSUMS .
	pgp -asw CHECKSUMS
	chmod 444 CHECKSUMS.asc
	cd .. ; tar cvf sfingerd-$(VERS).tar sfingerd-$(VERS) ; gzip sfingerd-$(VERS).tar

clean:
	$(RM) $(OBJECTS) $(TARGET) core *~
