-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (51 loc) · 2.38 KB
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
STRAIGHTEN_C=src/straighten/straighten.c src/common/util.c src/common/debug.c
STRAIGHTEN_H=src/common/debug.h src/common/util.h src/common/argboiler.h src/straighten/argboiler_args.h
STRAIGHTEN_O=-o bin/straighten
TIFFLOAD_C=src/db/tiffload.c src/common/util.c src/common/debug.c
TIFFLOAD_H=src/common/debug.h src/common/util.h src/common/argboiler.h
TIFFLOAD_O=-o bin/tiffload
SVD_C=src/svd/svd.c src/common/util.c src/common/debug.c
SVD_H=src/common/debug.h src/common/util.h src/common/argboiler.h
SVD_O=-o bin/svd
SAMPLER_C=src/sampler/sampler.c src/common/util.c src/common/debug.c
SAMPLER_H=src/common/debug.h src/common/util.h src/common/argboiler.h
SAMPLER_O=-o bin/sampler
DIMENSIONS_C=src/dimensions/dimensions.c src/common/util.c src/common/debug.c
DIMENSIONS_H=src/common/debug.h src/common/util.h src/common/argboiler.h
DIMENSIONS_O=-o bin/dimensions
GCCOPTS=-lg2 -lgd -lm -lX11 -lXext -largtable2 -lgsl -lgslcblas -lrt -lfftw3 -ltiff -lpng -lpq -lSDL /usr/lib/svdlibc/libsvd.a
DEBUGOPTS=-DNO_PROGRESS_BARS -g -O3
OPTOPTS=-mtune=native -march=native -O3 -DGSL_RANGE_CHECK_OFF
all: bin/straighten
bin/straighten: Makefile $(STRAIGHTEN_C) src/straighten/initial_guess.c src/straighten/refine_backbone.c src/straighten/restack.c $(STRAIGHTEN_H)
gcc $(OPTOPTS) $(STRAIGHTEN_C) $(GCCOPTS) $(STRAIGHTEN_O)
bin/tiffload: Makefile $(TIFFLOAD_C) $(TIFFLOAD_H)
gcc $(OPTOPTS) $(TIFFLOAD_C) $(GCCOPTS) $(TIFFLOAD_O)
bin/dimensions: Makefile $(DIMENSIONS_C) $(DIMENSIONS_H)
gcc $(OPTOPTS) $(DIMENSIONS_C) $(GCCOPTS) $(DIMENSIONS_O)
bin/svd: Makefile $(SVD_C) $(SVD_H)
gcc $(DEBUGOPTS) $(SVD_C) $(GCCOPTS) $(SVD_O)
bin/sampler: Makefile $(SAMPLER_C) $(SAMPLER_H)
gcc $(OPTOPTS) $(SAMPLER_C) $(GCCOPTS) $(SAMPLER_O)
.PHONY : noprogress
noprogress: Makefile $(STRAIGHTEN_C) $(STRAIGHTEN_H)
gcc -DNO_PROGRESS_BARS $(OPTOPTS) $(STRAIGHTEN_C) $(GCCOPTS) $(STRAIGHTEN_O)
.PHONY : debug_straighten
debug_straighten:
gcc $(DEBUGOPTS) $(STRAIGHTEN_C) $(GCCOPTS) $(STRAIGHTEN_O)
echo "run $(RUNOPTS)" > gdb.tmp
gdb -x gdb.tmp bin/straighten
rm gdb.tmp
.PHONY : ddd_straighten
ddd_straighten:
gcc $(DEBUGOPTS) $(STRAIGHTEN_C) $(GCCOPTS) $(STRAIGHTEN_O)
ddd --gdb bin/straighten
.PHONY : profile_straighten
profile_straighten:
gcc $(OPTOPTS) -g -pg $(STRAIGHTEN_C) $(GCCOPTS) $(STRAIGHTEN_O)
bin/straighten $(RUNOPTS)
gprof bin/straighten gmon.out | less
rm gmon.out
.PHONY : clean
clean:
rm -f gdb.tmp bin/straighten