allow to add debug parameter

This commit is contained in:
2025-01-26 11:45:53 +01:00
parent 5337252be3
commit 9f9e110dbd
2 changed files with 12 additions and 1 deletions

View File

@@ -4,9 +4,15 @@ NAME = sdl_template
CC := clang
STD := c17
LANG = c
CFLAGS := $(shell pkg-config --cflags sdl2) -O3 -g -Wall -Wall -Wextra -Wpedantic -Wno-pointer-arith
CFLAGS := $(shell pkg-config --cflags sdl2) -Wall -Wall -Wextra -Wpedantic -Wno-pointer-arith
LDFLAGS := $(shell pkg-config --libs sdl2) -lm
ifeq ($(DEBUG),1)
CFLAGS += -Og -g
else
REL_FLAGS += -O3
endif
# dirs
DIR_BIN := bin
DIR_OBJ := obj