diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-19 21:17:21 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-19 21:17:34 +0200 |
| commit | e5a591054ea0992acc3cb786d3af9f358febca6d (patch) | |
| tree | 7d580ed0c046886297983181266fcdb37e293155 | |
| parent | c62c67a3863213ea6da3aa6ec4530c9e8287933d (diff) | |
MHR-5: Improve makefile, and separating them for each platform.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
| -rw-r--r-- | Private/makefile | 19 | ||||
| -rw-r--r-- | Public/Developer/SystemLib/amd64.mk (renamed from Public/Developer/SystemLib/Makefile) | 0 |
2 files changed, 12 insertions, 7 deletions
diff --git a/Private/makefile b/Private/makefile index 412739ca..ffefecf2 100644 --- a/Private/makefile +++ b/Private/makefile @@ -5,25 +5,28 @@ CC = x86_64-w64-mingw32-gcc LD = x86_64-w64-mingw32-ld -CCFLAGS = -c -ffreestanding -D__NEWOS_AMD64__ -mgeneral-regs-only -mno-red-zone -fno-rtti -fno-exceptions -std=c++20 -D__FSKIT_NEWFS__ -D__KERNEL__ -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -I../ -I./ +CCFLAGS = -c -ffreestanding -D__NEWOS_AMD64__ -mgeneral-regs-only -mno-red-zone -fno-rtti -fno-exceptions -std=c++20 -D__FSKIT_NEWFS__ -D__KERNEL__ -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -I../ -I./ ASM = nasm ifneq ($(ATA_PIO_SUPPORT), ) -DISKDRIVER = -D__ATA_PIO__ +DISKDRIVER = -D__ATA_PIO__ endif ifneq ($(ATA_DMA_SUPPORT), ) -DISKDRIVER = -D__ATA_DMA__ +DISKDRIVER = -D__ATA_DMA__ endif ifneq ($(AHCI_SUPPORT), ) -DISKDRIVER = -D__AHCI__ +DISKDRIVER = -D__AHCI__ endif ifneq ($(DEBUG_SUPPORT), ) -DEBUG = -D__DEBUG__ +DEBUG = -D__DEBUG__ endif +SLEEP = sleep 1 +COPY = cp + # Add assembler, linker, and object files variables. ASMFLAGS = -f win64 LDFLAGS = -e Main --subsystem=17 @@ -50,14 +53,16 @@ newos-amd64-epm: clean $(ASM) $(ASMFLAGS) HALKit/AMD64/HalSMPCoreManager.asm $(ASM) $(ASMFLAGS) HALKit/AMD64/HalNewBoot.asm $(ASM) $(ASMFLAGS) HALKit/AMD64/HalInstallTIB.asm + $(SLEEP) $(MOVEALL) -OBJCOPY=x86_64-w64-mingw32-objcopy +OBJCOPY=x86_64-w64-mingw32-objcopy .PHONY: link-amd64-epm link-amd64-epm: + $(SLEEP) $(LD) $(LDFLAGS) $(LDOBJ) -o $(KERNEL) - cp $(KERNEL) Root/Boot + $(COPY) $(KERNEL) Root/Boot .PHONY: all all: newos-amd64-epm link-amd64-epm diff --git a/Public/Developer/SystemLib/Makefile b/Public/Developer/SystemLib/amd64.mk index a753ccc8..a753ccc8 100644 --- a/Public/Developer/SystemLib/Makefile +++ b/Public/Developer/SystemLib/amd64.mk |
