forked from leovandriel/caffe2_cpp_tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (25 loc) · 994 Bytes
/
Makefile
File metadata and controls
36 lines (25 loc) · 994 Bytes
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
# Proxy to CMake
all:
@test -f build/Makefile || (mkdir -p build && cd build && cmake .. && cd .. && ./script/download_resource.sh); cd build && make
debug:
@rm -rf build && mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && cd ..
verbose:
cd build && make VERBOSE=1
clean:
@rm -rf build
purge:
@rm -rf build
@rm -rf bin
@rm -rf res
@rm -rf tmp
@rm -rf include/res
test: all
@find bin -regex "bin/[a-z]*" -type f -exec ./{} \;
# for filename in bin/*; do;./${filename}|diff test/$(echo ${filename} | cut -d/ -f2).log -;done
output: all
@find bin -regex "bin/[a-z]*" -type f -exec bash -c './{} > test/$(echo {} | cut -d/ -f2).log' \;
format:
@find . -iname "*.h" -o -iname "*.cc" -o -iname "*.cu" | xargs clang-format --style=Google -i
# for i in "LLVM" "Google" "Chromium" "Mozilla" "WebKit"; do; git reset --hard; echo $i; find . -iname "*.h" -o -iname "*.cc" | xargs clang-format --style=$i -i; git diff --shortstat | cat; done
%:
cd build && make $@