-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (26 loc) · 819 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
GCCPARAMS = -m32
ASPARAMS = --32
LDPARAMS = -melf_i386
objects = obj/loader.o \
obj/kernel.o
obj/%.o: src/%.cpp
mkdir -p $(@D)
g++ $(GCCPARAMS) -c -o $@ $<
obj/%.o: src/%.s
mkdir -p $(@D)
as $(ASPARAMS) -o $@ $<
kernel.bin: linker.ld $(objects)
ld $(LDPARAMS) -T $< -o bin/$@ $(objects)
rm $(objects)
kernel.iso: kernel.bin
grub-mkrescue --output=bin/$@ bin
run: kernel.iso
(pkill VirtualBoxVM) || true
VirtualBoxVM --startvm "simple-os" &
wsl-run: kernel.iso
(powershell.exe "taskkill /IM "VirtualBoxVM.exe" /F") || true
/mnt/c/Program\ Files/Oracle/VirtualBox/VirtualBoxVM.exe --startvm "simple-os" &
build-docker-image:
docker build --platform linux/x86-64 -t simple-os .
docker:
docker run --rm -v "$$(pwd)":/simple-os --platform linux/x86-64 simple-os