-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 948 Bytes
/
Copy pathMakefile
File metadata and controls
35 lines (26 loc) · 948 Bytes
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
ARTIFACTS = build/artifacts
K32CORE_ARTIFACTS = $(ARTIFACTS)/k32-core/
BUILT_ISO = $(ARTIFACTS)/JuiceOS.iso
K32CORE_LINKERSCRIPT = build/kernel.ld
ISOBUILD_DIR = build/iso
K32CORE_LINKED_EXECUTABLE = $(ISOBUILD_DIR)/juiceos_k32.elf
gen-iso: build-core
@grub-mkrescue -V "JuiceOS" -d /usr/lib/grub/i386-pc -o $(BUILT_ISO) $(ISOBUILD_DIR)
@echo ".ISO Generated!"
build-core:
@echo "Configuring Kernel32-Core CMake project and building..."
@cmake -S core -B $(K32CORE_ARTIFACTS) -G Ninja -DCMAKE_BUILD_TYPE=Debug
@ninja -C $(K32CORE_ARTIFACTS)
@echo "Linking the output K32CORE executable..."
@ld -m elf_i386 -T $(K32CORE_LINKERSCRIPT) -o $(K32CORE_LINKED_EXECUTABLE) $(K32CORE_ARTIFACTS)/libK32_Core.a
@echo "Build successfull!"
clean:
@rm -rf $(ARTIFACTS)
@rm -f $(K32CORE_LINKED_EXECUTABLE)
clean-generated:
@rm -f *.gen.sh
@rm -f *.gen.bat
gen-runs:
@python3 runscript-gen.py
run:
@qemu-system-x86_64 -cdrom $(BUILT_ISO)