-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (40 loc) · 1.18 KB
/
Makefile
File metadata and controls
49 lines (40 loc) · 1.18 KB
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
# Переменные для путей
SIM_DIR = simulation
BUILD_DIR = $(SIM_DIR)/build
DISPLAY_DIR = display
RESULTS = results.csv
CONFIG = config.yaml
.PHONY: demo run build plot clean
demo: release run-demo plot-demo
heatmap: release run-heatmap plot-heatmap
plot-demo:
@echo "--- Displaying results ---"
cd $(DISPLAY_DIR) && uv run display.py ../$(RESULTS)
run-demo:
@echo "--- Running simulation ---"
./$(BUILD_DIR)/vdp_sim $(SIM_DIR)/$(CONFIG) -o ./$(RESULTS)
plot-heatmap:
@echo "--- Displaying heatmap results ---"
cd $(DISPLAY_DIR) && uv run heatmap.py ../$(RESULTS)
run-heatmap:
@echo "--- Running heatmap generation ---"
./$(BUILD_DIR)/vdp_heatmap $(SIM_DIR)/experiments/heatmap/$(CONFIG) -o ./$(RESULTS)
release:
@echo "--- Building C++ simulation (Release) ---"
mkdir -p $(BUILD_DIR)
cd $(BUILD_DIR) && \
CXX=g++-15 CC=gcc-15 \
cmake -DCMAKE_BUILD_TYPE=Release .. && \
cmake --build . -j$(nproc)
debug:
@echo "--- Building C++ simulation (Debug) ---"
mkdir -p $(BUILD_DIR)
cd $(BUILD_DIR) && \
CXX=g++-15 CC=gcc-15 \
cmake .. && \
cmake --build . -j$(nproc)
clean:
rm -f $(RESULTS)
rm -f *.png
rm -rf $(BUILD_DIR)
@echo "Cleaned up results and plots."