-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (37 loc) · 1.13 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
# iSAM Makefile
# providing shortcuts to cmake for building outside the source tree
# Michael Kaess, 2010
# default parameters, including multi-core building
make = make -j 4 -C build --no-print-directory
# creates isam libraries and isam binary
all: build build/Makefile
@$(make)
# generate documentation (requires doxygen and graphviz)
.PHONY: doc
doc:
@doxygen doc/doxygen/isam.dox
# remove all generated files and directories
.PHONY: distclean
distclean:
@rm -rf build doc/html lib bin release
@find . -name CMakeFiles |xargs rm -rf # clean up in case "cmake ." was called
@find . -name cmake_install.cmake -delete
@find . -name CMakeCache.txt -delete
# internal target: the actual build directory
build:
@mkdir -p build bin lib include
# internal target: populate the build directory
build/Makefile:
cd build && cmake ..
# create all executables in the examples/ directory
.PHONY: examples
examples:
@$(make) examples
# create all executables in the misc/ directory
.PHONY: misc
misc:
@$(make) misc
# default target: any target such as "clean", "example"...
# is simply passed on to the cmake-generated Makefile
%::
@$(make) $@