Lily Tsuru
d95d305734
i'm going to switch the build to clang-cl. To test, I've added EXE build support back to the speech2 C++ buildsystem and I'm going to replace the current mingw command lines for clang-cl in the next commit. Because we only need XP SP3 compatibility, we won't need any compat library stuff, but I may still alter his libc++ fork if MSVC CRT ends up blowing too many chunks.
38 lines
1.1 KiB
Makefile
38 lines
1.1 KiB
Makefile
# Base compiler flags. Only change if you *explicitly* know what you're doing.
|
|
|
|
#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
|
|
|
|
Release_Valid = yes
|
|
Release_CCFLAGS = -O3 -DNDEBUG
|
|
Release_CXXFLAGS = -O3 -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
|
|
|
|
# define the directories used for output products here.
|
|
BINDIR = bin/$(ARCH)/$(CONFIG)
|
|
OBJDIR = obj/$(ARCH)/$(CONFIG)
|