mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
build: Track header dependencies, fix default goal, and repair the font table comment
Three build-correctness fixes plus README coverage of the new kernel core. The Makefile had no header dependency tracking, so editing a header left every unrebuilt caller linked against the old layout. That is how the desktop's window paint callbacks silently landed at the wrong struct offset after gui_window_t grew: gui_apps.o was never recompiled. Compiles now emit .d files via -MMD -MP and the build pulls them in. The include has to sit at the end of the file with .DEFAULT_GOAL pinned to `all` -- a .d file's first rule would otherwise become make's default goal and turn a bare `make` into a silent no-op. drivers/video/canvas.c carried the same font table defect gui_gfx.c did: the `// \` comment on the backslash glyph continues onto the next line, swallowing the `]` entry and shifting every glyph from ']' onward by one, so all lowercase text rendered one letter off. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01L5yKJT4Wo2cV3rfPrwY5MP
This commit is contained in:
1 parent
f9400f6ac4
commit
280d7fa2bb
3 files changed
+33
-4
No files matched your search
@@ -310,6 +310,13 @@ else
|
||||
OTHER_OBJS = $(filter-out $(ENTRY_OBJ), $(S_OBJS) $(C_OBJS))
|
||||
endif
|
||||
|
||||
# Generated dependency files, one per object. The include lives at the very
|
||||
# end of this file: a .d file's first rule would otherwise become make's
|
||||
# default goal and turn a bare `make` into a no-op.
|
||||
DEPS = $(C_OBJS:.o=.d) $(CPP_OBJS:.o=.d) $(S_OBJS:.o=.d)
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
.PHONY: all clean run debug info configure menuconfig config tui nconfig defconfig x86_64_defconfig aarch64_defconfig armv8_defconfig armv8i_defconfig armv81_defconfig arm32_defconfig qemu help
|
||||
|
||||
all: $(TARGET)
|
||||
@@ -335,15 +342,19 @@ armv8_defconfig armv8i_defconfig armv81_defconfig arm32_defconfig:
|
||||
# -----------------------------------------------------------------------------
|
||||
# Compilation Rules
|
||||
# -----------------------------------------------------------------------------
|
||||
# Header dependency tracking: without this a header change leaves stale objects
|
||||
# behind, and a struct layout edit silently corrupts every unrebuilt caller.
|
||||
DEPFLAGS = -MMD -MP
|
||||
|
||||
# C Source Files
|
||||
$(BUILD_DIR)/%.o: %.c include/config/autoconf.h
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
$(CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
|
||||
|
||||
# C++ Source Files
|
||||
$(BUILD_DIR)/%.o: %.cpp include/config/autoconf.h
|
||||
@mkdir -p $(dir $@)
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
$(CXX) $(CXXFLAGS) $(DEPFLAGS) -c $< -o $@
|
||||
|
||||
# x86_64 NASM Assembly Files
|
||||
$(BUILD_DIR)/%.o: %.asm
|
||||
@@ -353,7 +364,7 @@ $(BUILD_DIR)/%.o: %.asm
|
||||
# ARM/AArch64 GNU Assembly Files (.S)
|
||||
$(BUILD_DIR)/%.o: %.S
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
$(CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
|
||||
|
||||
# Rust Source Compilation
|
||||
$(RUST_LIB): rust/src/lib.rs $(RUST_SRCS)
|
||||
@@ -449,3 +460,5 @@ help:
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD_DIR) $(IMAGE)
|
||||
|
||||
-include $(DEPS)
|
||||
Reference in new issue
Block a user