Load raw C binary + docs
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
CC := x86_64-elf-gcc
|
||||
CC_FLAGS := -ffreestanding -nostdlib -fno-pic -mno-red-zone -Ilibc
|
||||
|
||||
LD := x86_64-elf-ld
|
||||
|
||||
BUILDDIR := ../build
|
||||
LIBDIR := libc
|
||||
|
||||
all: pedicel apex
|
||||
|
||||
pedicel:
|
||||
nasm -f bin pedicel.S -o $(BUILDDIR)/pedicel.raw
|
||||
|
||||
apex:
|
||||
$(CC) $(CC_FLAGS) -c apex.c -o $(BUILDDIR)/apex.o
|
||||
nasm -f elf64 $(LIBDIR)/crt0.S -o $(BUILDDIR)/crt0.o
|
||||
$(LD) -T $(LIBDIR)/linker.ld $(BUILDDIR)/crt0.o $(BUILDDIR)/apex.o -o $(BUILDDIR)/apex.elf
|
||||
objcopy -O binary $(BUILDDIR)/apex.elf $(BUILDDIR)/apex.raw
|
||||
Reference in New Issue
Block a user