From 2395be73c87d81a070e86ecc533713518930b852 Mon Sep 17 00:00:00 2001 From: Utkarsh Verma Date: Thu, 30 Mar 2023 07:04:11 +0530 Subject: [PATCH] Update Makefile --- Makefile | 4 ++-- src/main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b3d5a76..f68451e 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ LDLIBS := -lX11 BIN := dwmblocks VPATH := $(SRC_DIR) -OBJS := $(subst $(SRC_DIR)/,$(BUILD_DIR)/,$(subst .c,.o,$(wildcard $(SRC_DIR)/*.c))) -OBJS += $(addprefix $(BUILD_DIR)/,$(subst .c,.o,$(wildcard *.c))) +OBJS := $(patsubst $(SRC_DIR)/%.c,$(BUILD_DIR)/%.o,$(wildcard $(SRC_DIR)/*.c)) +OBJS += $(patsubst %.c,$(BUILD_DIR)/%.o,$(wildcard *.c)) all: $(BUILD_DIR)/$(BIN) diff --git a/src/main.c b/src/main.c index 05ec7f3..aed5d5c 100644 --- a/src/main.c +++ b/src/main.c @@ -130,7 +130,7 @@ void init() { int main(const int argc, const char *argv[]) { if (setupX()) { - fprintf(stderr, "dwmblocks: Failed to open display\n"); + fprintf(stderr, "%s\n", "dwmblocks: Failed to open display"); return 1; }