-CC = x86_64-linux-gnu-gcc
-LD = ld
+CC = x86_64-none-elf-gcc
+LD = x86_64-none-elf-ld
+DISASM = x86_64-none-elf-objdump -d -M x86-64
-KERNEL_CFLAGS = -mcmodel=large -nostdlib
+KERNEL_CFLAGS := -mcmodel=kernel -nostdlib -mno-red-zone -Wall -Werror
+DYNMOD_CFLAGS := -mcmodel=small -fPIC -mno-red-zone
ARCHDIR = x86_64
+ASFLAGS = -felf64
+