# Select one of two following combinations to enable or disable
# mouse support through GPM

GPM_SUPPORT = 1   # GPM support included
GPM_LIB = -lgpm

#GPM_SUPPORT=0   # No GPM support
#GPM_LIB =

#------------------------------------------------------------------
# Select a directories for binaries and man pages
BINDIR = /usr/bin
MANDIR = /usr/man/man1

# BINDIR = /usr/local/bin
# MANDIR = /usr/local/man/man1


#------------------------------------------------------------------
# Select compressed/uncompressed format of man page
# By default the Makefile script will try to guess 

#ZIPPED_MAN = 1
#ZIPPED_MAN = 0


#------------------------------------------------------------------
# You probably don't need to change anything below this line

all: install

clean:
	rm *.o *.bak .depend.src core *.ASV 


install: install.bin install.man

install.bin: sadp
	install -d $(BINDIR)
	install sadp $(BINDIR)


ifndef ZIPPED_MAN
ifeq ($(shell echo /usr/man/man?/*.gz), /usr/man/man?/*.gz)
        ZIPPED_MAN=0
else
        ZIPPED_MAN=1
endif
endif
	
install.man: 
	install -d $(MANDIR)
ifeq ($(ZIPPED_MAN), 1)
	gzip -c sadp.1 > $(MANDIR)/sadp.1.gz
else
	install  sadp.1 $(MANDIR)
endif


ifeq (.depend.src,$(wildcard .depend.src))
include .depend.src
endif



