SAPIServer/speech2/build/configs.mk
Lily Tsuru cc59c0c6db Switch to clang-cl
It's less painful than mingw.
I'll next get the DLL going like this, though it'll be pretty easy.
2024-07-19 05:10:10 -04:00

45 lines
1.5 KiB
Makefile

# Base compiler flags. Only change if you *explicitly* know what you're doing.
CXXRTDIR = $(VCDIR)/crt
UCRTDIR = $(VCDIR)/ucrt
PSDKDIR = $(VCDIR)/winsdk
# TODO: Switch to debug builds
Release_RTLIBS = libcmt.lib libucrt.lib libvcruntime.lib libcpmt.lib
Debug_RTLIBS = libcmtd.lib libucrtd.lib libvcruntimed.lib libcpmtd.lib
# I really should rename this x_x
CLANG_FLAGS = -fms-extensions -fms-compatibility-version=19 -isystem $(CXXRTDIR)/include -isystem $(UCRTDIR)/include -isystem $(PSDKDIR)/include/shared -isystem $(PSDKDIR)/include/um
BASE_FLAGS = -MMD -g3 -fvisibility=hidden $(CLANG_FLAGS) -march=pentium3 -Iinclude -Isrc -Ithird_party -D_WIN32_WINNT=0x0501
BASE_CCFLAGS = $(BASE_FLAGS) -std=gnu17
BASE_CXXFLAGS = $(BASE_FLAGS) -std=c++20
BASE_LDFLAGS_SHARED = /dll
BASE_LDFLAGS = /nodefaultlib /version:5.1 /machine:i386 /subsystem:console,5.1 /libpath:$(CXXRTDIR)/lib/x86 /libpath:$(UCRTDIR)/lib /libpath:$(PSDKDIR)/lib
Release_Valid = yes
Release_CCFLAGS = -O3 -DNDEBUG
Release_CXXFLAGS = -O3 -DNDEBUG
Release_LDFLAGS = /debug /pdb:$(BINDIR)/$(NAME).pdb
Debug_Valid = yes
Debug_CCFLAGS = -O0 -g -DDEBUG
Debug_CXXFLAGS = -O0 -g -DDEBUG
Debug_LDFLAGS = /debug /pdb:$(BINDIR)/$(NAME).pdb
# 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)