-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathMakefile
46 lines (36 loc) · 991 Bytes
/
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
BUILD_DIR ?= build
export GENERATOR ?= Unix Makefiles
export JOBS ?= 16
export MAKEFLAGS += --no-print-directory
export KCONFIG_CONFIG = .config
export MENUCONFIG_STYLE = aquatic
all: install
install: compile
cmake --install $(BUILD_DIR)
compile: build
cmake --build $(BUILD_DIR) -j$(JOBS)
build:
cmake -S . -B $(BUILD_DIR) -G "$(GENERATOR)" \
-DCMAKE_INSTALL_MESSAGE=LAZY \
-DBUILD_SHARED_LIBS=On \
-DSVF_ENABLE_ASSERTIONS=true \
-DCMAKE_INSTALL_PREFIX=install
tests: install
$(MAKE) -C tests
format:
find ./src -regex '.*\.[c|h]pp' | xargs clang-format -i
menuconfig:
@python3 bin/menuconfig.py
clean: uninstall
rm -rf $(BUILD_DIR)
rm -rf .config
$(MAKE) -C tests clean
$(MAKE) -C examples clean
rm -f compile_commands.json
rm -f config.cmake
uninstall:
-cat $(BUILD_DIR)/install_manifest.txt | xargs rm -f
rm -f enable
rm -f .git/hooks/pre-commit
find ./ -type d -empty -delete
.PHONY: all build install compile menuconfig tests format clean uninstall