1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#CFLAGS_DBG=-Wall -O0 -g3
#CFLAGS_COORDT=-DCDT_COORD_T=double -Dcdt_precision=1000000.0
LIBRND_PREFIX=/usr/local
CFLAGS=$(CFLAGS_DBG) $(CFLAGS_COORDT) $(CFLAGS_LIBCDTR) -I. -I.. -I../.. -I$(LIBRND_PREFIX)/include/librnd4/librnd/src_3rd
LDFLAGS=-lm $(LDFLAGS_LIBCDTR)
OBJS= cdt.o point.o edge.o triangle.o debug.o
LIBA=libcdtr.a
DEP_OBJS=$(OBJS)
cdt_test: cdt_test.o $(OBJS)
include Makefile.dep
include Makefile.comp
$(LIBA): $(OBJS)
@touch $(LIBA)
@rm $(LIBA)
@ar ru $(LIBA) $(OBJS)
-ar s $(LIBA)
-ranlib $(LIBA)
cdt_test.o: cdt_test.c
$(CC) $(CFLAGS) -c cdt_test.c -o $@
test:
cd regression && ./Test.sh
# not portable; run this only if you have gcc installed
dep:
for o in $(DEP_OBJS); do gcc -MT $$o -MM $${o%%.o}.c $(CFLAGS); done > Makefile.dep
for o in $(DEP_OBJS); do echo "$$o: $${o%%.o}.c"; echo ' $$(CC) $$(CFLAGS) -c -o ' "$$o $${o%%.o}.c"; echo ""; done > Makefile.comp
clean:
-touch $(LIBA) $(OBJS) cdt_test.o cdt_test
-rm $(LIBA) $(OBJS) cdt_test.o cdt_test
|