forked from SDL-Hercules-390/hyperion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HERC_FLAGS.msvc
90 lines (70 loc) · 3.04 KB
/
HERC_FLAGS.msvc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# ***************************************************************************
# HERC_FLAGS.msvc (!INCLUDE ed by "makefile-dllmod.msvc")
# --------------------------------------------------------------------------
# (c) Copyright Roger Bowler, 2005-2007
# --------------------------------------------------------------------------
#
# Sets additional Hercules-related compiler/linker flags & #defines...
#
# ***************************************************************************
# Set some additional flags...
ldebug = $(ldebug) $(MAPFILE)
# user32.lib for the MessageBeep and MessageBox functions
LIBS = $(LIBS) user32.lib
# The following line makes all warnings into errors
cflags = $(cflags) /WX
!IFDEF ASSEMBLY_LISTINGS
# /FAcs = source code, assembly code, and machine code
cflags = $(cflags) /FAcs /Fa$(ASMDIR)\$(NULL)
!ENDIF
# PRERELEASE Flag support
!IFDEF PRERELEASE
rcflags = $(rcflags) -D PRERELEASE=1
!ENDIF
!IFDEF _WIN64
rcflags = $(rcflags) -D _WIN64
!ENDIF
!IFNDEF MAX_CPU_ENGINES
MAX_CPU_ENGINES = 8
!ENDIF
rcflags = $(rcflags) -D _MSVC_ -D "VERSION=$(VERSION)" -D V1=$(V1) -D V2=$(V2) -D V3=$(V3) -D V4=$(V4)
cflags = $(cflags) /D _MSVC_ /D "VERSION=$(VERSION)" -D V1=$(V1) -D V2=$(V2) -D V3=$(V3) -D V4=$(V4) /D MAX_CPU_ENGINES=$(MAX_CPU_ENGINES)
!IF DEFINED(CUSTOM_BUILD_STRING)
cflags = $(cflags) /D CUSTOM_BUILD_STRING=\"$(CUSTOM_BUILD_STRING)\"
!ENDIF
# Allow version.c to display the name of the host CPU architecture
cflags = $(cflags) /D HOST_ARCH=$(CPU)
# The following instructs the declaration of DLL export symbols
cflags = $(cflags) /D HDL_BUILD_SHARED /D OPTION_DYNAMIC_LOAD
# Suppress some deprecation warnings that aren't really deprecation warnings
cflags = $(cflags) -D _CRT_SECURE_NO_DEPRECATE
cflags = $(cflags) -D _CRT_NONSTDC_NO_DEPRECATE
ldebug = $(ldebug) /MANIFEST
# WIN64 builds set level-4 diagnostics which are too intense for our liking,
# resulting in far too many uninteresting warning messages. Thus we override
# win32.mak's options for WIN64 to reinstate the default level-3 diagnostics
cflags = $(cflags:-W4=-W3)
cflags = $(cflags:/W4=/W3)
# D9035: option 'Wp64' has been deprecated and will be removed in a future release.
cflags = $(cflags:-Wp64=)
cflags = $(cflags:/Wp64=)
# Enable "/MP (Build with Multiple Processes)" option
# if the building host has more than one processor...
!IF $(vsversion) >= 9 && $(NUMBER_OF_PROCESSORS) > 1
cflags = $(cflags) /MP
!ENDIF
# Note: the "/Gm (Enable Minimal Rebuild)" option is incompatible
# with the "/MP (Build with Multiple Processes)" option (and besides
# that it's still somewhat buggy) so remove it if it's present...
cdebug = $(cdebug:-Gm=)
cdebug = $(cdebug:/Gm=)
# Specify module base address directly via linker option
# so we don't have to rely on user having rebase utility.
ldebug = $(ldebug) /base:0x400000
# Optimize for AMD64 CPU architecture
!IF "$(CPU)" == "AMD64"
cflags = $(cflags) /favor:AMD64
!ENDIF
# Increase the sockets set size limit/default to be the
# same value as used on most non-Windows platforms (1024)
cflags = $(cflags) /D FD_SETSIZE=1024