blob: a9366e4f23bb5e1189f49ba28bdfead34fa228ae (
plain)
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
|
CC = clang
CFLAGS = -g -Os -O3 -Wall -fno-strict-aliasing -Wstrict-overflow -Wno-missing-field-initializers -fPIC -flto -march=native #-fopenmp
LDFLAGS = -lc -lcblas -llapack -ldl -lpthread -lcholmod -lamd -lcolamd -lsuitesparseconfig -lcamd -lccolamd -lm -lrt -lmetis -lgsl -lprofiler -ltcmalloc
OBJ = data bound_set correlations graph_genfunc net_create net_copy net_free get_dual_clusters break_edge graph_components gen_laplacian geometry net_fracture get_current update_factor gen_voltcurmat graph_create graph_free fortune/edgelist fortune/geometry fortune/heap fortune/main fortune/output fortune/voronoi fortune/memory get_conductivity net_notch
BIN = corr_test fracture
all: opt ${OBJ:%=obj/%.o} ${BIN:%=obj/%.o} ${BIN:%=bin/%}
opt:
@echo build options:
@echo "CC = ${CC}"
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
obj/%.o: src/%.c
@echo CC -c -o $@
@${CC} -c -o $@ $< ${CFLAGS}
bin/%: obj/%.o ${OBJ:%=obj/%.o}
@echo CC -o $@
@${CC} -o $@ $< ${OBJ:%=obj/%.o} -fuse-ld=gold ${CFLAGS} ${LDFLAGS}
clean:
@echo cleaning:
@echo rm -f ${OBJ:%=obj/%} ${BIN:%=obj/%.o} ${BIN:%=bin/%}
@rm -f ${OBJ:%=obj/%.o} ${BIN:%=obj/%.o} ${BIN:%=bin/%}
.PHONY: all clean
|