TDT4258/ex3/Makefile

25 lines
1010 B
Makefile

GCC_RELEASE_FLAGS := -o3 # Optimisation level 3
GCC_DEBUG_FLAGS := -g \
-D_FORTIFY_SOURCE=2 \
-fasynchronous-unwind-tables \
-fstack-protector-strong \
-Wall \
-Werror=format-security \
-Werror=implicit-function-declaration
# This is stupid, but I've found no other way to comment between \ based
# newlines in Makefiles.
# -D_FORTIFY_SOURCE=2 # Detect buffer overflows during runtime
# -fasynchronous-unwind-tables # Increased readability for backtraces
# -fstack-protector-strong # Stack smashing protector
# -Wall # Compiler warnings
# -Werror=format-security # Bad string formatting and implicit calls should be errors
# -Werror=implicit-function-declaration
debug:
gcc $(GCC_DEBUG_FLAGS) stetris.c -o dtetris
release:
gcc $(GCC_RELEASE_FLAGS) stetris.c -o stetris