summaryrefslogtreecommitdiffhomepage
path: root/newBoot/Source/makefile
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-06 09:14:11 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-06 09:14:11 +0100
commit5339d016c07bf717ee388f4feb73544087324af0 (patch)
tree94be6f67ed626091f24aee24ec3b3be03d01e4e7 /newBoot/Source/makefile
git: port from mercurial repo.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'newBoot/Source/makefile')
-rw-r--r--newBoot/Source/makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/newBoot/Source/makefile b/newBoot/Source/makefile
new file mode 100644
index 00000000..81bb2096
--- /dev/null
+++ b/newBoot/Source/makefile
@@ -0,0 +1,23 @@
+CC=fcc
+CCFLAGS=-I ../ -ffreestanding -nostdlib
+ASM=fasm
+ASMFLAGS=/ARC /PEF
+
+.PHONY: arch-arc
+arch-arc:
+ ${CC} ${CCFLAGS} Boot.cpp Start.cpp -c
+ ${ASM} ${ASMFLAGS} Arch/ARC/XPM.asm
+ ${ASM} ${ASMFLAGS} Arch/ARC/Crt0.asm
+
+CC_GNU=x86_64-elf-gcc
+LD_GNU=x86_64-elf-ld
+FLAG_GNU=-I../ -I../../../efiSDK/inc -c -ffreestanding -fno-rtti -fno-exceptions -std=c++20 -D__HAVE_HCORE_APIS__ -D__hCore__ -I./ -I$(HOME)/
+
+.PHONY: arch-amd64
+arch-amd64:
+ $(CC_GNU) $(FLAG_GNU) Arch/AMD64/BootAMD64.cxx *.cxx
+ $(LD_GNU) *.o -e __AppMain -Ttext 0x000 --oformat binary -o BootloaderStage2.bin
+
+.PHONY: clean
+clean:
+ rm -f *.o