-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
74 lines (58 loc) · 1.03 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
ifndef RACK_DIR
$(error RACK_DIR is not defined)
endif
include $(RACK_DIR)/arch.mk
ifdef ARCH_X64
PRESET_ARCH := x64
endif
ifdef ARCH_ARM64
PRESET_ARCH := arm64
endif
ifdef ARCH_WIN
PRESET_OS := windows
endif
ifdef ARCH_LIN
PRESET_OS := linux
endif
ifdef ARCH_MAC
PRESET_OS := osx
endif
ifdef BUILD_TYPE
PRESET_CONFIG := $(BUILD_TYPE)
else
ifdef DEBUG
PRESET_CONFIG := debug
else
PRESET_CONFIG := release
endif
endif
ifdef VERBOSE
PRESET_VERBOSE := -verbose
endif
PRESET ?= $(PRESET_ARCH)-$(PRESET_OS)-$(PRESET_CONFIG)$(PRESET_VERBOSE)
# The below are Makefile commands which intelligently call a CMake Preset,
# by detecting your system variables...
reconfigure:
cmake \
--preset $(PRESET) \
--fresh
configure:
cmake \
--preset $(PRESET)
build: configure
cmake \
--build $(PWD)/build \
--preset $(PRESET)
test: build
ctest \
--test-dir $(PWD)/build \
--preset $(PRESET)
package: test
cmake \
--install $(PWD)/build \
--prefix $(PWD)/install
workflow:
cmake \
--workflow \
--preset $(PRESET) \
--fresh