diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 0bca84f..9b531d9 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -21,7 +21,7 @@ }, { "label": "Clean", - "detail": "Clean build directory and executable", + "detail": "Clean build directory", "type": "shell", "command": "make", "args": [ @@ -57,7 +57,7 @@ }, { "label": "Run", - "detail": "Build executable and run.", + "detail": "Build project and run", "type": "shell", "command": "make", "args": [ @@ -73,6 +73,25 @@ "showReuseMessage": true, "clear": true } + }, + { + "label": "Build Release", + "detail": "Build project in release mode", + "type": "shell", + "command": "make", + "args": [ + "-j$(nproc)", + "RELEASE=1" + ], + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": true, + "clear": true + } } ] } \ No newline at end of file diff --git a/NCurses_Core b/NCurses_Core index 1821d20..911bdd7 160000 --- a/NCurses_Core +++ b/NCurses_Core @@ -1 +1 @@ -Subproject commit 1821d2092357eecc3ed4999751fb1a71b521324b +Subproject commit 911bdd7999a5c8af912ea3d23ba86140541fd064 diff --git a/SDL2_Core b/SDL2_Core index 2f10b3c..d193aa5 160000 --- a/SDL2_Core +++ b/SDL2_Core @@ -1 +1 @@ -Subproject commit 2f10b3c1bc8da91c8271495d7b1a45194d02e224 +Subproject commit d193aa5fd49666be31f2b97e6dcc9a0788d58d7d diff --git a/assets/asset_builder/src/Makefile b/assets/asset_builder/src/Makefile index 4d6bcb1..770741b 100644 --- a/assets/asset_builder/src/Makefile +++ b/assets/asset_builder/src/Makefile @@ -6,8 +6,10 @@ ASSET_BUILDER_SOURCES := \ # Compiler and flags ASSET_BUILDER_CC = gcc +ifeq ($(RELEASE), 1) ASSET_BUILDER_CFLAGS = --std=c17 --pedantic -O3 $(shell pkg-config --cflags libpng) # RELEASE -#ASSET_BUILDER_CFLAGS = --std=c17 --pedantic -O1 -g $(shell pkg-config --cflags libpng) \ +else +ASSET_BUILDER_CFLAGS = --std=c17 --pedantic -O1 -g $(shell pkg-config --cflags libpng) \ -Wall -Wno-missing-braces -Wextra -Wno-missing-field-initializers \ -Wformat=2 -Wswitch-default -Wswitch-enum -Wcast-align \ -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 \ @@ -15,6 +17,7 @@ ASSET_BUILDER_CFLAGS = --std=c17 --pedantic -O3 $(shell pkg-config --cflags libp -Wcast-qual -Wshadow -Wunreachable-code -Wlogical-op \ -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls \ -Wold-style-definition # DEVELOPEMENT +endif ASSET_BUILDER_INCLUDE_DIRS = $(ASSET_BUILDER_DIR)/headers ASSET_BUILDER_INCLUDE_DIRS := $(addprefix -I, $(ASSET_BUILDER_INCLUDE_DIRS)) diff --git a/src/Makefile b/src/Makefile index 76286c5..6f0ee32 100644 --- a/src/Makefile +++ b/src/Makefile @@ -10,7 +10,9 @@ SOURCES := \ # Compiler and flags SRC_CC = gcc -#SRC_CFLAGS = --std=c17 --pedantic -O3 # RELEASE +ifeq ($(RELEASE), 1) +SRC_CFLAGS = --std=c17 --pedantic -O3 # RELEASE +else SRC_CFLAGS = --std=c17 --pedantic -O0 -g \ -Wall -Wno-missing-braces -Wextra -Wno-missing-field-initializers \ -Wformat=2 -Wswitch-default -Wswitch-enum -Wcast-align \ @@ -19,6 +21,7 @@ SRC_CFLAGS = --std=c17 --pedantic -O0 -g \ -Wcast-qual -Wshadow -Wunreachable-code -Wlogical-op \ -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls \ -Wold-style-definition # DEVELOPEMENT +endif SRC_INCLUDE_DIRS = $(SOURCE_DIR)/headers $(SOURCE_DIR)/ecs/headers $(SOURCE_DIR)/ecs/components/headers $(CORE_DIR)/headers SRC_INCLUDE_DIRS := $(addprefix -I, $(SRC_INCLUDE_DIRS))