TCC-anothertry begins
This commit is contained in:
parent
946c9e468d
commit
12e7efb8b5
6 changed files with 87 additions and 84 deletions
16
Makefile
16
Makefile
|
@ -1,23 +1,21 @@
|
|||
all: build/kernel-i386.elf
|
||||
clean:
|
||||
-@rm build/*.o build/*.elf 2> /dev/null || true
|
||||
-@rm build/* 2> /dev/null || true
|
||||
|
||||
build/start32.o: build/ src/start32.asm
|
||||
nasm -felf32 src/start32.asm -o build/start32.o
|
||||
build/kernel-i386.elf: build/start32.o
|
||||
tcc -m32 -nostdlib -Wl,-Ttext,0x100000 -o build/kernel-i386.elf src/*.c build/start32.o
|
||||
build/kernel-i386.elf: src/*
|
||||
tcc -m32 -nostdlib -Wl,-Ttext,0x100000 -o build/kernel-i386.elf src/start32.s src/*.c
|
||||
image: build/kernel-i386.elf mount
|
||||
cp build/kernel-i386.elf mnt/
|
||||
cp build/kernel-i386.elf mnt/roska/start32.elf
|
||||
sync
|
||||
|
||||
qemu-multiboot: build/kernel-i386.elf
|
||||
qemu-system-i386 -kernel build/kernel-i386.elf -serial stdio
|
||||
qemu-image: image
|
||||
qemu-system-i386 koalemos.img -serial stdio
|
||||
qemu-system-i386 roska.img -serial stdio
|
||||
|
||||
mount: koalemos.img mnt/
|
||||
mount: roska.img mnt/
|
||||
@if ! mountpoint -q "mnt/"; then \
|
||||
sudo mount -o loop,offset=1048576,umask=177,dmask=022,uid=$(shell id -u),gid=$(shell id -g) koalemos.img mnt/; \
|
||||
sudo mount -o loop,offset=1048576,umask=177,dmask=022,uid=$(shell id -u),gid=$(shell id -g) roska.img mnt/; \
|
||||
fi;
|
||||
umount:
|
||||
@sudo umount mnt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue