#
# Makefile for lsat program
#

SOURCES.c= lsatmain.c checkpkgs.c checkinetd.c checkhostsfiles.c checkset.c checkwrite.c checkdotfiles.c checkpasswd.c checkfiles.c checkumask.c checkftpusers.c checkrc.c checknet.c
INCLUDES=
CFLAGS=
SLIBS=
PROGRAM= lsat
INSTALL = /usr/bin/install -c
prefix = /usr/local

OBJECTS= $(SOURCES.c:.c=.o)

.KEPP_STATE:

debug := CFLAGS= -g

all debug: $(PROGRAM)

install:
	$(INSTALL) $(PROGRAM) $(prefix)/bin

$(PROGRAM): $(INCLUDES) $(OBJECTS) 
	$(LINK.c) -o $@ $(OBJECTS) $(SLIBS)

clean:
	rm -f $(PROGRAM) $(OBJECTS) Makefile

manpage:
	pod2man $(PROGRAM).pod > $(PROGRAM).tmp
	sed 's/perl v5.6.1/LSAT/g' $(PROGRAM).tmp| \
sed 's/Perl/LSAT/g'\
> $(PROGRAM).1
	rm -f  $(PROGRAM).tmp
	cp -vf $(PROGRAM).1 debian/manpage.1.ex	

installman:
	cp $(PROGRAM).1 $(prefix)/man/man1/
