summaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2024-05-31 21:00:57 +0300
committergramanas <anastasis.gramm2@gmail.com>2024-05-31 21:00:57 +0300
commita5a82709028c475d0ff6cd54f6d07f16375e156e (patch)
treedb1386b3e5af7075ee6e5c45c3a4964cdecdc9d2 /src/Makefile.am
parent1f6538bcaf379cb3fe257a0053e4e7567f8ddb98 (diff)
downloadcgame-a5a82709028c475d0ff6cd54f6d07f16375e156e.tar.gz
cgame-a5a82709028c475d0ff6cd54f6d07f16375e156e.tar.bz2
cgame-a5a82709028c475d0ff6cd54f6d07f16375e156e.zip
Allaboard
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 30ca37f..d2f2f8f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,6 +2,10 @@ bin_PROGRAMS = game
common_sources = state.h
+debug_flags = -O2 -DVKDEBUG
+release_flags = -O3
+common_flags = $(release_flags) -Wall -Wextra -march=native -fno-math-errno -funroll-loops -flto -pthread -ggdb -Wno-string-plus-int
+
AM_LDFLAGS = -fuse-ld=lld -flto
# -fwhole-program allows cross-file inlining, but only works when you put all
@@ -14,10 +18,10 @@ AM_LDFLAGS = -fuse-ld=lld -flto
# -fno-math-errno and stuff like that, without enabling
# -funsafe-math-optimizations. Some FP code can get big speedups from
# fast-math, like auto-vectorization.
-AM_CFLAGS = -march=native -fno-math-errno -funroll-loops -flto -pthread -ggdb -DVKDEBUG
+AM_CFLAGS = $(common_flags)
# AM_CFLAGS = -O0 -march=native -fno-math-errno -funroll-loops -flto -pthread -ggdb -fsanitize=address
-AM_CXXFLAGS = -Wall -Wextra -O2 -g -std=c++17
+AM_CXXFLAGS = $(common_flags) -std=c++17
game_SOURCES = render.c cplusplus.cpp $(common_sources)
game_LDADD = -lSDL2 -lm -lvulkan -lshaderc_shared -lstdc++