-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
88 lines (70 loc) · 1.96 KB
/
Makefile
File metadata and controls
88 lines (70 loc) · 1.96 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
# Cyberlusion Master Makefile
# GNU Make 4.0+ required
.PHONY: all clean test verify audit deploy
# Compiler and tool configuration
CC := arm-none-eabi-gcc
CXX := arm-none-eabi-g++
RUST := rustc
COQ := coqc
SPIN := spin
AFL := afl-fuzz
# Security flags
SECURITY_FLAGS := -fstack-protector-strong \
-fPIE -pie \
-D_FORTIFY_SOURCE=2 \
-Wformat -Wformat-security \
-fno-strict-overflow \
-fno-delete-null-pointer-checks
# Targets
all: bootloader firmware neural_stack security_engine
bootloader:
@echo "Building secure bootloader..."
$(MAKE) -C src/layer1_firmware/bootloader
firmware:
@echo "Building RTOS and firmware..."
$(MAKE) -C src/layer1_firmware/rtos
neural_stack:
@echo "Building neural interface stack..."
$(MAKE) -C src/layer2_neural
security_engine:
@echo "Building behavioral security engine..."
$(MAKE) -C src/layer3_security
# Testing targets
test: unit_test integration_test security_test
unit_test:
@echo "Running unit tests..."
@pytest tests/unit/
integration_test:
@echo "Running integration tests..."
@pytest tests/integration/
security_test:
@echo "Running security tests..."
@python3 tools/analysis/security_scan.py
# Formal verification
verify:
@echo "Running formal verification..."
$(MAKE) -C verification/formal
# Security audit
audit:
@echo "Running security audit..."
@cargo audit
@safety check
@bandit -r src/
# Fuzzing
fuzz:
@echo "Starting fuzzing campaign..."
$(AFL) -i tests/fuzzing/input -o tests/fuzzing/output ./build/test/fuzz_target
# Documentation
docs:
@echo "Building documentation..."
@doxygen Doxyfile
@mkdocs build
# Deployment
deploy: verify audit
@echo "Preparing deployment package..."
@bash tools/deployment/package.sh
clean:
@echo "Cleaning build artifacts..."
@rm -rf build/
@find . -name "*.o" -delete
@find . -name "*.pyc" -delete