File: Makefile

package info (click to toggle)
pcb-rnd 3.1.7b-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,108 kB
  • sloc: ansic: 213,400; yacc: 6,241; sh: 4,698; awk: 3,016; makefile: 2,254; lex: 1,166; python: 519; xml: 261; lisp: 154; tcl: 67; perl: 34; javascript: 6; ruby: 5
file content (39 lines) | stat: -rw-r--r-- 997 bytes parent folder | download
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