2015-07-20 17:18:27 +04:00
|
|
|
CXX=g++ -Wall -m32
|
|
|
|
EXEC=kernel.bin
|
2015-07-19 11:52:01 +04:00
|
|
|
|
2015-07-20 17:18:27 +04:00
|
|
|
export CXX
|
|
|
|
|
|
|
|
all:$(EXEC)
|
2015-07-20 16:58:34 +04:00
|
|
|
|
|
|
|
#----- Kernel -----
|
2015-07-20 20:06:20 +04:00
|
|
|
$(EXEC):entry.o main.o GDT/gdt.o Helpers/helpers.o
|
2015-07-21 14:26:49 +04:00
|
|
|
$(CXX) --entry=_kernelEntry -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
|
2015-07-20 17:18:27 +04:00
|
|
|
$(CXX) -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-20 20:06:20 +04:00
|
|
|
#----- Helpers -----
|
|
|
|
Helpers/helpers.o:
|
|
|
|
cd ./Helpers/ && make
|
|
|
|
#---------------
|
2015-07-18 20:23:49 +04:00
|
|
|
|
2015-07-20 16:58:34 +04:00
|
|
|
#----- Other -----
|
2015-07-20 17:23:21 +04:00
|
|
|
.PHONY:clean
|
|
|
|
|
2015-07-18 20:23:49 +04:00
|
|
|
clean:
|
2015-07-20 16:34:46 +04:00
|
|
|
cd ./GDT/ && make clean
|
2015-07-21 16:53:10 +04:00
|
|
|
-rm ./*.o
|
|
|
|
-rm ./$(EXEC)
|
2015-07-20 17:18:27 +04:00
|
|
|
#-----------------
|