NAME	= am.ttp

CFLAGS	= -O2
LDFLAGS	= -o $(NAME) -s
LIBS	= -lpml

# will place things in ~/bin and ~/man
DEST	= /usr/local

$(NAME) : am.c patchlevel.h
	$(CC) $(CFLAGS) am.c $(LDFLAGS) $(LIBS)
	chmod 755 $(NAME)

install: $(NAME)
	@echo "Installing $(NAME) in $(DEST)..."
	cp $(NAME) $(DEST)/bin
#	cp am.sh $(DEST)/bin/$(NAME).sh		# if you want the script
	cp am.1 $(DEST)/man/man1/$(NAME).1

example:
	@echo "Checking example 1..."
	example.1 | diff output.1 -
	@echo "Checking example 2..."
	example.2 | diff output.2 -
	@echo "Checking example 3..."
	example.3 | diff output.3 -
	@echo "If there is no output from diff, the tests verified."

shar:
	shar `cat MANIFEST` > shar.am
