40 lines
1.4 KiB
Makefile
40 lines
1.4 KiB
Makefile
# libstadium makefile
|
|
|
|
CC = g++
|
|
CFLAGS_DEFAULT = -march=native -std=c++23 -fno-rtti
|
|
CFLAGS_DEBUG = -ggdb -Wall -Werror -Wno-reorder -Wno-uninitialized -fanalyzer -Wno-analyzer-use-of-uninitialized-value
|
|
#CFLAGS_DEBUG_S = -O0 -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow
|
|
CFLAGS_DEBUG_F = -O1 -D_FORTIFY_SOURCE=3
|
|
CFLAGS_RELEASE = -static-libgcc -static-libstdc++ -static -Ofast -fdevirtualize-speculatively -fdata-sections -ffunction-sections -Wl,-gc-sections -Wl,-strip-all -Wl,-strip-discarded -flto -s -D_FORTIFY_SOURCE=3
|
|
|
|
SOURCES = src/Stadium.hpp src/Stadium.cpp \
|
|
src/Event.hpp src/Event.cpp \
|
|
src/Worker.hpp src/Worker.cpp \
|
|
src/KLDR.hpp \
|
|
src/Utils.hpp
|
|
SOURCES_TEST = src/test.cpp
|
|
#LINKED_LIBS = -l
|
|
OUTPUT_LIB = libstadium.so
|
|
OUTPUT_TEST_BIN = libstadiumtest_release
|
|
#OUTPUT_TEST_BIN_S = libstadiumtest_sanitizer
|
|
OUTPUT_TEST_BIN_F = libstadiumtest_fortified
|
|
|
|
|
|
default: clean release_test
|
|
|
|
|
|
debug_test: $(SOURCES) $(SOURCES_TEST)
|
|
$(CC) $(CFLAGS_DEFAULT) $(CFLAGS_DEBUG) $(CFLAGS_DEBUG_F) $(SOURCES) $(SOURCES_TEST) -o $(OUTPUT_TEST_BIN_F)
|
|
|
|
debug: $(SOURCES)
|
|
echo "NYI"
|
|
|
|
release_test: $(SOURCES)
|
|
$(CC) $(CFLAGS_DEFAULT) $(CFLAGS_RELEASE) $(SOURCES) $(SOURCES_TEST) -o $(OUTPUT_TEST_BIN)
|
|
|
|
release: $(SOURCES)
|
|
echo "NYI"
|
|
|
|
|
|
clean:
|
|
rm -f $(OUTPUT_LIB) $(OUTPUT_TEST_BIN_F) $(OUTPUT_TEST_BIN)
|