-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 769 Bytes
/
Makefile
File metadata and controls
34 lines (26 loc) · 769 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
PREFIX ?= /usr/local
CMAKE_FLAGS :=
CMAKE_FLAGS += -DCMAKE_INSTALL_PREFIX=$(DESTDIR)$(PREFIX)
ifdef PERMANENT_TUNE
CMAKE_FLAGS += -DPERMANENT_TUNE=ON
endif
ifdef PERMANENT_PYTHON
CMAKE_FLAGS += -DPERMANENT_PYTHON=ON
CMAKE_FLAGS += -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
endif
CLEAN_TARGETS :=
CLEAN_TARGETS += include/permanent/tuning.h
CLEAN_TARGETS += build dist _build _generate
CLEAN_TARGETS += permanent.*egg-info permanent.*so
CLEAN_TARGETS += compile_commands.json
.PHONY: all clean install _build
all: _build
clean:
rm -rf $(CLEAN_TARGETS)
install: _build
@cmake --install build
_build: build
@cmake --build build --target all
@if test -e build/compile_commands.json; then ln -sf build/compile_commands.json .; fi
build:
@cmake -B build $(CMAKE_FLAGS)