From df2c0ee981f997b8677bb28149272818ae51f926 Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 27 Jan 2024 02:18:08 -0500 Subject: Added basic long mode setup --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Makefile') 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 $@ $< -- cgit v1.2.3-freya