summaryrefslogblamecommitdiffstats
path: root/src/Makefile.am
blob: b7e218215d046f570fd180c6021e18e7c1dfd027 (plain) (tree)
1
2
3
4
5
6
7



                        


                               












                                                                                                      

                                             
                                                       
                                                          

                                                                                                                                                               
bin_PROGRAMS = game

common_sources = state.h


AM_LDFLAGS = -fuse-ld=lld -flto

# -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

AM_CXXFLAGS = -Wall -Wextra -O2 -g -std=c++17

game_SOURCES = render.c cplusplus.cpp $(common_sources)
game_LDADD = -lSDL2 -lm -lvulkan -lshaderc_shared -lstdc++

cplusplus.$(OBJEXT) : CXXFLAGS += -Wno-nullability-completeness -Wno-unused-function -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable