-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
41 lines (30 loc) · 914 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
ENABLE_VCPKG = ON
CMAKE_CONFIGURE_DEPS =
CMAKE_CONFIGURE_FLAGS = -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
check = $(if $(filter $(1), on ON true TRUE yes YES 1),1)
.PHONY: all extract build build-tests clean clean-all
all: build
ifeq ($(call check, $(ENABLE_VCPKG)), 1)
vcpkg:
git clone https://github.com/microsoft/vcpkg.git
vcpkg/vcpkg: vcpkg
./vcpkg/bootstrap-vcpkg.sh
CMAKE_CONFIGURE_DEPS += vcpkg/vcpkg
CMAKE_CONFIGURE_FLAGS += -DCMAKE_TOOLCHAIN_FILE="$(CURDIR)/vcpkg/scripts/buildsystems/vcpkg.cmake"
endif
build: $(CMAKE_CONFIGURE_DEPS)
cmake -Bbuild $(CMAKE_CONFIGURE_FLAGS) .
cmake --build build -j
build-tests:
$(MAKE) -C extractor build-tests
.PHONY: symbols.list
symbols.list:
$(MAKE) -C extractor global-sym \
OUTPUT_SYMBOL_FILE="$(CURDIR)/symbols.list"
extract:
$(MAKE) -C extractor \
OUTPUT_DIR="$(CURDIR)/src"
clean:
-rm -r build
clean-all: clean
$(MAKE) -C extractor clean