build: Add DEBUG option

This commit is contained in:
Utkarsh Verma 2024-03-19 06:52:21 +05:30
parent 12d4decdd4
commit dea248b824
No known key found for this signature in database
GPG Key ID: 7A4885A7162BDF20

View File

@ -5,6 +5,7 @@ BUILD_DIR := build
SRC_DIR := src SRC_DIR := src
INC_DIR := include INC_DIR := include
DEBUG := 0
VERBOSE := 0 VERBOSE := 0
LIBS := xcb-atom LIBS := xcb-atom
@ -26,6 +27,10 @@ ifeq ($(VERBOSE), 0)
Q := @ Q := @
endif endif
ifeq ($(DEBUG), 1)
CFLAGS += -g
endif
all: $(BUILD_DIR)/$(BIN) all: $(BUILD_DIR)/$(BIN)
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c config.h $(BUILD_DIR)/%.o: $(SRC_DIR)/%.c config.h