diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-05 16:30:15 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-05 16:30:15 +0200 |
| commit | 5a903c1d8f80ca8d7bc5fbea0aea710ce0133f9d (patch) | |
| tree | f7ef5668d47b32e9243e5077e1e5dea6e69edcce /Private | |
| parent | 6898b7a9f1cf82fb65f6b6fae88db0a0b765a924 (diff) | |
MHR-23: made makefile more readable.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private')
| -rw-r--r-- | Private/NewBoot/Source/makefile | 20 | ||||
| -rw-r--r-- | Private/makefile | 10 |
2 files changed, 21 insertions, 9 deletions
diff --git a/Private/NewBoot/Source/makefile b/Private/NewBoot/Source/makefile index a7eb0910..9a03b312 100644 --- a/Private/NewBoot/Source/makefile +++ b/Private/NewBoot/Source/makefile @@ -24,7 +24,12 @@ endif IMG=epm.img IMG_2=epm-slave.img -EMU_FLAGS=-net none -smp 4 -m 4G -M q35 -bios OVMF.fd -device piix3-ide,id=ide -drive id=disk,file=$(IMG),format=raw,if=none -device ide-hd,drive=disk,bus=ide.0 -drive file=fat:rw:CDROM,index=2,format=raw -d int -hdd epm-slave.img + +EMU_FLAGS=-net none -smp 4 -m 4G -M q35 \ + -bios OVMF.fd -device piix3-ide,id=ide \ + -drive id=disk,file=$(IMG),format=raw,if=none \ + -device ide-hd,drive=disk,bus=ide.0 -drive \ + file=fat:rw:CDROM,index=2,format=raw -d int -hdd epm-slave.img LD_FLAGS=-e Main --subsystem=10 @@ -40,19 +45,20 @@ REM=rm REM_FLAG=-f FLAG_ASM=-f win64 -FLAG_GNU=-fshort-wchar -D__EFI_x86_64__ -mno-red-zone -D__KERNEL__ -D__NEWBOOT__ -DEFI_FUNCTION_WRAPPER -I../ -I../../ -I./ -c -nostdlib -fno-rtti -fno-exceptions -std=c++20 -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -D__BOOTLOADER__ -I./ - -.PHONY: invalid-recipe -invalid-recipe: - @echo "invalid-recipe: Use make bootloader-<arch> instead." +FLAG_GNU=-fshort-wchar -D__EFI_x86_64__ -mno-red-zone -D__KERNEL__ -D__NEWBOOT__ \ + -DEFI_FUNCTION_WRAPPER -I../ -I../../ -I./ -c -nostdlib -fno-rtti -fno-exceptions \ + -std=c++20 -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -D__BOOTLOADER__ -I./ -KERNEL_OBJ=boot.bin DD=dd IMG_CREATE=qemu-img MAX_KERNEL_SIZE=1024K BOOT_LOADER=NewBoot.exe KERNEL=NewKernel.exe +.PHONY: invalid-recipe +invalid-recipe: + @echo "invalid-recipe: Use make compile-<arch> instead." + .PHONY: all all: compile-amd64 mkdir -p CDROM/EFI/BOOT diff --git a/Private/makefile b/Private/makefile index 88a0f165..c84a2f9e 100644 --- a/Private/makefile +++ b/Private/makefile @@ -5,7 +5,8 @@ CC = x86_64-w64-mingw32-gcc LD = x86_64-w64-mingw32-ld -CCFLAGS = -c -ffreestanding -fPIC -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./ +CCFLAGS = -c -ffreestanding -fPIC -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./ ASM = nasm ifneq ($(ATA_PIO_SUPPORT), ) @@ -50,7 +51,12 @@ WINDRES=x86_64-w64-mingw32-windres .PHONY: newos-amd64-epm newos-amd64-epm: clean $(WINDRES) KernelRsrc.rsrc -O coff -o KernelRsrc.obj - $(CC) $(CCFLAGS) $(DISKDRIVER) $(DEBUG) $(wildcard Source/*.cxx) $(wildcard Source/FS/*.cxx) $(wildcard HALKit/AMD64/Storage/*.cxx) $(wildcard HALKit/AMD64/PCI/*.cxx) $(wildcard Source/Network/*.cxx) $(wildcard Source/Storage/*.cxx) $(wildcard HALKit/AMD64/*.cxx) $(wildcard HALKit/AMD64/*.cpp) $(wildcard HALKit/AMD64/*.s) + $(CC) $(CCFLAGS) $(DISKDRIVER) $(DEBUG) $(wildcard Source/*.cxx) \ + $(wildcard Source/FS/*.cxx) $(wildcard HALKit/AMD64/Storage/*.cxx) \ + $(wildcard HALKit/AMD64/PCI/*.cxx) $(wildcard Source/Network/*.cxx) $(wildcard Source/Storage/*.cxx) \ + $(wildcard HALKit/AMD64/*.cxx) $(wildcard HALKit/AMD64/*.cpp) \ + $(wildcard HALKit/AMD64/*.s) + $(ASM) $(ASMFLAGS) HALKit/AMD64/HalInterruptAPI.asm $(ASM) $(ASMFLAGS) HALKit/AMD64/HalSMPCoreManager.asm $(ASM) $(ASMFLAGS) HALKit/AMD64/HalNewBoot.asm |
