Minor changes to build system

This commit is contained in:
ssimnb 2026-02-17 10:50:52 +01:00
parent f478f8d38b
commit a7fd9ac224
16 changed files with 391 additions and 224 deletions

View file

@ -3,12 +3,12 @@ CC = gcc
AS = nasm
LD = ld
SRC_DIR := src build/uACPI/source build
SRC_DIR := src build/flanterm
C_SOURCES := $(shell find $(SRC_DIR) -type f -name '*.c')
C_OBJECTS := $(patsubst %.c,$(BUILD_DIR)/%.o,$(C_SOURCES))
ASM_SOURCES := $(shell find $(SRC_DIR) -type f -name '*.asm')
ASM_OBJECTS := $(patsubst %.asm,$(BUILD_DIR)/%.o,$(ASM_SOURCES))
ASM_OBJECTS := $(patsubst %.asm,$(BUILD_DIR)/%asm.o,$(ASM_SOURCES))
CFLAGS += -Wall \
-Wextra \
@ -43,7 +43,7 @@ NASMFLAGS = -f elf64 -g -F dwarf
all: amd64
dependencies:
deps:
mkdir -p $(BUILD_DIR) || true
rm -rf build/limine
git clone https://github.com/limine-bootloader/limine.git --branch=v8.x-binary --depth=1 build/limine
@ -56,13 +56,13 @@ dependencies:
mkdir include/uACPI
cp -r build/uACPI/include/ include/
cp -r build/uACPI/include/* include/
$(BUILD_DIR)/%.o: %.c
mkdir -p $(dir $@)
$(CC) -c $< -o $@ $(CFLAGS)
$(BUILD_DIR)/%.o: %.asm
$(BUILD_DIR)/%asm.o: %.asm
mkdir -p $(dir $@)
$(AS) $< -o $@ $(NASMFLAGS)