From b5085f013137899fcdd3daef421bd4b9193ad35c Mon Sep 17 00:00:00 2001 From: xavi Date: Mon, 9 Sep 2024 09:58:24 -0700 Subject: [PATCH] Fixed Makefile --- Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 9ef9795..c6a5caf 100644 --- a/Makefile +++ b/Makefile @@ -6,16 +6,17 @@ OBJ_DIR = obj ALL_OBJS = $(wildcard $(OBJ_DIR)/*.o) SRC = $(wildcard $(SRC_DIR)/*.c) -OBJ = $(addprefix $(OBJ) +OBJ = $(addprefix $(OBJ_DIR)/, $(notdir $(SRC:.c=.o))) X_STRING_DIR = $(SRC_DIR)/xlibc/x_string X_STRING_SRC = $(wildcard $(X_STRING_DIR)/src/*.c) -X_STRING_OBJ = $(X_STRING_SRC:.c=.o) +X_STRING_OBJ = $(addprefix $(OBJ_DIR)/, $(notdir $(X_STRING_SRC:.c=.o))) SQLITE_DIR = $(SRC_DIR)/sqlite3 SQLITE_SRC = $(wildcard $(SQLITE_DIR)/src/*.c) -SQLITE_OBJ = $(SQLITE_SRC:.c=.o) +SQLITE_OBJ = $(addprefix $(OBJ_DIR)/, $(notdir $(SQLITE_SRC:.c=.o))) +SQLITE_DB_SCHEMA = $(SRC_DIR)/dodo.schema INC_DIRS=$(X_STRING_DIR)/src @@ -41,15 +42,15 @@ dodo: $(OBJ) $(X_STRING_OBJ) $(SQLITE_OBJ) install: mkdir -p $(HOME_DIR)$(CONFIG_DIR) - sqlite3 $(HOME_DIR)$(DB_FILE) < dodo.schema + sqlite3 $(HOME_DIR)$(DB_FILE) < $(SQLITE_DB_SCHEMA) uninstall: rm -rf $(HOME_DIR)$(CONFIG_DIR) clean_all: - rm -f dodo $(OBJ) + rm -f dodo $(ALL_OBJS) clean: - rm -f dodo dodo.o x_string.o + rm -f dodo $(OBJ) $(X_STRING_OBJ) .PHONY: all clean_all clean install uninstall