diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-02-03 23:39:03 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-02-03 23:39:43 +0200 |
commit | 039df4c04d83fc26ca60d4f870d2e58d381818ad (patch) | |
tree | 0896053cffebfe97ac98c98386d62ef7f2e980b1 /makefile | |
parent | Update readme with required packages (diff) | |
download | kernel.cpp-039df4c04d83fc26ca60d4f870d2e58d381818ad.tar.xz |
Rewrite boot.s to use clang instead of nasm
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -6,12 +6,11 @@ export TARGET := i686-elf export AR := llvm-ar -export NASM := nasm +export AS := clang export LD := ld.lld -export CXX := clang++ -export CXX_FLAGS := -std=c++20 -ffreestanding \ - -nostdlib -nostdinc -nostdinc++ \ - -fno-exceptions -fno-rtti -Wall -Wextra -O2 +export CXX := clang +export CXX_FLAGS := -std=c++20 -ffreestanding -nostdlib -nostdinc -nostdinc++ \ + -fno-exceptions -fno-rtti -Wall -Wextra -O2 CXX_INCLUDE := $(CURDIR)/libk CXX_OBJ := kernel.o vga.o @@ -25,10 +24,10 @@ check-grub: glitch.elf grub-file --is-x86-multiboot2 glitch.elf glitch.elf: boot.o $(CXX_OBJ) libk/libk.a - $(LD) -T linker.ld -o glitch.elf boot.o $(CXX_OBJ) -Llibk -lk + $(LD) -T linker.ld -o glitch.elf boot.o $(CXX_OBJ) -lk -boot.o: boot.asm - $(NASM) -felf32 -o $@ $^ +boot.o: boot.s + $(AS) -target $(TARGET) -nostdlib -Wall -Wextra -c $^ -o $@ $(CXX_OBJ): %.o : %.cc $(CXX) -target $(TARGET) $(CXX_FLAGS) -I$(CXX_INCLUDE) -c $^ -o $@ |