-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
72 lines (50 loc) · 1.37 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
63
64
65
66
67
68
69
70
71
BldPath=bld
ScanBldPath=clang
ScanRptPath=$(ScanBldPath)/report
SCAN_BUILD=scan-build -o $(PWD)/$(ScanRptPath)
CMakeExe=cmake
CMAKE=$(CMakeExe)
GODO=$(CMakeExe) -E chdir
MKDIR=$(CMakeExe) -E make_directory
CTAGS=ctags
.PHONY: default all release cmake proj \
test analyze tags \
clean-analyze clean distclean \
update pull
default:
if [ ! -d $(BldPath) ] ; then $(MAKE) cmake ; fi
$(MAKE) proj
all:
$(MAKE) cmake
$(MAKE) proj
release:
$(MAKE) CMAKE="$(CMakeExe) -D CMAKE_BUILD_TYPE:string=RELEASE" cmake
$(MAKE) CMAKE="$(CMakeExe) -D CMAKE_BUILD_TYPE:string=RELEASE" proj
snappy:
$(MAKE) CMAKE="$(CMakeExe) -D CMAKE_BUILD_TYPE:string=RelWithDebInfo" cmake
$(MAKE) CMAKE="$(CMakeExe) -D CMAKE_BUILD_TYPE:string=RelWithDebInfo" proj
debug:
$(MAKE) CMAKE="$(CMakeExe) -D CMAKE_BUILD_TYPE:string=DEBUG" cmake
$(MAKE) CMAKE="$(CMakeExe) -D CMAKE_BUILD_TYPE:string=DEBUG" proj
cmake:
if [ ! -d $(BldPath) ] ; then $(MKDIR) $(BldPath) ; fi
$(GODO) $(BldPath) $(CMAKE) ..
proj:
$(GODO) $(BldPath) $(MAKE)
test:
$(GODO) $(BldPath) $(MAKE) test
analyze:
rm -fr $(ScanRptPath)
$(MAKE) 'BldPath=$(ScanBldPath)' 'CMAKE=$(SCAN_BUILD) cmake' 'MAKE=$(SCAN_BUILD) make'
tags:
$(CTAGS) -R src
clean-analyze:
rm -fr $(ScanBldPath)
clean:
$(GODO) $(BldPath) $(MAKE) clean
distclean:
rm -fr $(BldPath) $(ScanBldPath) tags
update:
git pull origin trunk
pull:
git pull origin trunk