diff options
| author | Amlal EL Mahrouss <amlal@softwarelabs.com> | 2024-06-17 08:55:10 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlal@softwarelabs.com> | 2024-06-17 08:55:10 +0200 |
| commit | 9a6367cd51f4a8544e2ee7c68f1cca401b4f0066 (patch) | |
| tree | ccfd918d409514592f09499095d92d8f3ab600a2 | |
| parent | c4cbc986ac68dbfdc743efec58c72ebb74d3f3b0 (diff) | |
MHR-31: Create makefiles according to targets.
Signed-off-by: Amlal EL Mahrouss <amlal@softwarelabs.com>
| -rw-r--r-- | Boot/amd64-efi.make (renamed from Boot/makefile) | 0 | ||||
| -rw-r--r-- | Kernel/amd64-efi.make | 12 | ||||
| -rw-r--r-- | Kernel/arm64-cb.make | 18 |
3 files changed, 13 insertions, 17 deletions
diff --git a/Boot/makefile b/Boot/amd64-efi.make index 37ac3704..37ac3704 100644 --- a/Boot/makefile +++ b/Boot/amd64-efi.make diff --git a/Kernel/amd64-efi.make b/Kernel/amd64-efi.make index 7e076a8d..b7ca45e9 100644 --- a/Kernel/amd64-efi.make +++ b/Kernel/amd64-efi.make @@ -6,7 +6,7 @@ CC = x86_64-w64-mingw32-gcc LD = x86_64-w64-mingw32-ld CCFLAGS = -c -fPIC -ffreestanding -D__NEWOS_AMD64__ -mno-red-zone -fno-rtti -fno-exceptions \ - -std=c++20 -D__FSKIT_NEWFS__ -D__KERNEL__ -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -I../ -I./ + -std=c++20 -D__FSKIT_NEWFS__ -D__KERNEL__ -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -I./ ASM = nasm @@ -70,17 +70,17 @@ link-amd64-epm: .PHONY: all all: newos-amd64-epm link-amd64-epm - qemu-img create -f raw newoskrnl.rom 512K - dd if=newoskrnl.exe of=newoskrnl.rom bs=1 seek=0 conv=notrunc + qemu-img create -f raw newoskrnl.512k.exe 512K + dd if=newoskrnl.exe of=newoskrnl.512k.exe bs=1 seek=0 conv=notrunc @echo "NewOSKrnl => OK." .PHONY: help help: @echo "=== HELP ===" @echo "all: Build kernel and link it." - @echo "link-amd64-epm: Link kernel. (EPM AMD64)" - @echo "newos-amd64-epm: Build kernel. (EPM AMD64)" + @echo "link-amd64-epm: Link kernel for EPM based disks." + @echo "newos-amd64-epm: Build kernel for EPM based disks." .PHONY: clean clean: - rm -f $(LDOBJ) $(KERNEL) + rm -f $(LDOBJ) $(wildcard *.o) $(KERNEL) diff --git a/Kernel/arm64-cb.make b/Kernel/arm64-cb.make index 3b24bcdb..ac7ccd2d 100644 --- a/Kernel/arm64-cb.make +++ b/Kernel/arm64-cb.make @@ -3,9 +3,9 @@ # This is the microkernel makefile. ################################################## -CC = arm-none-eabi-gcc.exe +CC = arm-none-eabi-g++.exe LD = arm-none-eabi-ld.exe -CCFLAGS = -c -fPIC -ffreestanding -D__NEWOS_ARM64__ -fno-rtti -fno-exceptions -I../ -I./ \ +CCFLAGS = -c -fPIC -ffreestanding -D__NEWOS_ARM64__ -fno-rtti -fno-exceptions -I./ \ -std=c++20 -D__FSKIT_NEWFS__ -D__KERNEL__ -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ ASM = arm-none-eabi-as.exe @@ -22,10 +22,6 @@ endif COPY = cp -# Add assembler, linker, and object files variables. -ASMFLAGS = -f elf64 - -# NewOS subsystem is 17 and entrypoint is __ImageStart LDFLAGS = -e __ImageStart LDOBJ = Objects/*.obj @@ -57,17 +53,17 @@ link-arm64-epm: .PHONY: all all: newos-arm64-epm link-arm64-epm - qemu-img create -f raw newoskrnl.rom 512K - dd if=newoskrnl.exe of=newoskrnl.rom bs=1 seek=0 conv=notrunc + qemu-img create -f raw newoskrnl.512k.exe 512K + dd if=newoskrnl.exe of=newoskrnl.512k.exe bs=1 seek=0 conv=notrunc @echo "NewOSKrnl => OK." .PHONY: help help: @echo "=== HELP ===" @echo "all: Build kernel and link it." - @echo "link-arm64-epm: Link kernel. (EPM AMD64)" - @echo "newos-arm64-epm: Build kernel. (EPM AMD64)" + @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) $(KERNEL) + rm -f $(LDOBJ) $(wildcard *.o) $(KERNEL) |
