-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
31 lines (22 loc) · 702 Bytes
/
makefile
File metadata and controls
31 lines (22 loc) · 702 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
PYTHON ?= python3.13
BUILD_DIR ?= build
ROOT_DIR := $(CURDIR)
PYBIND11_DIR := $(shell $(PYTHON) -m pybind11 --cmakedir)
.PHONY: configure build install quick rebuild editable clean
configure:
cmake -S . -B $(BUILD_DIR) \
-Dpybind11_DIR="$(PYBIND11_DIR)" \
-DPython_EXECUTABLE="$$(which $(PYTHON))" \
-DCMAKE_INSTALL_PREFIX="$(ROOT_DIR)"
build:
cmake --build $(BUILD_DIR) -j
install:
cmake --install $(BUILD_DIR)
uninstall:
$(PYTHON) -m pip uninstall -y PyMieSim
quick: configure build install
rebuild: configure build install
editable:
$(PYTHON) -m pip install --no-build-isolation -Cbuild-dir=build -Ceditable.rebuild=false -Ceditable.mode=inplace -e .
clean:
rm -rf $(BUILD_DIR)