summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/arm64-efi.make
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-15 18:35:34 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-15 18:35:34 +0200
commitf3d931aa7cfaf96baef8383b59a8938779541ee7 (patch)
treefdb9fc51badb3dbd03e46ab0766a49d9522e13e2 /dev/Kernel/arm64-efi.make
parent86640816e8b1d3595365f1fcc8a2a9e61fb40ff1 (diff)
[IMP] Moved source code into dev/ folder.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/arm64-efi.make')
-rw-r--r--dev/Kernel/arm64-efi.make68
1 files changed, 68 insertions, 0 deletions
diff --git a/dev/Kernel/arm64-efi.make b/dev/Kernel/arm64-efi.make
new file mode 100644
index 00000000..410e7789
--- /dev/null
+++ b/dev/Kernel/arm64-efi.make
@@ -0,0 +1,68 @@
+##################################################
+# (C) ZKA Technologies, all rights reserved.
+# This is the microkernel makefile.
+##################################################
+
+CC = clang++
+LD = lld-link
+CCFLAGS = -fshort-wchar -c -ffreestanding -MMD -mno-red-zone -D__NEWOS_ARM64__ -fno-rtti -fno-exceptions -I./ \
+ -target aarch64-unknown-windows \
+ -std=c++20 -D__FSKIT_USE_NEWFS__ -D__ZETA_MACHINE__ -D__NEWOSKRNL__ -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -I../
+
+ASM = clang++
+
+DISKDRIVER = -D__FLASH_MEM__
+
+ifneq ($(SDCARD_SUPPORT), )
+DISKDRIVER = -D__SDCARD__
+endif
+
+ifneq ($(DEBUG_SUPPORT), )
+DEBUG = -D__DEBUG__
+endif
+
+COPY = cp
+
+LDFLAGS = -subsystem:efi_application -entry:hal_init_platform /nodefaultlib
+LDOBJ = Objects/*.obj
+
+# This file is the kernel, responsible of task management and memory.
+KERNEL = newoskrnl.dll
+
+.PHONY: error
+error:
+ @echo "=== ERROR ==="
+ @echo "=> Use a specific target."
+
+MOVEALL=./MoveAll.ARM64.sh
+
+.PHONY: newos-arm64-epm
+newos-arm64-epm: clean
+ $(CC) $(CCFLAGS) $(DISKDRIVER) $(DEBUG) $(wildcard Sources/*.cxx) \
+ $(wildcard Sources/FS/*.cxx) $(wildcard HALKit/ARM64/Storage/*.cxx) \
+ $(wildcard HALKit/ARM64/PCI/*.cxx) $(wildcard Sources/Network/*.cxx) $(wildcard Sources/Storage/*.cxx) \
+ $(wildcard HALKit/ARM64/*.cxx) $(wildcard HALKit/ARM64/*.cpp) \
+ $(wildcard HALKit/ARM64/*.s)
+
+ $(MOVEALL)
+
+OBJCOPY=x86_64-w64-mingw32-objcopy
+
+.PHONY: link-arm64-epm
+link-arm64-epm:
+ $(LD) $(LDFLAGS) $(LDOBJ) /out:$(KERNEL)
+
+.PHONY: all
+all: newos-arm64-epm link-arm64-epm
+ @echo "NewOSKrnl => OK."
+
+.PHONY: help
+help:
+ @echo "=== HELP ==="
+ @echo "all: Build kernel and link it."
+ @echo "link-arm64-epm: Link kernel for EPM based disks."
+ @echo "newos-arm64-epm: Build kernel for EPM based disks."
+
+.PHONY: clean
+clean:
+ rm -f $(LDOBJ) $(wildcard *.o) $(KERNEL)