#SccsId 	= "@(#)Makefile 4.2 (TU-Delft) 11/26/92"

include ../Config.mk

LIBS		= ../aux/aux.a

MODULE		= spider

CSRCS		= RecogM.c dogreen.c spider.c \
		  spiderTile.c spiderPair.c strip.c cap3d.c edge.c mesh.c \
		  face.c matherr.c pqueue.c spUtil.c refine.c triangulate.c
OBJS 		= RecogM.o dogreen.o spider.o spiderPair.o \
		  spiderTile.o strip.o cap3d.o edge.o mesh.o \
		  face.o matherr.o pqueue.o spUtil.o refine.o triangulate.o


HDRS		= define.h extern.h export.h recog.h
SRCS    	= $(CSRCS) $(HDRS)

TARGET  	= space.o

.c:
	$(CC) -DDRIVER $(CFLAGS) $*.c $(LDFLAGS) $(LIBS) -o $*

$(TARGET): $(OBJS)
	ld -r -o $@ $(OBJS)

install: $(TARGET)
	@true

LINT:   $(CSRCS) $(HDRS)
	$(LINT) $(LINTFLAGS) $(CSRCS) > $@

clean:; rm -f $(OBJS) tags $(TARGET) core LINT
tags:	$(SRCS);  ctags $(SRCS)
list:;	@for i in $(SRCS) ; do echo $$i; done
cflow:  $(SRCS)
	cflow $(CFLAGS) $(CSRCS) > $@
cextract:; $(CEXTRACT) -o extern.h -H_extern_h_ -S +cP $(CSRCS)
proto:; $(CPROTO) $(CSRCS)

# $(OBJS): $(HDRS)

files:	$(SRCS); @true

$(SRCS):
	-@[ $(TESTLINK) $@ ] || ln -s SRC/$@ .; \
	cd SRC ; [ -f $@ ] || get -s SCCS/s.$@;
#EOF
