Building a multiboot 1 compatible executable
This commit is contained in:
1 parent
0df19ec2b7
commit
39b43d825a
3 files changed
+56
No files matched your search
@@ -0,0 +1,19 @@
|
||||
ifeq ($(MITTOS64),)
|
||||
$(error Unsupported environment! See README)
|
||||
endif
|
||||
|
||||
CC := x86_64-elf-gcc
|
||||
|
||||
SRC := $(wildcard **/*.[cS])
|
||||
OBJ := $(patsubst %, %.o, $(basename $(SRC)))
|
||||
|
||||
CFLAGS ?= -Wall -Wextra
|
||||
CFLAGS += -ffreestanding
|
||||
|
||||
all: kernel
|
||||
|
||||
kernel: LDFLAGS += -n -nostdlib -T Link.ld
|
||||
kernel: $(OBJ)
|
||||
$(LINK.c) $^ -o $@
|
||||
mkdir -p /opt/sysroot
|
||||
cp kernel /opt/sysroot/kernel
|
||||
Reference in new issue
Block a user