hazelnut/agent-vs2022/build/configs.mk

40 lines
1.1 KiB
Makefile
Raw Normal View History

# Base compiler flags. Only change if you *explicitly* know what you're doing.
RC_INCLUDES := /I ~/vs2022/winsdk/include/um /I ~/vs2022/winsdk/include/shared
SDK_INCLUDES := -isystem ~/vs2022/ucrt/include -isystem ~/vs2022/crt/include -isystem ~/vs2022/winsdk/include/shared -isystem ~/vs2022/winsdk/include/um
# Windows 6.1
BASE_CCFLAGS := $(SDK_INCLUDES) -D_WIN32_WINNT=0x0601 -Ires -std=c17
BASE_CXXFLAGS := $(SDK_INCLUDES) -D_CRT_SECURE_NO_WARNINGS -fno-exceptions -fno-rtti -D_WIN32_WINNT=0x0601 -Isrc -Ires -std=c++23
Release_Valid = yes
Release_CCFLAGS = -O3 -ffast-math -DNDEBUG
Release_CXXFLAGS = -O3 -ffast-math -DNDEBUG
#-ffunction-sections -fdata-sections
Release_LDFLAGS = -s
#-Wl,--gc-sections
Debug_Valid = yes
Debug_CCFLAGS = -O0 -g -D_DEBUG
Debug_CXXFLAGS = -O0 -g -D_DEBUG -D_ITERATOR_DEBUG_LEVEL=2
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
# for debug msvc libs. FUCK microsoft
ifeq ($(CONFIG),Debug)
D = d
else
D =
endif