# Makefile for the Anonymous Contact Service software
#
# Dependencies:
#	all	builds the entire ACS software suite
#	clean	removes .o files, core files, and clobbers the mailer directory
#	clobber	removes all binaries in addition to cleaning
#	newacs	destroys the existing aliases data base (VERY DANGEROUS)
#
#	To build the ACS software, type "make all" followed by
#	"make clean". You should be root when you build it to get
#	the permissions right.
#
#	To restart the system after offline testing, type "make newacs",
#	NEVER EVER run "make newacs" in a live system. It destroys the
#	aliases database and the aliases-index file.
#
# Dave Mack
# csu@alembic.ACS.COM
#

CFLAGS = -O

BINARIES = anon-post anon-reply anon-ping acsmail

all: $(BINARIES)

anon-post: anon-post.o
	cc -o anon-post anon-post.o
	chmod u+s anon-post

anon-ping: anon-ping.o
	cc -o anon-ping anon-ping.o
	chmod u+s anon-ping

anon-reply: anon-reply.o
	cc -o anon-reply anon-reply.o
	chmod u+s anon-reply

acsmail:
	(cd mailer; make -f Makefile.acs install; make -f Makefile.acs clobber)

clean:
	rm -f *.o core
	(cd mailer; make -f Makefile.acs clobber)

clobber: clean
	rm -f $(BINARIES)

newacs:
	rm -f real2alias.* alias-index
	@echo "You need to edit /usr/lib/aliases by hand and run newaliases"
