-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (48 loc) · 1.59 KB
/
Copy pathMakefile
File metadata and controls
58 lines (48 loc) · 1.59 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
ARCH ?= i686
BUILD ?= Debug
DIST_DIR = dist
BUILD_DIR = build
.PHONY: all build rebuild-image run debug clean help
all: build
build:
$(MAKE) --no-print-directory -C buildsystem/$(ARCH) build BUILD=$(BUILD)
rebuild-image:
$(MAKE) --no-print-directory -C buildsystem/$(ARCH) rebuild-image
run:
qemu-system-i386 -debugcon stdio \
-no-reboot \
-cdrom $(DIST_DIR)/Sodium.iso \
-audiodev pa,id=speaker -machine pcspk-audiodev=speaker \
-m 4G
debug:
qemu-system-i386 -debugcon stdio \
-no-reboot \
-cdrom $(DIST_DIR)/Sodium.iso -s -S \
-audiodev pa,id=speaker -machine pcspk-audiodev=speaker \
-m 4G &
gdb -ex "set architecture i386" \
-ex "target remote :1234" \
-ex "symbol-file $(DIST_DIR)/sodium.dbg"
clean:
$(MAKE) --no-print-directory -C buildsystem/$(ARCH) clean
rm -rf $(BUILD_DIR) $(DIST_DIR)
vnc:
websockify --web /usr/share/novnc/ 6080 localhost:5900
help:
@echo "Sodium OS Build System"
@echo ""
@echo "Targets:"
@echo " build - Build the OS (default)"
@echo " run - Run in QEMU"
@echo " debug - Run in QEMU with GDB attached"
@echo " clean - Remove build artifacts"
@echo " vnc - Starts a novnc webserver that connects to QEMU"
@echo " rebuild-image - Force a full Docker image rebuild"
@echo ""
@echo "Options:"
@echo " ARCH=i686 Target architecture (default: i686)"
@echo " BUILD=Debug Build type: Debug or Release (default: Debug)"
@echo ""
@echo "Output:"
@echo " $(DIST_DIR)/Sodium.iso Bootable ISO"
@echo " $(DIST_DIR)/sodium.dbg Debug symbols (Debug builds only)"