diff --git a/.vscode/tasks.json b/.vscode/tasks.json index e46ad28..0fd34b4 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,5 +1,10 @@ { "version": "2.0.0", + "options": { + "env": { + "DEBUG": "1" + } + }, "tasks": [ { "type": "shell", diff --git a/makefile b/makefile index 055cf0d..a84ce23 100644 --- a/makefile +++ b/makefile @@ -4,9 +4,15 @@ NAME = sdl_template CC := clang STD := c17 LANG = c -CFLAGS := $(shell pkg-config --cflags sdl2) -Wall -g -pedantic +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 + # file locations DIR_BIN := bin DIR_OBJ := obj