#
# Makefile for lsat program
#

SOURCES.c= lsatmain.c dostuff.c checkpkgs.c checkrpm.c checkinetd.c checkhostsfiles.c checkset.c checkwrite.c checkdotfiles.c checkpasswd.c checkfiles.c checkumask.c checkftpusers.c checkrc.c checkkbd.c checklimits.c checkssh.c checknetforward.c checknet.c checkcfg.c checkopenfiles.c checkissue.c checkwww.c checkmodules.c checkmd5.c checksecuretty.c checkrcperms.c
INCLUDES=
CFLAGS=
SLIBS=
PROGRAM= lsat
INSTALL = /usr/bin/install -c
prefix = @prefix@
BINDIR = @bindir@
DATADIR = @datadir@
MANDIR = @mandir@

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

.KEPP_STATE:

debug := CFLAGS= -g

all debug: $(PROGRAM)

install:
	$(INSTALL) -d $(DESTDIR)$(BINDIR)
	$(INSTALL) $(PROGRAM) $(DESTDIR)$(BINDIR)

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

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

cleanall:
	rm -f $(PROGRAM) $(OBJECTS) Makefile config.*  lsat.old lsatmd5.out lsatmd5.old

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:
	$(INSTALL) -d $(DESTDIR)$(MANDIR)/man1
	$(INSTALL) $(PROGRAM).1 $(DESTDIR)$(MANDIR)/man1/
