2024-07-17 21:38:27 -04:00
|
|
|
# Base compiler flags. Only change if you *explicitly* know what you're doing.
|
2024-07-18 03:54:12 -04:00
|
|
|
BASE_CCFLAGS = -MMD -fvisibility=hidden -std=gnu17 -fpermissive -fno-ident -msse -Iinclude -Isrc -D_UCRT -D_WIN32_WINNT=0x0501
|
|
|
|
BASE_CXXFLAGS = -MMD -fvisibility=hidden -std=c++20 -fpermissive -fno-ident -msse -Iinclude -Isrc -Ithird_party -D_UCRT -D_WIN32_WINNT=0x0501
|
|
|
|
BASE_LDFLAGS = -Wl,--subsystem=windows -fvisibility=hidden -shared -lkernel32 -lshell32 -luser32 -luuid -lole32
|
2024-07-17 21:38:27 -04:00
|
|
|
|
|
|
|
Release_Valid = yes
|
|
|
|
Release_CCFLAGS = -O3 -ffast-math -fomit-frame-pointer -DNDEBUG
|
|
|
|
Release_CXXFLAGS = -O3 -ffast-math -fomit-frame-pointer -DNDEBUG
|
|
|
|
Release_LDFLAGS = -s
|
|
|
|
|
|
|
|
Debug_Valid = yes
|
|
|
|
Debug_CCFLAGS = -O0 -g -DDEBUG
|
|
|
|
Debug_CXXFLAGS = -O0 -g -DDEBUG
|
|
|
|
Debug_LDFLAGS =
|
|
|
|
|
|
|
|
# select a default configuration or validate configuration
|
|
|
|
ifeq ($(CONFIG),)
|
|
|
|
CONFIG = Release
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($($(CONFIG)_Valid),yes)
|
|
|
|
$(error Please select a valid configuration)
|
|
|
|
endif
|