bond/Rules.top
secXsQuared 34949452db + Set up intital page mapping to support high address
+ Add multiboot framebuffer request tag
+ Cleaned up some code
2018-10-09 15:13:31 -04:00

62 lines
1.1 KiB
Plaintext

include $(MK)/prologue.mk
.DEFAULT_GOAL := all
# OBJ var holds all OBJS required to link the kernel
dir := hal
include $(dir)/Rules.mk
dir := kernel
include $(dir)/Rules.mk
dir := mk
include $(dir)/Rules.mk
dir := common
include $(dir)/Rules.mk
LD_SCRIPT := $(OUT)/$(MK)/linker.ld
GRUB_CFG = $(MK)/grub.cfg
TGT := $(OUT)/secxkrnl.elf
DMP := $(OUT)/secxkrnl.dmp
ISO := $(OUT)/secxkrnl.iso
DUMP_FLAGS = -x86-asm-syntax=intel \
-disassemble \
-r \
-t \
-triple=x86_64-pc-none-elf \
-print-imm-hex
LD_FLAGS = -fuse-ld=$(LD) \
-nostdlib \
-Wl,-T,$(LD_SCRIPT) \
-Wl,--fatal-warnings
$(TGT): $(OBJ) $(LD_SCRIPT)
$(CC) $(LD_FLAGS) -o $@ $^
$(DMP): $(TGT)
$(DAS) $(DUMP_FLAGS) $< > $@
.PHONY: iso
iso: $(TGT) $(GRUB_CFG)
mkdir -p $(OUT)/temp/secX
mkdir -p $(OUT)/temp/boot
mkdir -p $(OUT)/temp/boot/grub
cp $(TGT) $(OUT)/temp/secX/
cp $(GRUB_CFG) $(OUT)/temp/boot/grub/
grub-mkrescue -o $(ISO) $(OUT)/temp
.PHONY: clean
clean:
rm -rf $(OUT)
.PHONY: compile
compile: $(TGT) $(DMP)
.PHONY: all
all: compile iso
include $(MK)/epilogue.mk