1 # Common NMake Makefile module for checking the build environment
2 # This can be copied from $(glib_srcroot)\build\win32 for GNOME items
3 # that support MSVC builds and introspection under MSVC, and can be used
4 # for building test programs as well.
6 # Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
7 # VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
8 !if
!defined
(VCINSTALLDIR
) && !defined
(WINDOWSSDKDIR
)
10 This Makefile is only for Visual Studio
2008 and later.^
11 You need to ensure that the Visual Studio Environment is properly set up^
12 before running this Makefile.
19 !if
![echo VCVERSION
=_MSC_VER
> vercl.x
] \
20 && ![echo
$(_HASH
)if defined
(_M_IX86
) >> vercl.x
] \
21 && ![echo PLAT
=Win32
>> vercl.x
] \
22 && ![echo
$(_HASH
)elif defined
(_M_AMD64
) >> vercl.x
] \
23 && ![echo PLAT
=x64
>> vercl.x
] \
24 && ![echo
$(_HASH
)endif >> vercl.x
] \
25 && ![cl
-nologo
-TC
-P vercl.x
$(ERRNUL
)]
27 !if
![echo VCVER
= ^\
> vercl.vc
] \
28 && ![set
/a
$(VCVERSION
) / 100 - 6 >> vercl.vc
]
32 !if
![del
$(ERRNUL
) /q
/f vercl.x vercl.i vercl.vc
]
35 !if
$(VCVERSION
) > 1499 && $(VCVERSION
) < 1600
37 !elseif
$(VCVERSION
) > 1599 && $(VCVERSION
) < 1700
39 !elseif
$(VCVERSION
) > 1699 && $(VCVERSION
) < 1800
41 !elseif
$(VCVERSION
) > 1799 && $(VCVERSION
) < 1900
43 !elseif
$(VCVERSION
) > 1899 && $(VCVERSION
) < 1910
45 !elseif
$(VCVERSION
) > 1909 && $(VCVERSION
) < 2000
53 This NMake Makefile set supports Visual Studio^
54 9 (2008) through
14 (2015). Your Visual Studio^
55 version is not supported.
60 !if
"$(CFG)" == "release" ||
"$(CFG)" == "debug" ||
"$(CFG)" == "Release" ||
"$(CFG)" == "Debug"
64 # We want debugging symbols logged for all builds,
65 # using .pdb files for release builds
68 !if
"$(CFG)" == "release" ||
"$(CFG)" == "Release"
69 CFLAGS_ADD
= /MD
/O2
$(CFLAGS_BASE
)
71 CFLAGS_ADD
= /MDd
/Od
$(CFLAGS_BASE
)
74 !if
"$(PLAT)" == "x64"
75 LDFLAGS_ARCH
= /machine
:x64
77 LDFLAGS_ARCH
= /machine
:x86