forked from microsoft/CCF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (48 loc) · 2.08 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
BUILD=build
INSTALL_PREFIX=$(BUILD)/myopt
GLOBAL_INSTALL_PREFIX=/opt/ccf
CPP_INCLUDES=$(wildcard include/ccf/**/*.cpp)
H_INCLUDES=$(wildcard include/ccf/**/*.h)
.PHONY: build-virtual
build-virtual:
mkdir -p $(BUILD)
cd $(BUILD) && cmake -GNinja -DCOMPILE_TARGETS=virtual -DCMAKE_INSTALL_PREFIX=$(abspath $(INSTALL_PREFIX)) -DVERBOSE_LOGGING=OFF -DUNSAFE_VERSION=OFF ..
cd $(BUILD) && ninja
.PHONY: build-virtual-verbose
build-virtual-verbose:
mkdir -p $(BUILD)
cd $(BUILD) && cmake -GNinja -DCOMPILE_TARGETS=virtual -DCMAKE_INSTALL_PREFIX=$(abspath $(INSTALL_PREFIX)) -DVERBOSE_LOGGING=ON -DUNSAFE_VERSION=ON ..
cd $(BUILD) && ninja
.PHONY: build-virtual-global
build-virtual-global:
mkdir -p $(BUILD)
cd $(BUILD) && cmake -GNinja -DCOMPILE_TARGETS=virtual -DCMAKE_INSTALL_PREFIX=$(GLOBAL_INSTALL_PREFIX) -DVERBOSE_LOGGING=OFF -DUNSAFE_VERSION=OFF ..
cd $(BUILD) && ninja
.PHONY: build-virtual-global-verbose
build-virtual-global-verbose:
mkdir -p $(BUILD)
cd $(BUILD) && cmake -GNinja -DCOMPILE_TARGETS=virtual -DCMAKE_INSTALL_PREFIX=$(GLOBAL_INSTALL_PREFIX) -DVERBOSE_LOGGING=ON -DUNSAFE_VERSION=ON ..
cd $(BUILD) && ninja
.PHONY: install-virtual
install-virtual: build-virtual
cd $(BUILD) && ninja install
.PHONY: install-virtual-global
install-virtual-global: build-virtual-global
cd $(BUILD) && sudo ninja install
.PHONY: install-virtual-global-verbose
install-virtual-global-verbose: build-virtual-global-verbose
cd $(BUILD) && sudo ninja install
.PHONY: run-sandbox
run-sandbox: build-virtual
cd $(BUILD) && ../tests/sandbox/sandbox.sh
.PHONY: run-sandbox-cpp-logging
run-sandbox-cpp-logging: build-virtual
cd $(BUILD) && ../tests/sandbox/sandbox.sh -p samples/apps/logging/liblogging
.PHONY: test-virtual
test-virtual: build-virtual
cd $(BUILD) && ./tests.sh
.PHONY: clean
clean:
rm -rf $(INSTALL_PREFIX) $(BUILD) workspace
cpplint: $(CPP_INCLUDES) $(H_INCLUDES)
cpplint --filter=-whitespace/braces,-whitespace/indent,-whitespace/comments,-whitespace/newline,-build/include_order,-build/include_subdir,-runtime/references,-runtime/indentation_namespace $(CPP_INCLUDES) $(H_INCLUDES)