VERSION = 1.3
CC = gcc 
#CFLAGS = -O 
CFLAGS = -g
# Where the client is installed
BINDIR = /usr/local/bin
# where the server is installed
ETCDIR = /usr/local/etc
# where the man pages go.  /man1 will be appended
MANDIR = /usr/local/man
MANEXT = 1
SHELL = /bin/sh

FILES=CHANGES Makefile README TO_FIX messaged.c tell.1 tell.c 

# define SECURE if you want the server to reject messages from
# non-priviliged ports (below 1024)
# DEFINES= -DSECURE

default: tell messaged

tell:	tell.c
	$(CC) $(CFLAGS) $(DEFINES) tell.c -o tell

messaged:	messaged.c
	$(CC) $(CFLAGS) $(DEFINES) messaged.c -o messaged

install: messaged tell
	cp messaged $(ETCDIR)/messaged
	cp tell $(BINDIR)/tell
	cp tell.1 $(MANDIR)/man$(MANEXT)/tell.$(MANEXT)
# comment out the following two lines if you don't want to be able to
# send messages to other "secure" daemons
	chown root $(BINDIR)/tell
	chmod 4711 $(BINDIR)/tell

clean:
	rm -f tell messaged core

shar:
	shar ${FILES} > message.$(VERSION).shar

tar:	
	tar cf message.$(VERSION).tar ${FILES}
	gzip -9 message.$(VERSION).tar
	mv message.$(VERSION).tar.gz /home/ftp/pub/src/message
