summaryrefslogtreecommitdiffhomepage
path: root/Private/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Private/makefile')
-rw-r--r--Private/makefile10
1 files changed, 3 insertions, 7 deletions
diff --git a/Private/makefile b/Private/makefile
index 673a4b56..977e33ac 100644
--- a/Private/makefile
+++ b/Private/makefile
@@ -5,7 +5,7 @@
CC = x86_64-w64-mingw32-gcc
LD = x86_64-w64-mingw32-ld
-CCFLAGS = -c -ffreestanding -fPIE -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), )
@@ -30,7 +30,7 @@ COPY = cp
ASMFLAGS = -f win64
# NewOS subsystem is 17.
-LDFLAGS = -e Main --subsystem=17
+LDFLAGS = -e __ImageStart --subsystem=17
LDOBJ = Objects/*.obj
# This file is the kernel, responsible of task management and memory.
@@ -59,17 +59,13 @@ newos-amd64-epm: clean
OBJCOPY=x86_64-w64-mingw32-objcopy
-KERNEL_OBJ=kernel.bin
DD=dd
IMG_CREATE=qemu-img
MAX_KERNEL_SIZE=1024K
.PHONY: link-amd64-epm
link-amd64-epm:
- $(LD) $(LDFLAGS) $(LDOBJ) -o $(KERNEL_OBJ)
- $(IMG_CREATE) create -f raw $(KERNEL) $(MAX_KERNEL_SIZE)
- $(DD) if=$(KERNEL_OBJ) of=$(KERNEL) bs=1 seek=0 conv=notrunc
- $(COPY) $(KERNEL) Root/Boot
+ $(LD) $(LDFLAGS) $(LDOBJ) -o $(KERNEL)
.PHONY: all
all: newos-amd64-epm link-amd64-epm