mirror of
https://github.com/thepigeongenerator/sdl_template.git
synced 2025-12-17 05:55:47 +01:00
allow to add debug parameter
This commit is contained in:
5
.vscode/tasks.json
vendored
5
.vscode/tasks.json
vendored
@@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
|
"options": {
|
||||||
|
"env": {
|
||||||
|
"DEBUG": "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
|
|||||||
8
makefile
8
makefile
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user