CC = gcc
AR = ar

CFLAGS = -O2

OBJS= dict.o geom.o memalloc.o mesh.o normal.o priorityq-heap.o \
	 priorityq.o render.o sweep.o tess.o tessmono.o


all:
		@echo "Choose one of following actions:"
		@echo
		@echo " make sgi-libtess - will build the tessellation-lib from SGI"
		@echo
		@echo " make clean	  - will clean up object and lib files"
		@echo


sgi-libtess:	dep $(OBJS)
		$(AR) crl libtess.a $(OBJS)

clean:
		rm -f $(OBJS) libtess.a .depend *~

dep:
		$(CC) -E -M $(CFLAGS) *.c > .depend

%.o: 		%.c	
		$(CC) $(CFLAGS) -c $< -o $@

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