NAME=s.qcount

PGM=$(BIN_CONTRIB_CMD)/$(NAME)
#PGM=$(NAME)

MSEC=4
MDIR=$(SRC)/../man/man$(MSEC)
MUTL=$(SRC)/../man/utilities
 
TUTORIAL = s.qcount-tutorial

SOURCE = \
	count.c \
	findquads.c \
	indices.c \
	main.c \
	readsite.c 

LIST = \
	count.o \
	findquads.o \
	indices.o \
	main.o \
	readsite.o 

LIBES= $(GISLIB) $(DATETIMELIB) $(MATHLIB) 

#all: $(PGM) man hello

$(PGM): $(LIST) $(LIBES)
	$(CC) $(LDFLAGS) -o $@ $(LIST) $(LIBES) $(XDRLIB)
 
man:  
	-cp $(NAME).man $(MDIR)/$(NAME)
	nroff $(MUTL)/man.version $(MDIR)/.class-header \
	$(MUTL)/man.header $(NAME).man $(MDIR)/.class-notice \
	> $(GISBASE)/man/$(MSEC)/$(NAME)

manps:  
	troff -Tpsc $(MUTL)/man.version $(MDIR)/.class-header \
	$(MUTL)/man.header $(NAME).man $(MDIR)/.class-notice \
	| psdit > $(NAME).ps

hello:
	cat README
 
lint:
	lint $(CFLAGS) $(SOURCE)
 
clean: 
	-rm -f *.BAK core *~ s.qcount tags s.qcount.cat
 
realclean: clean
	-rm -rf OBJ* 
	$(GMAKE) tutorial realclean
 
veryclean: realclean
 
dist: veryclean
	(cd .. ; tar cvf s.qcount.tar s.qcount; gzip s.qcount.tar; mv s.qcount.tar.gz /home/pasture/ftp/pub/mccauley/grass)

count.o: s_struct.h quaddefs.h 
findquads.o: s_struct.h quaddefs.h 
indices.o: s_struct.h quaddefs.h 
main.o: s_struct.h quaddefs.h 
readsite.o: s_struct.h quaddefs.h 

$(LIBES): #
