-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
504 lines (422 loc) · 16.5 KB
/
Makefile
File metadata and controls
504 lines (422 loc) · 16.5 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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
CC = gcc
# Version generation
# If VERSION file doesn't exist, create it from git commit hash
# CI/CD will overwrite this with tag version
ifeq ($(wildcard VERSION),)
$(shell git rev-parse --short HEAD 2>/dev/null > VERSION || echo "unknown" > VERSION)
endif
VERSION := $(shell cat VERSION)
# Use generic architecture for CI compatibility
ifdef CI
CFLAGS = -Wall -Wextra -O2 -Isrc -Isrc/include -DHYPRLAX_VERSION=\"$(VERSION)\"
LDFLAGS =
else
CFLAGS = -Wall -Wextra -O3 -march=native -flto -Isrc -Isrc/include -DHYPRLAX_VERSION=\"$(VERSION)\"
LDFLAGS = -flto
endif
# Cross-compilation support
ifdef ARCH
ifeq ($(ARCH),aarch64)
CC = aarch64-linux-gnu-gcc
CFLAGS = -Wall -Wextra -O3 -flto -Isrc
endif
endif
# Add build defines to CFLAGS
CFLAGS += $(BUILD_DEFINES)
# Feature flags (all enabled by default)
ENABLE_WAYLAND ?= 1
ENABLE_HYPRLAND ?= 1
ENABLE_SWAY ?= 1
ENABLE_WAYFIRE ?= 1
ENABLE_NIRI ?= 1
ENABLE_RIVER ?= 1
ENABLE_GENERIC_WAYLAND ?= 1
ENABLE_GLES2 ?= 1
# Build defines based on feature flags
BUILD_DEFINES =
ifeq ($(ENABLE_WAYLAND),1)
BUILD_DEFINES += -DENABLE_WAYLAND
endif
ifeq ($(ENABLE_HYPRLAND),1)
BUILD_DEFINES += -DENABLE_HYPRLAND
endif
ifeq ($(ENABLE_SWAY),1)
BUILD_DEFINES += -DENABLE_SWAY
endif
ifeq ($(ENABLE_WAYFIRE),1)
BUILD_DEFINES += -DENABLE_WAYFIRE
endif
ifeq ($(ENABLE_NIRI),1)
BUILD_DEFINES += -DENABLE_NIRI
endif
ifeq ($(ENABLE_RIVER),1)
BUILD_DEFINES += -DENABLE_RIVER
endif
ifeq ($(ENABLE_GENERIC_WAYLAND),1)
BUILD_DEFINES += -DENABLE_GENERIC_WAYLAND
endif
ifeq ($(ENABLE_GLES2),1)
BUILD_DEFINES += -DENABLE_GLES2
endif
# Package dependencies (conditional)
PKG_DEPS =
ifeq ($(ENABLE_WAYLAND),1)
PKG_DEPS += wayland-client wayland-protocols wayland-egl
endif
ifeq ($(ENABLE_GLES2),1)
PKG_DEPS += egl glesv2
endif
# Get package flags
PKG_CFLAGS = $(shell pkg-config --cflags $(PKG_DEPS))
PKG_LIBS = $(shell pkg-config --libs $(PKG_DEPS))
# Wayland protocols
WAYLAND_PROTOCOLS_DIR = $(shell pkg-config --variable=pkgdatadir wayland-protocols)
WAYLAND_SCANNER = $(shell pkg-config --variable=wayland_scanner wayland-scanner)
# Protocol files (conditional on Wayland)
ifeq ($(ENABLE_WAYLAND),1)
XDG_SHELL_PROTOCOL = $(WAYLAND_PROTOCOLS_DIR)/stable/xdg-shell/xdg-shell.xml
LAYER_SHELL_PROTOCOL = protocols/wlr-layer-shell-unstable-v1.xml
RIVER_STATUS_PROTOCOL = protocols/river-status-unstable-v1.xml
FRACTIONAL_SCALE_PROTOCOL = $(WAYLAND_PROTOCOLS_DIR)/staging/fractional-scale/fractional-scale-v1.xml
VIEWPORTER_PROTOCOL = $(WAYLAND_PROTOCOLS_DIR)/stable/viewporter/viewporter.xml
PROTOCOL_SRCS = protocols/xdg-shell-protocol.c protocols/wlr-layer-shell-protocol.c \
protocols/fractional-scale-v1-protocol.c protocols/viewporter-protocol.c
PROTOCOL_HDRS = protocols/xdg-shell-client-protocol.h protocols/wlr-layer-shell-client-protocol.h \
protocols/fractional-scale-v1-client-protocol.h protocols/viewporter-client-protocol.h
# River status protocol is optional, only include if River is enabled
ifeq ($(ENABLE_RIVER),1)
PROTOCOL_SRCS += protocols/river-status-protocol.c
PROTOCOL_HDRS += protocols/river-status-client-protocol.h
endif
else
PROTOCOL_SRCS =
PROTOCOL_HDRS =
endif
# Core module sources (always included)
CORE_SRCS = src/core/easing.c src/core/animation.c src/core/layer.c src/core/config.c src/core/monitor.c src/core/log.c src/core/cursor.c src/core/render_core.c src/core/event_loop.c src/core/resource_monitor.c src/core/time_utils.c \
src/core/input/input_manager.c src/core/input/providers.c src/core/input/modes/workspace.c src/core/input/modes/cursor.c src/core/input/modes/window.c
# Renderer module sources (conditional)
RENDERER_SRCS = src/renderer/renderer.c src/renderer/shader.c
ifeq ($(ENABLE_GLES2),1)
RENDERER_SRCS += src/renderer/gles2.c
endif
# Platform module sources (conditional)
PLATFORM_SRCS = src/platform/platform.c
ifeq ($(ENABLE_WAYLAND),1)
PLATFORM_SRCS += src/platform/wayland.c
endif
# Compositor module sources (conditional)
COMPOSITOR_SRCS = src/compositor/compositor.c src/compositor/workspace_models.c
ifeq ($(ENABLE_HYPRLAND),1)
COMPOSITOR_SRCS += src/compositor/hyprland.c
endif
ifeq ($(ENABLE_SWAY),1)
COMPOSITOR_SRCS += src/compositor/sway.c
endif
ifeq ($(ENABLE_WAYFIRE),1)
COMPOSITOR_SRCS += src/compositor/wayfire.c
endif
ifeq ($(ENABLE_NIRI),1)
COMPOSITOR_SRCS += src/compositor/niri.c
endif
ifeq ($(ENABLE_RIVER),1)
COMPOSITOR_SRCS += src/compositor/river.c
endif
ifeq ($(ENABLE_GENERIC_WAYLAND),1)
COMPOSITOR_SRCS += src/compositor/generic_wayland.c
endif
# Main module sources
MAIN_SRCS = src/main.c src/hyprlax_main.c src/hyprlax_ctl.c
# Source files (modular only; legacy path removed)
SRCS = $(MAIN_SRCS) src/ipc.c $(CORE_SRCS) $(RENDERER_SRCS) $(PLATFORM_SRCS) \
$(COMPOSITOR_SRCS) $(PROTOCOL_SRCS)
# Vendor libraries and optional modules
#SRCS += src/vendor/toml.c src/core/config_toml.c src/core/config_legacy.c
SRCS += src/vendor/toml.c src/vendor/gifdec.c src/core/config_toml.c src/core/config_legacy.c
OBJS = $(SRCS:.c=.o)
TARGET = hyprlax
all: $(TARGET)
# Convenience targets for common configurations
hyprland-minimal:
$(MAKE) clean
$(MAKE) ENABLE_SWAY=0 ENABLE_WAYFIRE=0 ENABLE_NIRI=0 ENABLE_RIVER=0 ENABLE_GENERIC_WAYLAND=0
wayland-only:
$(MAKE) clean
$(MAKE)
sway-minimal:
$(MAKE) clean
$(MAKE) ENABLE_HYPRLAND=0 ENABLE_WAYFIRE=0 ENABLE_NIRI=0 ENABLE_RIVER=0 ENABLE_GENERIC_WAYLAND=0
# Generate protocol files
protocols/xdg-shell-protocol.c: $(XDG_SHELL_PROTOCOL)
@mkdir -p protocols
$(WAYLAND_SCANNER) private-code < $< > $@
protocols/xdg-shell-client-protocol.h: $(XDG_SHELL_PROTOCOL)
@mkdir -p protocols
$(WAYLAND_SCANNER) client-header < $< > $@
protocols/wlr-layer-shell-protocol.c: $(LAYER_SHELL_PROTOCOL)
@mkdir -p protocols
$(WAYLAND_SCANNER) private-code < $< > $@
protocols/wlr-layer-shell-client-protocol.h: $(LAYER_SHELL_PROTOCOL)
@mkdir -p protocols
$(WAYLAND_SCANNER) client-header < $< > $@
protocols/river-status-protocol.c: $(RIVER_STATUS_PROTOCOL)
@mkdir -p protocols
$(WAYLAND_SCANNER) private-code < $< > $@
protocols/river-status-client-protocol.h: $(RIVER_STATUS_PROTOCOL)
@mkdir -p protocols
$(WAYLAND_SCANNER) client-header < $< > $@
protocols/fractional-scale-v1-protocol.c: $(FRACTIONAL_SCALE_PROTOCOL)
@mkdir -p protocols
$(WAYLAND_SCANNER) private-code < $< > $@
protocols/fractional-scale-v1-client-protocol.h: $(FRACTIONAL_SCALE_PROTOCOL)
@mkdir -p protocols
$(WAYLAND_SCANNER) client-header < $< > $@
protocols/viewporter-protocol.c: $(VIEWPORTER_PROTOCOL)
@mkdir -p protocols
$(WAYLAND_SCANNER) private-code < $< > $@
protocols/viewporter-client-protocol.h: $(VIEWPORTER_PROTOCOL)
@mkdir -p protocols
$(WAYLAND_SCANNER) client-header < $< > $@
# Compile
%.o: %.c $(PROTOCOL_HDRS)
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(PKG_CFLAGS) -c $< -o $@
# Ensure VERSION file exists before building
VERSION:
@if [ ! -f VERSION ]; then \
git rev-parse --short HEAD 2>/dev/null > VERSION || echo "unknown" > VERSION; \
fi
$(TARGET): VERSION $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) $(PKG_LIBS) -lm -o $@
clean:
rm -f $(TARGET) $(OBJS) $(PROTOCOL_SRCS) $(PROTOCOL_HDRS)
rm -rf protocols/*.o src/*.o
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
DESTDIR ?=
install: $(TARGET)
install -Dm755 $(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
install-user: $(TARGET)
install -Dm755 $(TARGET) ~/.local/bin/$(TARGET)
uninstall:
rm -f $(DESTDIR)$(BINDIR)/$(TARGET)
uninstall-user:
rm -f ~/.local/bin/$(TARGET)
# Test suite with Check framework
CHECK_CFLAGS = $(shell pkg-config --cflags check 2>/dev/null)
CHECK_LIBS = $(shell pkg-config --libs check 2>/dev/null)
TEST_CFLAGS = $(CFLAGS) $(CHECK_CFLAGS)
TEST_LIBS = $(CHECK_LIBS) -lm
# Valgrind settings for memory leak detection
VALGRIND = valgrind
VALGRIND_FLAGS = --leak-check=full --show-leak-kinds=definite,indirect --track-origins=yes --error-exitcode=1
# For Arch Linux, enable debuginfod for symbol resolution
export DEBUGINFOD_URLS ?= https://debuginfod.archlinux.org
TEST_TARGETS = tests/test_integration tests/test_ipc tests/test_blur tests/test_config tests/test_animation tests/test_easing tests/test_shader tests/test_platform tests/test_compositor tests/test_modules tests/test_renderer tests/test_workspace_changes tests/test_animation_state tests/test_config_validation tests/test_hyprland_events
ALL_TESTS = $(filter tests/test_%, $(wildcard tests/test_*.c))
ALL_TEST_TARGETS = $(ALL_TESTS:.c=)
SHELL_TESTS = $(wildcard tests/test_*.sh)
# Individual test rules - updated for Check framework
tests/test_integration: tests/test_integration.c src/ipc.c src/core/log.c
$(CC) $(TEST_CFLAGS) $^ $(TEST_LIBS) -lpthread -o $@
tests/test_ctl: tests/test_ctl.c
$(CC) $(TEST_CFLAGS) $< $(TEST_LIBS) -o $@
tests/test_renderer: tests/test_renderer.c
$(CC) $(TEST_CFLAGS) $< $(TEST_LIBS) -o $@
tests/test_ipc: tests/test_ipc.c src/ipc.c src/core/log.c
$(CC) $(TEST_CFLAGS) $^ $(TEST_LIBS) -o $@
tests/test_blur: tests/test_blur.c
$(CC) $(TEST_CFLAGS) $< $(TEST_LIBS) -o $@
tests/test_config: tests/test_config.c
$(CC) $(TEST_CFLAGS) $< $(TEST_LIBS) -o $@
tests/test_animation: tests/test_animation.c
$(CC) $(TEST_CFLAGS) $< $(TEST_LIBS) -o $@
tests/test_easing: tests/test_easing.c
$(CC) $(TEST_CFLAGS) $< $(TEST_LIBS) -o $@
tests/test_shader: tests/test_shader.c
$(CC) $(TEST_CFLAGS) $< $(TEST_LIBS) -o $@
tests/test_platform: tests/test_platform.c
$(CC) $(TEST_CFLAGS) $< $(TEST_LIBS) -o $@
tests/test_compositor: tests/test_compositor.c
$(CC) $(TEST_CFLAGS) $< $(TEST_LIBS) -o $@
tests/test_modules: tests/test_modules.c
$(CC) $(TEST_CFLAGS) $< $(TEST_LIBS) -o $@
tests/test_workspace_changes: tests/test_workspace_changes.c
$(CC) $(TEST_CFLAGS) $< $(TEST_LIBS) -o $@
tests/test_animation_state: tests/test_animation_state.c
$(CC) $(TEST_CFLAGS) $< $(TEST_LIBS) -o $@
tests/test_config_validation: tests/test_config_validation.c
$(CC) $(TEST_CFLAGS) $< $(TEST_LIBS) -o $@
tests/test_gif: tests/test_gif.c src/vendor/gifdec.c
$(CC) $(TEST_CFLAGS) -Isrc -Isrc/include $^ $(TEST_LIBS) -o $@
# Hyprland event parsing tests (link hyprland adapter and core compositor utils)
tests/test_hyprland_events: tests/test_hyprland_events.c src/compositor/hyprland.c src/compositor/compositor.c src/core/log.c
$(CC) $(TEST_CFLAGS) -DUNIT_TEST -Isrc -Isrc/include $^ $(TEST_LIBS) -o $@
tests/test_niri_events: tests/test_niri_events.c src/compositor/niri.c src/compositor/compositor.c src/core/log.c
$(CC) $(TEST_CFLAGS) -DUNIT_TEST -Isrc -Isrc/include $^ $(TEST_LIBS) -o $@
# Ops smoke test: link against compositor adapters to validate get_event_fd presence
tests/test_compositor_ops: tests/test_compositor_ops.c \
src/compositor/hyprland.c src/compositor/sway.c src/compositor/wayfire.c \
src/compositor/niri.c src/compositor/river.c src/compositor/generic_wayland.c \
src/compositor/compositor.c src/compositor/workspace_models.c src/core/log.c \
src/core/monitor.c \
protocols/river-status-protocol.c
$(CC) $(TEST_CFLAGS) -Isrc -Isrc/include $^ $(TEST_LIBS) $(PKG_LIBS) -o $@
# Caps/Model tests
tests/test_compositor_caps: tests/test_compositor_caps.c \
src/compositor/hyprland.c src/compositor/sway.c src/compositor/wayfire.c \
src/compositor/niri.c src/compositor/river.c src/compositor/generic_wayland.c \
src/compositor/compositor.c src/compositor/workspace_models.c src/core/log.c \
src/core/monitor.c \
protocols/river-status-protocol.c
$(CC) $(TEST_CFLAGS) -Isrc -Isrc/include $^ $(TEST_LIBS) $(PKG_LIBS) -o $@
# New parallax-related tests
tests/test_toml_config: tests/test_toml_config.c src/core/config_toml.c src/core/config.c src/core/log.c src/core/easing.c src/vendor/toml.c \
src/core/input/input_manager.c src/core/input/providers.c src/core/input/modes/workspace.c \
src/core/input/modes/cursor.c src/core/input/modes/window.c src/core/animation.c
$(CC) $(TEST_CFLAGS) -Isrc -Isrc/include $^ $(TEST_LIBS) -o $@
tests/test_runtime_properties: tests/test_runtime_properties.c tests/stubs_gfx.c \
src/hyprlax_main.c src/core/log.c src/core/config.c src/core/layer.c \
src/core/monitor.c src/core/event_loop.c src/core/resource_monitor.c src/core/time_utils.c \
src/core/input/input_manager.c src/core/input/providers.c \
src/core/input/modes/workspace.c src/core/input/modes/cursor.c src/core/input/modes/window.c \
src/core/animation.c src/core/easing.c src/vendor/toml.c src/core/config_toml.c
$(CC) $(TEST_CFLAGS) -Isrc -Isrc/include $^ $(TEST_LIBS) $(PKG_LIBS) -o $@
tests/test_input_manager: tests/test_input_manager.c \
src/core/input/input_manager.c src/core/log.c
$(CC) $(TEST_CFLAGS) -Isrc -Isrc/include $^ $(TEST_LIBS) -o $@
tests/test_texture_atlas: tests/test_texture_atlas.c \
src/renderer/texture_atlas.c
$(CC) $(TEST_CFLAGS) -Isrc -Isrc/include $^ $(TEST_LIBS) -o $@
tests/test_event_loop: tests/test_event_loop.c \
src/core/event_loop.c src/core/log.c
$(CC) $(TEST_CFLAGS) -Isrc -Isrc/include $^ $(TEST_LIBS) -o $@
tests/test_resource_monitor: tests/test_resource_monitor.c \
src/core/resource_monitor.c src/core/log.c
$(CC) $(TEST_CFLAGS) -Isrc -Isrc/include $^ $(TEST_LIBS) -o $@
# Run all tests
test: $(ALL_TEST_TARGETS)
@echo "=== Running Full Test Suite ==="
@failed=0; \
for test in $(ALL_TEST_TARGETS); do \
if [ -x $$test ]; then \
echo "\n--- Running $$test ---"; \
if ! HYPRLAX_SOCKET_SUFFIX=tests $$test; then \
echo "✗ $$test FAILED"; \
failed=$$((failed + 1)); \
else \
echo "✓ $$test PASSED"; \
fi; \
fi; \
done; \
echo "\n=== Test Summary ==="; \
if [ $$failed -eq 0 ]; then \
echo "✓ All tests passed!"; \
else \
echo "✗ $$failed test(s) failed"; \
exit 1; \
fi
# Run shell-based tests (scripts under tests/)
test-scripts: $(TARGET)
@echo "=== Running Shell Test Scripts ==="
@failed=0; total=0; \
for script in $(SHELL_TESTS); do \
if [ -x $$script ]; then \
total=$$((total + 1)); \
echo "\n--- Running $$script ---"; \
if ! $$script; then \
echo "✗ $$script FAILED"; \
failed=$$((failed + 1)); \
else \
echo "✓ $$script PASSED"; \
fi; \
fi; \
done; \
if [ $$total -eq 0 ]; then \
echo "(no shell tests found)"; \
fi; \
echo "\n=== Shell Test Summary ==="; \
if [ $$failed -eq 0 ]; then \
echo "✓ All shell tests passed!"; \
else \
echo "✗ $$failed shell test(s) failed"; \
exit 1; \
fi
# Run tests with valgrind for memory leak detection
memcheck: $(ALL_TEST_TARGETS)
@if ! command -v valgrind >/dev/null 2>&1; then \
echo "Error: valgrind is not installed."; \
echo "Install it with: sudo pacman -S valgrind (Arch) or sudo apt-get install valgrind (Debian/Ubuntu)"; \
exit 1; \
fi
@echo "=== Running Tests with Valgrind Memory Check ==="
@failed=0; \
passed=0; \
total=0; \
for test in $(ALL_TEST_TARGETS); do \
if [ -x $$test ]; then \
total=$$((total + 1)); \
echo "\n--- Memory check: $$test ---"; \
if ! HYPRLAX_SOCKET_SUFFIX=tests $(VALGRIND) $(VALGRIND_FLAGS) --log-file=$$test.valgrind.log $$test > /dev/null 2>&1; then \
echo "✗ $$test MEMORY ISSUES DETECTED"; \
cat $$test.valgrind.log; \
failed=$$((failed + 1)); \
else \
echo "✓ $$test MEMORY CLEAN"; \
rm -f $$test.valgrind.log; \
passed=$$((passed + 1)); \
fi; \
fi; \
done; \
echo "\n=== Memory Check Summary ==="; \
echo "Total: $$total tests"; \
echo "Passed: $$passed tests"; \
echo "Failed: $$failed tests"; \
if [ $$failed -eq 0 ]; then \
echo "✓ All tests memory clean!"; \
else \
echo "✗ $$failed test(s) have memory issues"; \
exit 1; \
fi
# Linting targets
lint:
@if [ -x scripts/lint.sh ]; then \
./scripts/lint.sh; \
else \
echo "Lint script not found. Please ensure scripts/lint.sh exists and is executable."; \
exit 1; \
fi
lint-fix:
@if [ -x scripts/lint.sh ]; then \
./scripts/lint.sh --fix; \
else \
echo "Lint script not found. Please ensure scripts/lint.sh exists and is executable."; \
exit 1; \
fi
clean-tests:
rm -f $(ALL_TEST_TARGETS) tests/*.valgrind.log tests/*.valgrind.log.* tests/*.valgrind.log.core.*
.PHONY: all clean install install-user uninstall uninstall-user test test-scripts memcheck clean-tests lint lint-fix bench bench-perf bench-30fps bench-clean
# Benchmark helpers
bench:
@./scripts/bench/bench-optimizations.sh
bench-perf:
@./scripts/bench/bench-performance.sh
bench-30fps:
@./scripts/bench/bench-30fps.sh
bench-clean:
@rm -f hyprlax-test-*.log || true
# --- Documentation helpers ---
.PHONY: docs docs-linkcheck
# Build MkDocs site (requires mkdocs)
docs:
@if command -v mkdocs >/dev/null 2>&1; then \
mkdocs build -f mkdocs.yml; \
elif [ -x .venv/bin/mkdocs ]; then \
.venv/bin/mkdocs build -f mkdocs.yml; \
else \
echo "Error: mkdocs not found. Install with 'pip install mkdocs mkdocs-material' or use .venv."; \
exit 1; \
fi
# Build docs and run internal link checker
docs-linkcheck: docs
@python3 scripts/docs_link_check.py