X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/bf870a1dde437a48ae40d092a14e164c861ea102..13d664b914462e2410570d6f7d6258caac1662af:/lunaix-os/makefile diff --git a/lunaix-os/makefile b/lunaix-os/makefile index 20de158..058bcc8 100644 --- a/lunaix-os/makefile +++ b/lunaix-os/makefile @@ -20,16 +20,16 @@ $(ISO_DIR): $(OBJECT_DIR)/%.S.o: %.S @mkdir -p $(@D) - @echo " BUILD: $<" + @echo " CC $<" @$(CC) $(INCLUDES) -c $< -o $@ $(OBJECT_DIR)/%.c.o: %.c @mkdir -p $(@D) - @echo " BUILD: $<" + @echo " CC $<" @$(CC) $(INCLUDES) -c $< -o $@ $(CFLAGS) $(BIN_DIR)/$(OS_BIN): $(OBJECT_DIR) $(BIN_DIR) $(SRC) - @echo " LINK: $(BIN_DIR)/$(OS_BIN)" + @echo " LD $(BIN_DIR)/$(OS_BIN)" @$(CC) -T link/linker.ld -o $(BIN_DIR)/$(OS_BIN) $(SRC) $(LDFLAGS) $(BUILD_DIR)/$(OS_ISO): $(ISO_DIR) $(BIN_DIR)/$(OS_BIN) GRUB_TEMPLATE @@ -39,6 +39,9 @@ $(BUILD_DIR)/$(OS_ISO): $(ISO_DIR) $(BIN_DIR)/$(OS_BIN) GRUB_TEMPLATE all: clean $(BUILD_DIR)/$(OS_ISO) +instable: CFLAGS := -g -std=gnu99 -ffreestanding $(O) $(W) $(ARCH_OPT) -D__LUNAIXOS_DEBUG__ +instable: all + all-debug: O := -Og all-debug: CFLAGS := -g -std=gnu99 -ffreestanding $(O) $(W) $(ARCH_OPT) -D__LUNAIXOS_DEBUG__ all-debug: LDFLAGS := -g -ffreestanding $(O) -nostdlib -lgcc @@ -70,3 +73,7 @@ debug-qemu-vscode: all-debug debug-bochs: all-debug @bochs -q -f bochs.cfg + +debug-metal: + @printf "@cmc" > $(PORT) + @gdb -s $(BUILD_DIR)/kernel.dbg -ex "target remote $(PORT)" \ No newline at end of file