-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
71 lines (55 loc) · 2.03 KB
/
Makefile
File metadata and controls
71 lines (55 loc) · 2.03 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
NIM := $(shell which nim 2>/dev/null || echo $(HOME)/.nimble/bin/nim)
BIN = bin/nimcode
SRC = src/nimcode.nim
TESTS = tests/test_tui.nim tests/test_statusbar.nim tests/test_stream.nim tests/test_input.nim
.PHONY: all build release release-binary clean run test test-tui test-statusbar test-stream test-input package-deb package-npm cross-compile help
all: build
build:
$(NIM) c -d:ssl -o:$(BIN) $(SRC)
release-binary:
$(NIM) c -d:ssl -d:release -o:$(BIN) $(SRC)
clean:
rm -f $(BIN)
rm -f tests/test_tui tests/test_statusbar tests/test_stream tests/test_input
run: build
./$(BIN)
test: test-tui test-statusbar test-stream test-input
@echo "All tests passed!"
test-tui:
@echo "Running TUI tests..."
$(NIM) c -r -d:ssl tests/test_tui.nim
test-statusbar:
@echo "Running Status Bar tests..."
$(NIM) c -r -d:ssl tests/test_statusbar.nim
test-stream:
@echo "Running Stream tests..."
$(NIM) c -r -d:ssl tests/test_stream.nim
test-input:
@echo "Running Input tests..."
$(NIM) c -r -d:ssl tests/test_input.nim
package-deb:
@echo "Building Debian package..."
@./scripts/build-deb.sh
package-npm:
@echo "Building npm package..."
@./scripts/npm-publish.sh
cross-compile:
@echo "Building cross-platform binaries..."
@./scripts/build-cross-platform.sh
release:
@echo "Building full release artifacts..."
@./scripts/release-all.sh
help:
@echo "Targets:"
@echo " build - Debug build (default)"
@echo " release - Build full release artifacts (.deb, npm, cross-platform)"
@echo " cross-compile - Build binaries for all supported platforms"
@echo " package-deb - Build Debian package for host architecture"
@echo " package-npm - Build npm package (no publish)"
@echo " clean - Remove binary and test executables"
@echo " run - Build and run"
@echo " test - Run all unit tests"
@echo " test-tui - Run TUI module tests"
@echo " test-statusbar - Run Status Bar tests"
@echo " test-stream - Run Stream callback tests"
@echo " test-input - Run Input handling tests"