Added debug target in Makefile

This commit is contained in:
vhaudiquet 2023-11-07 13:33:39 +01:00
parent de55b4cdd6
commit 5ab6aefa49

View File

@ -42,4 +42,10 @@ clean:
.PHONY: run
.SILENT: run
run: all
XDG_DATA_DIRS=./$(BUILD_DIR) ./$(BUILD_DIR)/ginput
XDG_DATA_DIRS=./$(BUILD_DIR) ./$(BUILD_DIR)/$(NAME)
$(BUILD_DIR)/$(NAME).dbg: $(BUILD_DIR)/resource.c $(C_FILES) | $(BUILD_DIR)
$(CC) $(CFLAGS) -g -o $@ $^ $(LDFLAGS)
debug: $(BUILD_DIR)/$(NAME).dbg $(BUILD_DIR)/drivers resources
XDG_DATA_DIRS=./$(BUILD_DIR) gdb --args ./$(BUILD_DIR)/$(NAME).dbg