diff options
author | Simon <sgkadesh@icloud.com> | 2024-01-27 02:18:08 -0500 |
---|---|---|
committer | Simon <sgkadesh@icloud.com> | 2024-01-27 02:18:08 -0500 |
commit | df2c0ee981f997b8677bb28149272818ae51f926 (patch) | |
tree | a249eef7fd55e1ef6f04935e422d19321365c472 /Makefile | |
parent | add system includes from include (diff) | |
download | corn-df2c0ee981f997b8677bb28149272818ae51f926.tar.gz corn-df2c0ee981f997b8677bb28149272818ae51f926.tar.bz2 corn-df2c0ee981f997b8677bb28149272818ae51f926.zip |
Added basic long mode setup
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 $@ $< |