-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
47 lines (34 loc) · 958 Bytes
/
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
all: fd.img
fs: boot/uefi/boot.efi kernel/kernel_64.bin apps/apps.img
mkdir -p $@/EFI/BOOT
cp boot/uefi/boot.efi $@/EFI/BOOT/BOOTX64.EFI
cp kernel/kernel_64.bin $@/kernel.bin
cp apps/apps.img $@/apps.img
fd.img: boot/legacy_bios/boot.bin kernel/kernel.bin apps/apps.img
cat $+ > $@
boot/uefi/boot.efi:
make -C boot/uefi
boot/legacy_bios/boot.bin:
make -C boot/legacy_bios
kernel/kernel_64.bin:
make -C kernel kernel_64.bin x86_64=true
kernel/kernel.bin:
make -C kernel kernel.bin
apps/apps.img:
make -C apps
doc:
make -C doc
clean:
make -C boot/uefi clean
make -C boot/legacy_bios clean
make -C kernel clean
make -C apps clean
make -C doc clean
rm -rf *~ *.o *.bin *.dat *.img *.map fs
run: run32
run64: fs/EFI/BOOT/BOOTX64.EFI
qemu-system-x86_64 -bios OVMF.fd -hda fat:fs
run32: fd.img
qemu-system-i386 -fda $<
.PHONY: boot/legacy_bios/boot.bin boot/uefi/boot.efi kernel/kernel.bin \
apps/apps.img doc clean run run64 run32