diff options
| author | Amlal <amlalelmahrouss@icloud.com> | 2024-04-26 12:29:13 +0000 |
|---|---|---|
| committer | Amlal <amlalelmahrouss@icloud.com> | 2024-04-26 12:29:13 +0000 |
| commit | 97eb8462433a831f8a02a08acfc7ca32e794d37d (patch) | |
| tree | e7cddb857e50a2cca41a5364b4240cd8c6c0ec13 /Private/NewBoot/Source/makefile | |
| parent | f7a7080d18ac2be758b242c22f020c018b1c4824 (diff) | |
| parent | 313c303fab092b1c45e615f960826375e7eef093 (diff) | |
Merged in MHR-16 (pull request #6)
MHR-16 - A lot of features and USA design.
Diffstat (limited to 'Private/NewBoot/Source/makefile')
| -rw-r--r-- | Private/NewBoot/Source/makefile | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/Private/NewBoot/Source/makefile b/Private/NewBoot/Source/makefile index 2f9e3756..8306f844 100644 --- a/Private/NewBoot/Source/makefile +++ b/Private/NewBoot/Source/makefile @@ -18,13 +18,17 @@ else EMU=qemu-system-x86_64 endif +ifeq ($(NEWS_MODEL), ) +NEWOS_MODEL=-DkMachineModel="\"Generic NeWS HD\"" +endif + IMG=epm.img IMG_2=epm-slave.img EMU_FLAGS=-net none -smp 4 -m 8G -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 -OBJ=*.o +OBJ=*.o ../../Objects/*.obj REM=rm REM_FLAG=-f @@ -36,7 +40,7 @@ FLAG_GNU=-fshort-wchar -D__EFI_x86_64__ -mno-red-zone -D__KERNEL__ -D__NEWBOOT__ invalid-recipe: @echo "invalid-recipe: Use make bootloader-<arch> instead." -KERNEL_OBJ=kernel.bin +KERNEL_OBJ=boot.bin DD=dd IMG_CREATE=qemu-img MAX_KERNEL_SIZE=1024K @@ -46,12 +50,9 @@ KERNEL=NewKernel.exe .PHONY: all all: compile-amd64 mkdir -p CDROM/EFI/BOOT - $(LD_GNU) $(OBJ) $(LD_FLAGS) -o $(KERNEL_OBJ) - $(IMG_CREATE) create -f raw $(BOOT_LOADER) $(MAX_KERNEL_SIZE) - $(DD) if=$(KERNEL_OBJ) of=$(BOOT_LOADER) bs=1 seek=0 conv=notrunc + $(LD_GNU) $(OBJ) $(LD_FLAGS) -o $(BOOT_LOADER) $(COPY) $(BOOT_LOADER) CDROM/EFI/BOOT/BOOTX64.EFI $(COPY) $(BOOT_LOADER) CDROM/EFI/BOOT/NEWBOOT.EFI - $(COPY) $(BOOT_LOADER) ../../Root/Boot/$(BOOT_LOADER) ifneq ($(DEBUG_SUPPORT), ) DEBUG = -D__DEBUG__ @@ -59,8 +60,8 @@ endif .PHONY: compile-amd64 compile-amd64: - $(WINDRES) BootloaderRsrc.rsrc -O coff -o BootloaderRsrc.o - $(CC_GNU) $(FLAG_GNU) $(DEBUG) $(wildcard HEL/AMD64/*.cxx) $(wildcard *.cxx) + # $(WINDRES) BootloaderRsrc.rsrc -O coff -o BootloaderRsrc.o + $(CC_GNU) $(NEWOS_MODEL) $(FLAG_GNU) $(DEBUG) $(wildcard HEL/AMD64/*.cxx) $(wildcard HEL/AMD64/*.S) $(wildcard *.cxx) .PHONY: run-efi-amd64 run-efi-amd64: @@ -68,16 +69,21 @@ run-efi-amd64: .PHONY: epm-img epm-img: - qemu-img create -f raw $(IMG) 256M - qemu-img create -f raw $(IMG_2) 512M + qemu-img create -f qcow2 $(IMG) 512M + qemu-img create -f qcow2 $(IMG_2) 512M .PHONY: download-edk download-edk: $(HTTP_GET) https://retrage.github.io/edk2-nightly/bin/DEBUGX64_OVMF.fd -O OVMF.fd +BINS=*.bin +EXECUTABLES=NewBoot.exe NewKernel.exe OVMF.fd + +TARGETS=$(REM_FLAG) $(OBJ) $(BIN) $(IMG) $(IMG_2) $(EXECUTABLES) + .PHONY: clean clean: - $(REM) $(REM_FLAG) $(OBJ) NewBoot.exe NewKernel.exe OVMF.fd $(IMG) $(IMG_2) + $(REM) $(TARGETS) .PHONY: help help: |
