2024-07-17 21:38:27 -04:00
|
|
|
# Base compiler flags. Only change if you *explicitly* know what you're doing.
|
2024-07-19 03:59:19 -04:00
|
|
|
|
|
|
|
#ifeq ($(VCDIR),)
|
|
|
|
#$(error Please set VCDIR in your environment to )
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
# _UCRT define forces mingw not to define its stupid wrappers.
|
|
|
|
BASE_FLAGS = -MMD -fvisibility=hidden -fpermissive -fno-pic -fno-pie -fno-ident -msse -Iinclude -Isrc -Ithird_party -D_UCRT -D_WIN32_WINNT=0x0501
|
|
|
|
|
|
|
|
BASE_CCFLAGS = $(BASE_FLAGS) -std=gnu17
|
|
|
|
BASE_CXXFLAGS = $(BASE_FLAGS) -std=c++20
|
|
|
|
BASE_LDFLAGS_SHARED = -Wl,--subsystem=windows -fvisibility=hidden -shared
|
|
|
|
BASE_LDFLAGS = -lkernel32 -lshell32 -luser32 -luuid -lole32
|
2024-07-17 21:38:27 -04:00
|
|
|
|
|
|
|
Release_Valid = yes
|
2024-07-19 03:59:19 -04:00
|
|
|
Release_CCFLAGS = -O3 -DNDEBUG
|
|
|
|
Release_CXXFLAGS = -O3 -DNDEBUG
|
2024-07-17 21:38:27 -04:00
|
|
|
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
|
2024-07-19 03:59:19 -04:00
|
|
|
|
|
|
|
# define the directories used for output products here.
|
|
|
|
BINDIR = bin/$(ARCH)/$(CONFIG)
|
|
|
|
OBJDIR = obj/$(ARCH)/$(CONFIG)
|