summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 13ad832..1be00e9 100644
--- a/Makefile
+++ b/Makefile
@@ -5,10 +5,10 @@ BUILD_DIR=build
K_BIN_NAME=kernel.bin
ISO_NAME=os_image.iso
-CC=cc
+CC=gcc
LD=ld
-CFLAGS=-ffreestanding -g -Wall -Wextra -pedantic -lgcc -isystem $(INCLUDE_DIR)
+CFLAGS= -std=c2x -ffreestanding -g -Wall -Wextra -pedantic -lgcc -isystem $(INCLUDE_DIR)
C_SRC=$(shell find $(SRC_DIR) -type f -name "*.c")
@@ -31,6 +31,10 @@ $(A_OBJ): $(BUILD_DIR)/%.S.o : %.S
@mkdir -p $(@D)
nasm $< -f elf64 -o $@
+$(BUILD_DIR)/$(SRC_DIR)/arch/amd64/shim.o: $(SRC_DIR)/arch/amd64/shim.c
+ @mkdir -p $(@D)
+ $(CC) -c $(CFLAGS) -o $@ $< -m32
+
$(C_OBJ): $(BUILD_DIR)/%.o : %.c
@mkdir -p $(@D)
$(CC) -c $(CFLAGS) -o $@ $<