summaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2024-05-19 04:06:41 +0300
committergrm <grm@eyesin.space>2024-05-19 04:06:41 +0300
commit5f0de3a300e4c432272285de84b298ab29f1c07a (patch)
treee6f614b0e2c5e05bed95705778a0d5d5dedbe446 /src/Makefile.am
downloadcgame-5f0de3a300e4c432272285de84b298ab29f1c07a.tar.gz
cgame-5f0de3a300e4c432272285de84b298ab29f1c07a.tar.bz2
cgame-5f0de3a300e4c432272285de84b298ab29f1c07a.zip
aait
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..44c7cc1
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,19 @@
+bin_PROGRAMS = game
+
+common_sources = state.h
+
+# -fwhole-program allows cross-file inlining, but only works when you put all
+# the source files on one gcc command-line. -flto is another way to get the
+# same effect. (Link-Time Optimization). clang supports -flto but not
+# -fwhole-program.
+
+# If your program doesn't depend on strict FP rounding
+# behaviour, use -ffast-math. If it does, you can usually still use
+# -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 = -O0 -march=native -fno-math-errno -funroll-loops -flto -pthread -ggdb -fsanitize=address
+
+game_SOURCES = game.c cplusplus.cpp $(common_sources)
+game_LDADD = -lSDL2 -lm -lSDL2_image -lvulkan -lshaderc_shared -lstdc++