-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (49 loc) · 2.89 KB
/
Copy pathMakefile
File metadata and controls
68 lines (49 loc) · 2.89 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
# GhostFS Makefile
# Usage:
# make normal — build Normal mode (release)
# make cybersec — build Cybersec mode (release)
# make normal-debug — build Normal mode (debug)
# make test — run tests for both modes
# make install — install to /usr/local/bin
# make clean — clean build artifacts
INSTALL_DIR ?= /usr/local/bin
CARGO ?= cargo
.PHONY: all normal cybersec normal-debug cybersec-debug test install clean fmt check
all: normal
# ── Release builds ──────────────────────────────────────────────────────────
normal:
@echo "▶ Building GhostFS Normal (release)..."
$(CARGO) build --release --features normal,zstd,lz4
@echo "✓ Binary: target/release/ghostfs"
cybersec:
@echo "▶ Building GhostFS Cybersec (release)..."
$(CARGO) build --no-default-features --release --features cybersec,zstd,lz4
@echo "✓ Binary: target/release/ghostfs [CYBERSEC MODE]"
# ── Debug builds ────────────────────────────────────────────────────────────
normal-debug:
$(CARGO) build --features normal,zstd,lz4
cybersec-debug:
$(CARGO) build --no-default-features --features cybersec,zstd,lz4
# ── Tests ───────────────────────────────────────────────────────────────────
test:
@echo "▶ Testing Normal mode..."
$(CARGO) test --features normal,zstd,lz4
@echo "▶ Testing Cybersec mode..."
$(CARGO) test --no-default-features --features cybersec,zstd,lz4
# ── Install ─────────────────────────────────────────────────────────────────
install: normal
install -m 755 target/release/ghostfs $(INSTALL_DIR)/ghostfs
@echo "✓ Installed to $(INSTALL_DIR)/ghostfs"
install-cybersec: cybersec
install -m 755 target/release/ghostfs $(INSTALL_DIR)/ghostfs-cybersec
@echo "✓ Installed to $(INSTALL_DIR)/ghostfs-cybersec"
# ── Code quality ────────────────────────────────────────────────────────────
fmt:
$(CARGO) fmt --all
check:
$(CARGO) check --features normal,zstd,lz4
$(CARGO) check --no-default-features --features cybersec,zstd,lz4
$(CARGO) clippy --features normal,zstd,lz4 -- -D warnings
# ── Clean ───────────────────────────────────────────────────────────────────
clean:
$(CARGO) clean