/ externals / zydis / Makefile
Makefile
 1  .PHONY: build configure install amalgamate clean test doc doc-plain doc-themed
 2  
 3  BUILD_DIR ?= build
 4  CSS_DIR   ?= ../doxygen-awesome-css
 5  
 6  build: configure
 7  	cmake --build $(BUILD_DIR) -j$(nproc)
 8  
 9  configure: dependencies/zycore/CMakeLists.txt
10  	@if ! command -v cmake > /dev/null; then \
11  		echo >&2 "ERROR: cmake is not installed. Please install it first."; \
12  	fi
13  	cmake -B $(BUILD_DIR)
14  
15  install: build
16  	cmake --install $(BUILD_DIR)
17  
18  amalgamate:
19  	assets/amalgamate.py
20  
21  clean:
22  	rm -rf $(BUILD_DIR)
23  	rm -rf doc
24  	rm -rf amalgamated-dist
25  
26  test: build
27  	cd tests && ./regression.py test ../build/ZydisInfo
28  	cd tests && ./regression_encoder.py ../build/Zydis{Fuzz{ReEncoding,Encoder},TestEncoderAbsolute}
29  
30  doc: configure
31  	cmake --build $(BUILD_DIR) --target ZydisDoc
32  
33  dependencies/zycore/CMakeLists.txt:
34  	@if ! command -v git > /dev/null; then \
35  		echo >&2 -n "ERROR: git is not installed. Please either manually place all"; \
36  		echo >&2    "dependencies in their respective paths or install git first."; \
37  		exit 1; \
38  	fi
39  	git submodule update --init --recursive