summaryrefslogtreecommitdiff
path: root/build/win32
diff options
context:
space:
mode:
Diffstat (limited to 'build/win32')
-rw-r--r--build/win32/detectenv-msvc.mak17
-rw-r--r--build/win32/gi-tests-msvc.mak12
-rw-r--r--build/win32/introspection-msvc.mak8
3 files changed, 27 insertions, 10 deletions
diff --git a/build/win32/detectenv-msvc.mak b/build/win32/detectenv-msvc.mak
index 2dfb8e18..c23e444f 100644
--- a/build/win32/detectenv-msvc.mak
+++ b/build/win32/detectenv-msvc.mak
@@ -1,3 +1,8 @@
+# Common NMake Makefile module for checking the build environment
+# This can be copied from $(glib_srcroot)\build\win32 for GNOME items
+# that support MSVC builds and introspection under MSVC, and can be used
+# for building test programs as well.
+
# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
!if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR)
@@ -54,14 +59,14 @@ VALID_CFGSET = FALSE
VALID_CFGSET = TRUE
!endif
+# We want debugging symbols logged for all builds,
+# using .pdb files for release builds
+CFLAGS_BASE = /Zi
+
!if "$(CFG)" == "release"
-!if "$(VSVER)" == "9" && "$(PLAT)" == "x64"
-CFLAGS_ADD = /MD /O1 /Oi
-!else
-CFLAGS_ADD = /MD /O2
-!endif
+CFLAGS_ADD = /MD /O2 $(CFLAGS_BASE)
!else
-CFLAGS_ADD = /MDd /Od /Zi /DG_ENABLE_DEBUG
+CFLAGS_ADD = /MDd /Od $(CFLAGS_BASE)
!endif
!if "$(PLAT)" == "x64"
diff --git a/build/win32/gi-tests-msvc.mak b/build/win32/gi-tests-msvc.mak
index caff3fb9..b555bcdf 100644
--- a/build/win32/gi-tests-msvc.mak
+++ b/build/win32/gi-tests-msvc.mak
@@ -4,8 +4,18 @@
!include gi-build-common-msvc.mak
+!if "$(CFG)" == "release"
+!if "$(VSVER)" == "9" && "$(PLAT)" == "x64"
+TESTS_CFLAGS_ADD = /MD /O1 /Oi
+!else
+TESTS_CFLAGS_ADD = $(CFLAGS_ADD)
+!endif
+!else
+TESTS_CFLAGS_ADD = /MDd /Od /Zi /DG_ENABLE_DEBUG
+!endif
+
BASE_GLIB_LIBS = gio-$(GLIB_APIVERSION).lib gobject-$(GLIB_APIVERSION).lib gmodule-$(GLIB_APIVERSION).lib glib-$(GLIB_APIVERSION).lib
-CFLAGS = $(CFLAGS_ADD) /I$(TOP_SRCDIR) /W3 /we4013 /FImsvc_recommended_pragmas.h /DHAVE_CONFIG_H
+CFLAGS = $(TESTS_CFLAGS_ADD) /I$(TOP_SRCDIR) /W3 /we4013 /FImsvc_recommended_pragmas.h /DHAVE_CONFIG_H
LDFLAGS = /link $(LDFLAGS_ARCH) $(BASE_GLIB_LIBS)
LDFLAGS_DLL = /link $(LDFLAGS_ARCH) /DLL /out:$@ /implib:$*-$(GI_APIVERSION).lib $(BASE_GLIB_LIBS)
diff --git a/build/win32/introspection-msvc.mak b/build/win32/introspection-msvc.mak
index 9862f715..d7cc3419 100644
--- a/build/win32/introspection-msvc.mak
+++ b/build/win32/introspection-msvc.mak
@@ -1,7 +1,9 @@
-# Common Utility NMake Makefile Template
-# Used to Generate Introspection files for various Projects
+# Common NMake Makefile module for checking the build environment is sane
+# for building introspection files under MSVC/NMake.
+# This can be copied from $(gi_srcroot)\build\win32 for GNOME items
+# that support MSVC builds and introspection under MSVC.
-# Can Override with env vars as needed
+# Can override with env vars as needed
# You will need to have built gobject-introspection for this to work.
# Change or pass in or set the following to suit your environment