-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
executable file
·62 lines (48 loc) · 914 Bytes
/
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
define usage
[MAKE TARGETS]:
deps:
Install dependencies
ba:
Build repo
unittest:
Build and run unittest
run:
Run bundle adjustment solver
plot:
Plot results
clean:
Clean build and bin directories
endef
export usage
.PHONY: ba deps unittest run clean
default:
@echo "$$usage"
deps:
@echo "Installing dependencies ..."
@sudo apt-get update
@sudo apt-get install -qqq \
libblas-dev \
liblapack-dev \
liblapacke-dev \
libeigen3-dev \
octave
ba:
@make -s -C ba/c
@echo ""
@make -s -C ba/cpp
unittest: ba
@echo "Running unittests"
@cd ba/c/bin && ./test_ba
@cd ba/cpp/bin && ./test_ba
run: ba
@cd ba/cpp/bin && ./ba_solver ./data_noisy
plot: ba run
@cd ba/cpp/bin && octave-cli sim_plot.m
runc: ba
@cd ba/c/bin && ./ba_solver ./data_noisy
clean:
@echo "Cleaning repo..."
@make -s -C ba/c clean
@make -s -C ba/cpp clean
@echo "Done!"
@echo ""