-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (24 loc) · 722 Bytes
/
Makefile
File metadata and controls
34 lines (24 loc) · 722 Bytes
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
# Simple Makefile providing an interface for cmake. Oh, sweet irony
BUILD_TYPE ?= Release
BUILD_DIR = $(BUILD_TYPE)
.PHONY = all build clean debug default FORCE run setup test
default: run
FORCE:;
# Clean, build, test, and run
all: clean test run
# Initialise cmake build files at BUILD_DIR
setup: FORCE CMakeLists.txt
cmake -H. -B$(BUILD_DIR) -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" > /dev/zero
# Build the project (lib and src)
build: FORCE setup
cmake --build $(BUILD_DIR) --target Capstone
# Build the benchmarking tool
run: build
./$(BUILD_DIR)/Capstone
# Build and run the tests
test: build
cmake --build $(BUILD_DIR) --target Test
./$(BUILD_DIR)/Test
# Clean all build files
clean:
rm -rf $(BUILD_DIR)