-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
128 lines (109 loc) · 3.56 KB
/
Makefile
File metadata and controls
128 lines (109 loc) · 3.56 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
# AetherOS Build System
# Builds kernel, compiler, and creates bootable images
.PHONY: all kernel compiler examples clean test qemu raspberry-pi docker help
# Default target
all: kernel compiler
# Help target
help:
@echo "AetherOS Build System v10.2 (Supreme Grade)"
@echo ""
@echo "Targets:"
@echo " all - Build kernel and compiler (default)"
@echo " kernel - Build Quantum Microkernel"
@echo " compiler - Build AetherScript Compiler"
@echo " examples - Compile example applications"
@echo " audit - Perform Military-Grade Audit"
@echo " test - Run all tests"
@echo " qemu - Run in QEMU emulator"
@echo " raspberry-pi - Create Raspberry Pi SD image"
@echo " clean - Clean all build artifacts"
@echo " docker - Build Docker development environment"
# Kernel build
kernel:
@echo "=== Building Quantum Microkernel ==="
cd kernel && cargo build --release
@echo "✓ Kernel built successfully"
# Compiler build
compiler:
@echo "=== Building AetherScript Compiler ==="
cd compiler && cargo build --release
@echo "✓ Compiler built successfully"
# Example applications
examples: compiler
@echo "=== Compiling Examples ==="
./compiler/target/release/aetherc examples/hello_distributed.aethersrc --output examples/hello.rs --verbose
@echo "✓ Examples compiled"
# Audit target (Phase 28.4 sync)
audit:
@echo "=== Performing Military-Grade Audit ==="
cd kernel && cargo check
@echo "✓ Static analysis verified"
# Run tests
test:
@echo "=== Running Tests ==="
cargo test --workspace --verbose
@echo "✓ All tests passed"
# QEMU emulation
qemu: kernel
@echo "=== Starting QEMU Emulation ==="
qemu-system-aarch64 \
-M virt \
-cpu cortex-a72 \
-smp 4 \
-m 2G \
-kernel kernel/target/aarch64-unknown-none/release/aetheros-kernel \
-nographic \
-serial mon:stdio
# Raspberry Pi image
raspberry-pi: kernel
@echo "=== Creating Raspberry Pi SD Image ==="
@echo "Not yet implemented - requires bootloader integration"
# Docker development environment
docker:
@echo "=== Building Docker Image ==="
docker build -t aetheros-dev -f Dockerfile .
@echo "✓ Docker image built"
@echo "Run: docker run -it --rm -v $$(pwd):/aetheros aetheros-dev"
# Android Boot Image Target
android-image: kernel
@echo "=== Building Android boot.img ==="
@if exist bsp/android/build_bootimg.sh ( \
bash bsp/android/build_bootimg.sh \
kernel/target/aarch64-unknown-none/release/aetheros-kernel \
aetheros-boot.img \
) else ( \
echo "Skipping boot.img build: script not found" \
)
# Flash/Boot on Android Device
flash-android: android-image
@echo "=== Booting on Android Device ==="
@if exist bsp/android/flash.sh ( \
bash bsp/android/flash.sh aetheros-boot.img \
) else ( \
echo "Skipping flash: script not found" \
)
# x86_64 ISO Image Target (GRUB)
iso-image:
@echo "=== Building x86_64 ISO Image v10.2 (Supreme Grade) ==="
cd kernel && cargo build --release --target x86_64-unknown-none
@mkdir -p iso/boot/grub
@cp kernel/target/x86_64-unknown-none/release/aetheros-kernel iso/boot/aetheros_kernel
@grub-mkrescue -o aetheros.iso iso 2> /dev/null || \
echo "WARNING: grub-mkrescue not found locally. Please run: wsl grub-mkrescue -o aetheros.iso iso"
# Clean
clean:
@echo "=== Cleaning Build Artifacts ==="
cd kernel && cargo clean
cd compiler && cargo clean
rm -f examples/*.rs
@echo "✓ Clean complete"
# Development shortcuts
dev-kernel:
cd kernel && cargo build
dev-compiler:
cd compiler && cargo build
dev-test:
cargo test --workspace
# Continuous integration
ci: test
@echo "=== CI Build Complete ==="