CFLAGS= -g
.PHONY: bin
all: bin points lines plines ro viewgrids
LIST= points lines plines ro dv tv
bin:
	if [ ! -d ../bin ]; then mkdir ../bin; fi

ro: ro.o
	gcc -o ro ro.o
	cp ro ../bin/ro
points: points.o minmax.o
	gcc -o points points.o minmax.o -lm
	cp points ../bin/points

lines: lines.o minmax.o
	gcc -o lines lines.o minmax.o -lm
	cp lines ../bin/lines

plines: plines.o minmax.o
	gcc -o plines plines.o minmax.o -lm
	cp plines ../bin/plines

points.o: points.c minmax.h
	gcc -g -c points.c
lines.o: lines.c minmax.h
	gcc -g -c lines.c
plines.o: plines.c minmax.h
	gcc -g -c plines.c
minmax.o: minmax.c minmax.h
	gcc -g -c minmax.c
depend:

clean:
	rm -f *.o core ro points lines plines tv dv Makefile.bak

include ../default.mk
CFLAGS   = -g -I. -Wall -I../include
LDFLAGS +=
LDLIBS  += -lm

SRCS1= $(MESH) $(LIBS) $(KERN) diffp.c
OBJS1=$(SRCS1:.c=.o)
SRCS2= $(MESH) $(LIBS) $(KERN) tri.c
OBJS2=$(SRCS2:.c=.o)

viewgrids: dv tv
dv : $(OBJS1)
	gcc -o dv $(OBJS1)  -lm
	cp dv ../bin/dv
tv : $(OBJS2)
	gcc -o tv $(OBJS2)  -lm
	cp tv ../bin/tv
