aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAleksa Vučković <aleksav013@gmail.com>2022-05-28 00:27:42 +0200
committerAleksa Vučković <aleksav013@gmail.com>2022-05-28 00:27:42 +0200
commit013366f9eea59bb1b2ee1985580f37a32c20ee76 (patch)
tree0a29d219f8db022cc4bdb5361d5bd8efc99bc41c /include
parentbb6b3ae8a78a59a30e8e97d02203be636d21b6fb (diff)
makefile & komentarisanje koda (treci deo)
Diffstat (limited to 'include')
-rw-r--r--include/00.build/AS_Makefile6
-rw-r--r--include/00.build/C_Makefile8
-rwxr-xr-xinclude/setup.sh4
3 files changed, 17 insertions, 1 deletions
diff --git a/include/00.build/AS_Makefile b/include/00.build/AS_Makefile
new file mode 100644
index 0000000..c8919d7
--- /dev/null
+++ b/include/00.build/AS_Makefile
@@ -0,0 +1,6 @@
+.PHONY: all
+
+all: $(AS_OBJECTS)
+
+$(AS_OBJECT_DIR)/%.o: %.s Makefile
+ $(AS) $< -o $@
diff --git a/include/00.build/C_Makefile b/include/00.build/C_Makefile
new file mode 100644
index 0000000..b8fe609
--- /dev/null
+++ b/include/00.build/C_Makefile
@@ -0,0 +1,8 @@
+.PHONY: all
+
+all: $(C_OBJECTS)
+
+$(C_OBJECT_DIR)/%.o: %.c Makefile
+ $(CC) $(CFLAGS) -MD -MP -c $< -o $@
+
+-include $(C_OBJECTS:.o=.d)
diff --git a/include/setup.sh b/include/setup.sh
index d3227df..86645fd 100755
--- a/include/setup.sh
+++ b/include/setup.sh
@@ -5,7 +5,9 @@ rm -rf "00.build" "01.pocetak" "02.vga" "03.gdt" "04.idt" "05.irq" "06.keyboard"
mkdir "00.build" "01.pocetak" "02.vga" "03.gdt" "04.idt" "05.irq" "06.keyboard" "07.pit" "08.heap" "09.paging" "10.libc"
cp ../../aleksa-toolchain/setup.sh 00.build
-cp ../../mykernel/Makefile ./00.build
+cp ../../mykernel/Makefile ./00.build/Makefile
+cp ../../mykernel/src/as/Makefile ./00.build/AS_Makefile
+cp ../../mykernel/src/c/Makefile ./00.build/C_Makefile
cp ../../mykernel/src/as/boot.s ./01.pocetak
cd 01.pocetak || exit