PiegOS/kernel/Makefile

28 lines
408 B
Makefile
Raw Normal View History

2015-07-19 11:52:01 +04:00
2015-07-20 16:58:34 +04:00
#----- Kernel -----
2015-07-20 16:34:46 +04:00
kernel.bin:entry.o main.o GDT/gdt.o
ld -m elf_i386 --entry=_start -Ttext=0x100000 -o $@ $^
2015-07-20 16:58:34 +04:00
#-----------------
2015-07-19 11:52:01 +04:00
2015-07-20 16:58:34 +04:00
#----- Entry & Main-----
2015-07-19 11:52:01 +04:00
entry.o:entry.asm
nasm -f elf $^
2015-07-20 16:34:46 +04:00
main.o:main.cpp
g++ -Wall -m32 -c $^ -o $@
2015-07-20 16:58:34 +04:00
#-----------------------
#----- GDT -----
2015-07-20 16:34:46 +04:00
GDT/gdt.o:
2015-07-20 16:58:34 +04:00
cd ./GDT && make
#---------------
2015-07-18 20:23:49 +04:00
2015-07-20 16:58:34 +04:00
#----- Other -----
2015-07-18 20:23:49 +04:00
clean:
2015-07-20 16:34:46 +04:00
cd ./GDT/ && make clean
2015-07-19 11:52:01 +04:00
rm ./*.o
2015-07-20 16:34:46 +04:00
rm ./kernel.bin