aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-02-06 17:32:40 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2021-02-06 18:31:10 +0200
commit13e1e4515746fe65b6c50cfbc42f00e29fd56599 (patch)
tree22722c729ad028dea612c5c07a16ec6f52ca63c0 /makefile
parentAdd IntegerView (diff)
downloadkernel.cpp-13e1e4515746fe65b6c50cfbc42f00e29fd56599.tar.xz
libk: add some tests
- merge types.h and type_traits.h
Diffstat (limited to 'makefile')
-rw-r--r--makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/makefile b/makefile
index f45d65a..1a50a18 100644
--- a/makefile
+++ b/makefile
@@ -6,8 +6,12 @@
export TARGET := i686-elf
export AR := llvm-ar
-export AS := clang
-export LD := ld.lld
+
+AS := clang
+
+LD := ld.lld
+LD_FLAGS := -T linker.ld -lk
+
export CXX := clang
export CXX_FLAGS := -std=c++20 -ffreestanding -nostdlib -nostdinc -nostdinc++ \
-fno-exceptions -fno-rtti -Wall -Wextra -O2
@@ -24,7 +28,7 @@ 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) -lk
+ $(LD) $(LD_FLAGS) -o $@ boot.o $(CXX_OBJ)
boot.o: boot.s
$(AS) -target $(TARGET) -nostdlib -Wall -Wextra -c $^ -o $@