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

5
.vscode/tasks.json vendored
View File

@@ -1,5 +1,10 @@
{ {
"version": "2.0.0", "version": "2.0.0",
"options": {
"env": {
"DEBUG": "1"
}
},
"tasks": [ "tasks": [
{ {
"type": "shell", "type": "shell",

View File

@@ -4,9 +4,15 @@ NAME = sdl_template
CC := clang CC := clang
STD := c17 STD := c17
LANG = c 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 LDFLAGS := $(shell pkg-config --libs sdl2) -lm
ifeq ($(DEBUG),1)
CFLAGS += -Og -g
else
REL_FLAGS += -O3
endif
# dirs # dirs
DIR_BIN := bin DIR_BIN := bin
DIR_OBJ := obj DIR_OBJ := obj