-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
57 lines (46 loc) · 1.21 KB
/
Makefile
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
.PHONY: all
all: boot.iso
.PHONY: run
run: boot.iso
./run.sh
.PHONY: clean
clean:
rm -f iso_root boot.iso
$(MAKE) -C stdlib clean
$(MAKE) -C kernel clean
$(MAKE) -C init clean
$(MAKE) -C shell clean
$(MAKE) -C hello clean
$(MAKE) -C echo clean
$(MAKE) -C test clean
.PHONY: stdlib
stdlib:
$(MAKE) -C stdlib
.PHONY: kernel
kernel: stdlib
$(MAKE) -C kernel
.PHONY: init
init: stdlib
$(MAKE) -C init
.PHONY: hello
hello: stdlib
$(MAKE) -C hello
.PHONY: echo
echo: stdlib
$(MAKE) -C echo
.PHONY: shell
shell: stdlib
$(MAKE) -C shell
.PHONY: test
test: stdlib
$(MAKE) -C test
limine:
git clone https://github.com/limine-bootloader/limine.git --branch=v2.0-branch-binary --depth=1
$(MAKE) -C limine
boot.iso: limine kernel test init hello echo shell limine.cfg
rm -rf iso_root
mkdir -p iso_root
cp kernel/kernel.elf test/test init/init hello/hello echo/echo shell/shell limine.cfg limine/limine.sys limine/limine-cd.bin limine/limine-eltorito-efi.bin iso_root/
xorriso -as mkisofs -b limine-cd.bin -no-emul-boot -boot-load-size 4 -boot-info-table --efi-boot limine-eltorito-efi.bin -efi-boot-part --efi-boot-image --protective-msdos-label iso_root -o boot.iso
limine/limine-install boot.iso
rm -rf iso_root