-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
49 lines (34 loc) · 1.07 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
### Makefile that delegates building either to cmake or legacy Makefile
### Cmake is default, if you don't want to use CMake, you can do make legacy
### ( or move this file and rename Makefile.legacy to Makefile,
### or modify the all/clean/install targets below )
###
.PHONY: all configure clean cleaner install legacy legacy-clean legacy-install cmake-build cmake-clean cmake-install
all: cmake-build
clean: cmake-clean
install: cmake-install
### TODO add doxygen into CMakelists
doc: legacy-doc
cmake-build: build/Makefile
@+make -C ./build
legacy-doc:
@make -f Makefile.legacy doc
legacy:
@+make -f Makefile.legacy
legacy-clean:
@make -f Makefile.legacy clean
legacy-install:
@make -f Makefile.legacy install
configure: build/Makefile
@ccmake . build
cmake-install:
@make -C ./build install
build/Makefile:
@echo "Setting up cmake build. Use "make legacy" to use legacy Makefile"
@mkdir -p build
@cd build && cmake ../
distclean:
@echo "Removing cmake directory"
@rm -rf build
cmake-clean: build/Makefile
@make -C ./build clean