diff --git a/.gitignore b/.gitignore index 1f1b438..e8de2ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ *.o *.bin - +*.kate-swp diff --git a/out/.gitignore b/out/.gitignore new file mode 100644 index 0000000..db47bd9 --- /dev/null +++ b/out/.gitignore @@ -0,0 +1 @@ +!./.gitignore diff --git a/Makefile b/src/Makefile similarity index 92% rename from Makefile rename to src/Makefile index 1c4c215..3c7d119 100644 --- a/Makefile +++ b/src/Makefile @@ -11,11 +11,14 @@ objectfiles = loader.o kernel.o # The rule to compile object files from kernel files. %.o: %.cpp g++ ${GPP_PARAMS} -o $@ -c $< + mv $@ ../out %.o: %.s as ${AS_PARAMS} -o $@ $< - + mv $o ../out + mykernel.bin: linker.ld ${objectfiles} ld ${LD_PARAMS} -T $< -o $@ ${objectfiles} - + mv $o ../out + install: mykernel.bin sudo cp $< /boot/mykernel.bin diff --git a/kernel.cpp b/src/kernel.cpp similarity index 100% rename from kernel.cpp rename to src/kernel.cpp diff --git a/linker.ld b/src/linker.ld similarity index 100% rename from linker.ld rename to src/linker.ld diff --git a/loader.s b/src/loader.s similarity index 100% rename from loader.s rename to src/loader.s