-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 1.25 KB
/
Makefile
File metadata and controls
43 lines (32 loc) · 1.25 KB
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
BUILD_DIR := build
CMAKE_FLAGS ?=
.PHONY: all clean test examples amalgamation fat test-network test-autobahn
all:
@mkdir -p $(BUILD_DIR)
@cd $(BUILD_DIR) && cmake .. $(CMAKE_FLAGS) && cmake --build .
clean:
@rm -rf $(BUILD_DIR)
test: all
@cd $(BUILD_DIR) && ctest --output-on-failure
examples: all
@echo "Examples built in $(BUILD_DIR)/examples/"
debug:
@mkdir -p $(BUILD_DIR)
@cd $(BUILD_DIR) && cmake .. -DCMAKE_BUILD_TYPE=Debug $(CMAKE_FLAGS) && cmake --build .
asan:
@mkdir -p $(BUILD_DIR)
@cd $(BUILD_DIR) && cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-fsanitize=address -fno-omit-frame-pointer" $(CMAKE_FLAGS) && cmake --build .
amalgamation: all
@cd $(BUILD_DIR) && cmake --build . --target amalgamation
@echo "Amalgamation files in $(BUILD_DIR)/amalgamation/"
fat: all
@cd $(BUILD_DIR) && cmake --build . --target weblite_fat
@echo "Fat static library: $(BUILD_DIR)/libweblite_fat.a"
test-network:
@mkdir -p $(BUILD_DIR)
@cd $(BUILD_DIR) && cmake .. -DWEBLITE_BUILD_NETWORK_TESTS=ON $(CMAKE_FLAGS) && cmake --build .
@cd $(BUILD_DIR) && ctest -L network --output-on-failure
test-autobahn:
@mkdir -p $(BUILD_DIR)
@cd $(BUILD_DIR) && cmake .. -DWEBLITE_BUILD_AUTOBAHN=ON $(CMAKE_FLAGS) && cmake --build .
@./scripts/run_autobahn.sh