summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2018-09-10 12:09:44 +0800
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2018-10-30 10:52:48 +0100
commit62eb2f99caf7648c33daebb5e8ae550f7561fc73 (patch)
treef894e861a5130ea84f152574f2c32c1a407899ed
parent371963bff050cee1a50ba070a056cfcef09e9ab4 (diff)
downloadsigc++-62eb2f99caf7648c33daebb5e8ae550f7561fc73.tar.gz
builds: Add NMake Makefiles
This adds a set of NMake Makefiles that can be used to build libsigc++-2.10.x (and the later C++11 versions of libsigc++) with Visual Studio 2013 or later. Building the example, the tests and the benchmarking programs are supported in addition to building the main libsigc++ DLL. Note that for the C++-11 releases, we name the DLLs and LIBs as sigc-vc140-2_0.[dll|lib] or sigc-vc140-d-2_0.[dll|lib] for Visual Studio 2015 and 2017 builds as these builds link to the msvcp140[d].dll and vcruntime140[d].dll C/C++ runtime DLLs. This set of NMake Makefiles are now dist'ed in place of the Visual Studio 2013 project files.
-rw-r--r--MSVC_NMake/Makefile.vc57
-rw-r--r--MSVC_NMake/build-rules-msvc.mak92
-rw-r--r--MSVC_NMake/config-msvc.mak43
-rw-r--r--MSVC_NMake/create-lists-msvc.mak73
-rw-r--r--MSVC_NMake/create-lists.bat42
-rw-r--r--MSVC_NMake/detectenv-msvc.mak146
-rw-r--r--MSVC_NMake/filelist.am80
-rw-r--r--MSVC_NMake/generate-msvc.mak8
-rw-r--r--MSVC_NMake/info-msvc.mak40
-rw-r--r--MSVC_NMake/install.mak19
-rw-r--r--Makefile.am2
11 files changed, 533 insertions, 69 deletions
diff --git a/MSVC_NMake/Makefile.vc b/MSVC_NMake/Makefile.vc
new file mode 100644
index 0000000..cb82ebb
--- /dev/null
+++ b/MSVC_NMake/Makefile.vc
@@ -0,0 +1,57 @@
+# NMake Makefile for building libsigc++ on Windows using Visual Studio
+
+# The items below this line should not be changed, unless one is maintaining
+# the NMake Makefiles. Customizations can be done in the following NMake Makefile
+# portions (please see comments in the these files to see what can be customized):
+#
+# detectenv-msvc.mak
+# config-msvc.mak
+
+!include detectenv-msvc.mak
+
+# Include the Makefile portions with the source listings
+!include ..\sigc++\filelist.am
+
+# Include the Makefile portion that enables features based on user input
+!include config-msvc.mak
+
+!if "$(VALID_CFGSET)" == "TRUE"
+
+# We need Visual Studio 2013 or later
+!if $(VSVER) < 12
+VALID_MSC = FALSE
+!else
+VALID_MSC = TRUE
+!endif
+
+!if "$(VALID_MSC)" == "TRUE"
+
+# Include the Makefile portion to convert the source and header lists
+# into the lists we need for compilation and introspection
+!include create-lists-msvc.mak
+
+all: $(LIBSIGC_LIB) $(libsigc_ex) all-build-info
+
+tests: $(libsigc_tests) all-build-info
+
+benchmark: all $(libsigc_bench) all-build-info
+
+# Include the build rules for sources, DLLs and executables
+!include generate-msvc.mak
+!include build-rules-msvc.mak
+
+!include install.mak
+
+!else # "$(VALID_MSC)" == "TRUE"
+all:
+ @echo You need Visual Studio 2013 or later.
+
+!endif # "$(VALID_MSC)" == "TRUE"
+
+!else # "$(VALID_CFGSET)" == "TRUE"
+all: help
+ @echo You need to specify a valid configuration, via
+ @echo CFG=release or CFG=debug
+!endif # "$(VALID_CFGSET)" == "TRUE"
+
+!include info-msvc.mak
diff --git a/MSVC_NMake/build-rules-msvc.mak b/MSVC_NMake/build-rules-msvc.mak
new file mode 100644
index 0000000..4bc9764
--- /dev/null
+++ b/MSVC_NMake/build-rules-msvc.mak
@@ -0,0 +1,92 @@
+# NMake Makefile portion for compilation rules
+# Items in here should not need to be edited unless
+# one is maintaining the NMake build files. The format
+# of NMake Makefiles here are different from the GNU
+# Makefiles. Please see the comments about these formats.
+
+# Inference rules for compiling the .obj files.
+# Used for libs and programs with more than a single source file.
+# Format is as follows
+# (all dirs must have a trailing '\'):
+#
+# {$(srcdir)}.$(srcext){$(destdir)}.obj::
+# $(CC)|$(CXX) $(cflags) /Fo$(destdir) /c @<<
+# $<
+# <<
+{..\sigc++\}.cc{$(CFG)\$(PLAT)\libsigcpp\}.obj::
+ $(CXX) $(LIBSIGCPP_CFLAGS) /Fo$(CFG)\$(PLAT)\libsigcpp\ /c @<<
+$<
+<<
+
+{..\sigc++\adaptors\lambda\}.cc{$(CFG)\$(PLAT)\libsigcpp\}.obj::
+ $(CXX) $(LIBSIGCPP_CFLAGS) /Fo$(CFG)\$(PLAT)\libsigcpp\ /c @<<
+$<
+<<
+
+{..\sigc++\functors\}.cc{$(CFG)\$(PLAT)\libsigcpp\}.obj::
+ $(CXX) $(LIBSIGCPP_CFLAGS) /Fo$(CFG)\$(PLAT)\libsigcpp\ /c @<<
+$<
+<<
+
+$(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj: $(CFG)\$(PLAT)\libsigcpp-tests ..\tests\testutilities.cc
+ $(CXX) $(SIGCPP_CFLAGS) /Fo$@ /c ..\tests\testutilities.cc
+# Rules for building .lib files
+$(LIBSIGC_LIB): $(LIBSIGC_DLL)
+
+{.}.rc{$(CFG)\$(PLAT)\libsigcpp\}.res:
+ rc /fo$@ $<
+
+# Rules for linking DLLs
+# Format is as follows (the mt command is needed for MSVC 2005/2008 builds):
+# $(dll_name_with_path): $(dependent_libs_files_objects_and_items)
+# link /DLL [$(linker_flags)] [$(dependent_libs)] [/def:$(def_file_if_used)] [/implib:$(lib_name_if_needed)] -out:$@ @<<
+# $(dependent_objects)
+# <<
+# @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+$(LIBSIGC_DLL): $(CFG)\$(PLAT)\libsigcpp $(libsigcpp_dll_OBJS)
+ link /DLL $(LDFLAGS) /implib:$(LIBSIGC_LIB) -out:$@ @<<
+$(libsigcpp_dll_OBJS)
+<<
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+
+# Rules for linking Executables
+# Format is as follows (the mt command is needed for MSVC 2005/2008 builds):
+# $(dll_name_with_path): $(dependent_libs_files_objects_and_items)
+# link [$(linker_flags)] [$(dependent_libs)] -out:$@ @<<
+# $(dependent_objects)
+# <<
+# @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
+
+{..\examples\}.cc{$(CFG)\$(PLAT)\}.exe:
+ @if not exist $(CFG)\$(PLAT)\libsigcpp-ex $(MAKE) -f Makefile.vc CFG=$(CFG) $(CFG)\$(PLAT)\libsigcpp-ex
+ @if not exist $(LIBSIGC_LIB) $(MAKE) -f Makefile.vc CFG=$(CFG) $(LIBSIGC_LIB)
+ $(CXX) $(SIGCPP_CFLAGS) /Fo$(CFG)\$(PLAT)\libsigcpp-ex\ $< /Fe$@ /link $(LDFLAGS) $(LIBSIGC_LIB)
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
+
+{..\tests\}.cc{$(CFG)\$(PLAT)\}.exe:
+ @if not exist $(LIBSIGC_LIB) $(MAKE) -f Makefile.vc CFG=$(CFG) $(LIBSIGC_LIB)
+ @if not exist $(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj $(MAKE) -f Makefile.vc CFG=$(CFG) $(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj
+ $(CXX) $(SIGCPP_CFLAGS) /Fo$(CFG)\$(PLAT)\libsigcpp-tests\ $< /Fe$@ /link $(LDFLAGS) $(LIBSIGC_LIB) $(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
+
+$(CFG)\$(PLAT)\libsigc++-benchmark.exe: ..\tests\benchmark.cc
+ @if not exist $(LIBSIGC_LIB) $(MAKE) -f Makefile.vc CFG=$(CFG) $(LIBSIGC_LIB)
+ @if not exist $(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj $(MAKE) -f Makefile.vc CFG=$(CFG) $(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj
+ $(CXX) $(SIGCPP_BENCHMARK_CFLAGS) /Fo$(CFG)\$(PLAT)\libsigcpp-tests\ ..\tests\benchmark.cc /Fe$@ /link $(LDFLAGS) $(LIBSIGC_LIB) $(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
+
+clean:
+ @-del /f /q $(CFG)\$(PLAT)\*.exe
+ @-del /f /q $(CFG)\$(PLAT)\*.dll
+ @-del /f /q $(CFG)\$(PLAT)\*.pdb
+ @-del /f /q $(CFG)\$(PLAT)\*.ilk
+ @-del /f /q $(CFG)\$(PLAT)\*.exp
+ @-del /f /q $(CFG)\$(PLAT)\*.lib
+ @-if exist $(CFG)\$(PLAT)\libsigcpp-tests del /f /q $(CFG)\$(PLAT)\libsigcpp-tests\*.obj
+ @-del /f /q $(CFG)\$(PLAT)\libsigcpp-ex\*.obj
+ @-del /f /q $(CFG)\$(PLAT)\libsigcpp\*.res
+ @-del /f /q $(CFG)\$(PLAT)\libsigcpp\*.obj
+ @-if exist $(CFG)\$(PLAT)\libsigcpp-tests rd $(CFG)\$(PLAT)\libsigcpp-tests
+ @-rd $(CFG)\$(PLAT)\libsigcpp-ex
+ @-rd $(CFG)\$(PLAT)\libsigcpp
+ @-del /f /q vc$(PDBVER)0.pdb
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
new file mode 100644
index 0000000..3a933ac
--- /dev/null
+++ b/MSVC_NMake/config-msvc.mak
@@ -0,0 +1,43 @@
+# NMake Makefile portion for enabling features for Windows builds
+
+# These are the base minimum libraries required for building gjs.
+BASE_INCLUDES = /I$(PREFIX)\include
+
+# Please do not change anything beneath this line unless maintaining the NMake Makefiles
+
+LIBSIGC_MAJOR_VERSION = 2
+LIBSIGC_MINOR_VERSION = 0
+
+!if "$(CFG)" == "debug" || "$(CFG)" == "Debug"
+LIBSIGC_DEBUG_SUFFIX = -d
+!else
+LIBSIGC_DEBUG_SUFFIX =
+!endif
+
+LIBSIGCPP_DEFINES = /DSIGC_BUILD /D_WINDLL
+
+SIGCPP_BASE_CFLAGS = /I.. /I. /wd4530 $(CFLAGS)
+
+LIBSIGC_INT_SOURCES = $(sigc_sources_cc:/=\)
+LIBSIGC_INT_HDRS = $(sigc_public_h:/=\)
+
+SIGCPP_CFLAGS = $(SIGCPP_BASE_CFLAGS) $(CFLAGS)
+LIBSIGCPP_CFLAGS = $(SIGCPP_CFLAGS) $(LIBSIGCPP_DEFINES)
+
+# We build sigc-vc$(PDBVER)0-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION).dll or
+# sigc-vc$(PDBVER)0d-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION).dll at least
+
+LIBSIGC_LIBNAME = sigc-vc$(PDBVER)0$(LIBSIGC_DEBUG_SUFFIX)-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION)
+
+LIBSIGC_DLL = $(CFG)\$(PLAT)\$(LIBSIGC_LIBNAME).dll
+LIBSIGC_LIB = $(CFG)\$(PLAT)\$(LIBSIGC_LIBNAME).lib
+
+# Note that building the benchmark requires Boost!
+libsigc_bench = $(CFG)\$(PLAT)\libsigc++-benchmark.exe
+
+# If your Boost libraries are built as DLLs, use BOOST_DLL=1 in your NMake command line
+!ifdef BOOST_DLL
+SIGCPP_BENCHMARK_CFLAGS = $(SIGCPP_BASE_CFLAGS) /DBOOST_ALL_DYN_LINK
+!else
+SIGCPP_BENCHMARK_CFLAGS = $(SIGCPP_BASE_CFLAGS)
+!endif
diff --git a/MSVC_NMake/create-lists-msvc.mak b/MSVC_NMake/create-lists-msvc.mak
new file mode 100644
index 0000000..36924fa
--- /dev/null
+++ b/MSVC_NMake/create-lists-msvc.mak
@@ -0,0 +1,73 @@
+# Convert the source listing to object (.obj) listing in
+# another NMake Makefile module, include it, and clean it up.
+# This is a "fact-of-life" regarding NMake Makefiles...
+# This file does not need to be changed unless one is maintaining the NMake Makefiles
+
+# For those wanting to add things here:
+# To add a list, do the following:
+# # $(description_of_list)
+# if [call create-lists.bat header $(makefile_snippet_file) $(variable_name)]
+# endif
+#
+# if [call create-lists.bat file $(makefile_snippet_file) $(file_name)]
+# endif
+#
+# if [call create-lists.bat footer $(makefile_snippet_file)]
+# endif
+# ... (repeat the if [call ...] lines in the above order if needed)
+# !include $(makefile_snippet_file)
+#
+# (add the following after checking the entries in $(makefile_snippet_file) is correct)
+# (the batch script appends to $(makefile_snippet_file), you will need to clear the file unless the following line is added)
+#!if [del /f /q $(makefile_snippet_file)]
+#!endif
+
+# In order to obtain the .obj filename that is needed for NMake Makefiles to build DLLs/static LIBs or EXEs, do the following
+# instead when doing 'if [call create-lists.bat file $(makefile_snippet_file) $(file_name)]'
+# (repeat if there are multiple $(srcext)'s in $(source_list), ignore any headers):
+# !if [for %c in ($(source_list)) do @if "%~xc" == ".$(srcext)" @call create-lists.bat file $(makefile_snippet_file) $(intdir)\%~nc.obj]
+#
+# $(intdir)\%~nc.obj needs to correspond to the rules added in build-rules-msvc.mak
+# %~xc gives the file extension of a given file, %c in this case, so if %c is a.cc, %~xc means .cc
+# %~nc gives the file name of a given file without extension, %c in this case, so if %c is a.cc, %~nc means a
+
+NULL=
+
+# For libsigc++
+
+!if [call create-lists.bat header libsigcpp.mak libsigcpp_dll_OBJS]
+!endif
+
+!if [for %c in ($(sigc_sources_cc)) do @if "%~xc" == ".cc" @call create-lists.bat file libsigcpp.mak ^$(CFG)\^$(PLAT)\libsigcpp\%~nc.obj]
+!endif
+
+!if [@call create-lists.bat file libsigcpp.mak ^$(CFG)\^$(PLAT)\libsigcpp\sigc.res]
+!endif
+
+!if [call create-lists.bat footer libsigcpp.mak]
+!endif
+
+!if [call create-lists.bat header libsigcpp.mak libsigc_ex]
+!endif
+
+!if [for %s in (..\examples\*.cc) do @call create-lists.bat file libsigcpp.mak ^$(CFG)\^$(PLAT)\%~ns.exe]
+!endif
+
+!if [call create-lists.bat footer libsigcpp.mak]
+!endif
+
+!if [call create-lists.bat header libsigcpp.mak libsigc_tests]
+!endif
+
+# Skipping testutilities.cc: Not to be built as a .exe, but is a common dependency for the tests
+# benchmark: Not built on default; requires Boost
+!if [for %s in (..\tests\*.cc) do @if not "%~ns" == "testutilities" if not "%~ns" == "benchmark" @call create-lists.bat file libsigcpp.mak ^$(CFG)\^$(PLAT)\%~ns.exe]
+!endif
+
+!if [call create-lists.bat footer libsigcpp.mak]
+!endif
+
+!include libsigcpp.mak
+
+!if [del /f /q libsigcpp.mak]
+!endif
diff --git a/MSVC_NMake/create-lists.bat b/MSVC_NMake/create-lists.bat
new file mode 100644
index 0000000..ef60d5c
--- /dev/null
+++ b/MSVC_NMake/create-lists.bat
@@ -0,0 +1,42 @@
+@echo off
+rem Simple .bat script for creating the NMake Makefile snippets.
+
+if not "%1" == "header" if not "%1" == "file" if not "%1" == "footer" goto :error_cmd
+if "%2" == "" goto error_no_destfile
+
+if "%1" == "header" goto :header
+if "%1" == "file" goto :addfile
+if "%1" == "footer" goto :footer
+
+:header
+if "%3" == "" goto error_var
+echo %3 = \>>%2
+goto done
+
+:addfile
+if "%3" == "" goto error_file
+echo. %3 \>>%2
+goto done
+
+:footer
+echo. $(NULL)>>%2
+echo.>>%2
+goto done
+
+:error_cmd
+echo Specified command '%1' was invalid. Valid commands are: header file footer.
+goto done
+
+:error_no_destfile
+echo Destination NMake snippet file must be specified
+goto done
+
+:error_var
+echo A name must be specified for using '%1'.
+goto done
+
+:error_file
+echo A file must be specified for using '%1'.
+goto done
+
+:done \ No newline at end of file
diff --git a/MSVC_NMake/detectenv-msvc.mak b/MSVC_NMake/detectenv-msvc.mak
new file mode 100644
index 0000000..e5dadaf
--- /dev/null
+++ b/MSVC_NMake/detectenv-msvc.mak
@@ -0,0 +1,146 @@
+# Change this (or specify PREFIX= when invoking this NMake Makefile) if
+# necessary, so that the libs and headers of the dependent third-party
+# libraries can be located. For instance, if building from GLib's
+# included Visual Studio projects, this should be able to locate the GLib
+# build out-of-the-box if they were not moved. GLib's headers will be
+# found in $(GLIB_PREFIX)\include\glib-2.0 and
+# $(GLIB_PREFIX)\lib\glib-2.0\include and its import library will be found
+# in $(GLIB_PREFIX)\lib.
+
+!if "$(PREFIX)" == ""
+PREFIX = ..\..\vs$(VSVER)\$(PLAT)
+!endif
+
+# Location of the PERL interpreter, for running glib-mkenums. glib-mkenums
+# needs to be found in $(PREFIX)\bin. Using either a 32-bit or x64 PERL
+# interpreter are supported for either a 32-bit or x64 build.
+
+!if "$(PERL)" == ""
+PERL = perl
+!endif
+
+# Location of the Python interpreter, for building introspection. The complete set
+# of Python Modules for introspection (the giscanner Python scripts and the _giscanner.pyd
+# compiled module) needs to be found in $(PREFIX)\lib\gobject-introspection\giscanner, and
+# the g-ir-scanner Python script and g-ir-compiler utility program needs to be found
+# in $(PREFIX)\bin, together with any DLLs they will depend on, if those DLLs are not already
+# in your PATH.
+# Note that the Python interpreter and the introspection modules and utility progam must
+# correspond to the build type (i.e. 32-bit Release for 32-bit Release builds, and so on).
+#
+# For introspection, currently only Python 2.7.x is supported. This may change when Python 3.x
+# support is added upstream in gobject-introspection--when this happens, the _giscanner.pyd must
+# be the one that is built against the release series of Python that is used here.
+
+!if "$(PYTHON)" == ""
+PYTHON = python
+!endif
+
+# Location of the pkg-config utility program, for building introspection. It needs to be able
+# to find the pkg-config (.pc) files so that the correct libraries and headers for the needed libraries
+# can be located, using PKG_CONFIG_PATH. Using either a 32-bit or x64 pkg-config are supported for
+# either a 32-bit or x64 build.
+
+!if "$(PKG_CONFIG)" == ""
+PKG_CONFIG = pkg-config
+!endif
+
+# The items below this line should not be changed, unless one is maintaining
+# the NMake Makefiles. The exception is for the CFLAGS_ADD line(s) where one
+# could use his/her desired compiler optimization flags, if he/she knows what is
+# being done.
+
+# 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)
+MSG = ^
+This Makefile is only for Visual Studio 2008 and later.^
+You need to ensure that the Visual Studio Environment is properly set up^
+before running this Makefile.
+!error $(MSG)
+!endif
+
+ERRNUL = 2>NUL
+_HASH=^#
+
+!if ![echo VCVERSION=_MSC_VER > vercl.x] \
+ && ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
+ && ![echo PLAT=Win32 >> vercl.x] \
+ && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
+ && ![echo PLAT=x64 >> vercl.x] \
+ && ![echo $(_HASH)endif >> vercl.x] \
+ && ![cl -nologo -TC -P vercl.x $(ERRNUL)]
+!include vercl.i
+!if ![echo VCVER= ^\> vercl.vc] \
+ && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
+!include vercl.vc
+!endif
+!endif
+!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
+!endif
+
+!if $(VCVERSION) > 1499 && $(VCVERSION) < 1600
+VSVER = 9
+!elseif $(VCVERSION) > 1599 && $(VCVERSION) < 1700
+VSVER = 10
+!elseif $(VCVERSION) > 1699 && $(VCVERSION) < 1800
+VSVER = 11
+!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
+VSVER = 12
+!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 1910
+VSVER = 14
+!elseif $(VCVERSION) > 1909 && $(VCVERSION) < 2000
+VSVER = 15
+!else
+VSVER = 0
+!endif
+
+!if "$(VSVER)" == "0"
+MSG = ^
+This NMake Makefile set supports Visual Studio^
+9 (2008) through 15 (2017). Your Visual Studio^
+version is not supported.
+!error $(MSG)
+!else
+!if $(VSVER) < 15
+PDBVER = $(VSVER)
+!else
+PDBVER = 14
+!endif
+!endif
+
+VALID_CFGSET = FALSE
+!if "$(CFG)" == "release" || "$(CFG)" == "Release" || "$(CFG)" == "debug" || "$(CFG)" == "Debug"
+VALID_CFGSET = TRUE
+!endif
+
+# One may change these items, but be sure to test
+# the resulting binaries
+!if "$(CFG)" == "release" || "$(CFG)" == "Release"
+CFLAGS_ADD = /MD /O2 /GL /MP
+!if "$(VSVER)" != "9"
+CFLAGS_ADD = $(CFLAGS_ADD) /d2Zi+
+!endif
+!else
+CFLAGS_ADD = /MDd /Od
+!endif
+
+!if "$(PLAT)" == "x64"
+LDFLAGS_ARCH = /machine:x64
+!else
+LDFLAGS_ARCH = /machine:x86
+!endif
+
+!if "$(VALID_CFGSET)" == "TRUE"
+CFLAGS = $(CFLAGS_ADD) /W3 /Zi
+
+LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(PREFIX)\lib /DEBUG
+
+!if "$(CFG)" == "debug" || "$(CFG)" == "Debug"
+ARFLAGS = $(LDFLAGS_ARCH)
+LDFLAGS = $(LDFLAGS_BASE)
+!else
+ARFLAGS = $(LDFLAGS_ARCH) /LTCG
+LDFLAGS = $(LDFLAGS_BASE) /LTCG /opt:ref
+!endif
+!endif
diff --git a/MSVC_NMake/filelist.am b/MSVC_NMake/filelist.am
index 3ebcc77..38ce634 100644
--- a/MSVC_NMake/filelist.am
+++ b/MSVC_NMake/filelist.am
@@ -1,70 +1,14 @@
## This file is part of libsigc++.
-msvc_net2013_data = \
- libsigc++2.sln \
- libsigc++2.vcxproj \
- libsigc++2.vcxproj.filters \
- sigc++config.h \
- sigc.rc \
- sigc-build-defines.props \
- sigc-debug-dll-build-defines.props \
- sigc-install.props \
- sigc-release-dll-build-defines.props \
- sigc-version-paths.props \
- sigc-install.vcxproj \
- test_accum_iter.vcxproj \
- test_accum_iter.vcxproj.filters \
- test_accumulated.vcxproj \
- test_accumulated.vcxproj.filters \
- test_bind.vcxproj \
- test_bind.vcxproj.filters \
- test_bind_ref.vcxproj \
- test_bind_ref.vcxproj.filters \
- test_bind_refptr.vcxproj \
- test_bind_refptr.vcxproj.filters \
- test_bind_return.vcxproj \
- test_bind_return.vcxproj.filters \
- test_compose.vcxproj \
- test_compose.vcxproj.filters \
- test_copy_invalid_slot.vcxproj \
- test_copy_invalid_slot.vcxproj.filters \
- test_cpp11_lambda.vcxproj \
- test_cpp11_lambda.vcxproj.filters \
- test_custom.vcxproj \
- test_custom.vcxproj.filters \
- test_deduce_result_type.vcxproj \
- test_deduce_result_type.vcxproj.filters \
- test_disconnect.vcxproj \
- test_disconnect.vcxproj.filters \
- test_disconnect_during_emit.vcxproj \
- test_disconnect_during_emit.vcxproj.filters \
- test_exception_catch.vcxproj \
- test_exception_catch.vcxproj.filters \
- test_functor_trait.vcxproj \
- test_functor_trait.vcxproj.filters \
- test_hide.vcxproj \
- test_hide.vcxproj.filters \
- test_limit_reference.vcxproj \
- test_limit_reference.vcxproj.filters \
- test_mem_fun.vcxproj \
- test_mem_fun.vcxproj.filters \
- test_ptr_fun.vcxproj \
- test_ptr_fun.vcxproj.filters \
- test_retype.vcxproj \
- test_retype.vcxproj.filters \
- test_retype_return.vcxproj \
- test_retype_return.vcxproj.filters \
- test_signal.vcxproj \
- test_signal.vcxproj.filters \
- test_size.vcxproj \
- test_size.vcxproj.filters \
- test_slot.vcxproj \
- test_slot.vcxproj.filters \
- test_slot_disconnect.vcxproj \
- test_slot_disconnect.vcxproj.filters \
- test_trackable.vcxproj \
- test_trackable.vcxproj.filters \
- test_track_obj.vcxproj \
- test_track_obj.vcxproj.filters \
- test_visit_each.vcxproj \
- test_visit_each.vcxproj.filters
+msvc_nmake_data = \
+ build-rules-msvc.mak \
+ config-msvc.mak \
+ create-lists.bat \
+ create-lists-msvc.mak \
+ detectenv-msvc.mak \
+ generate-msvc.mak \
+ info-msvc.mak \
+ install.mak \
+ Makefile.vc \
+ sigc++config.h \
+ sigc.rc
diff --git a/MSVC_NMake/generate-msvc.mak b/MSVC_NMake/generate-msvc.mak
new file mode 100644
index 0000000..5f9496e
--- /dev/null
+++ b/MSVC_NMake/generate-msvc.mak
@@ -0,0 +1,8 @@
+# NMake Makefile portion for code generation and
+# intermediate build directory creation
+# Items in here should not need to be edited unless
+# one is maintaining the NMake build files.
+
+# Create the build directories
+$(CFG)\$(PLAT)\libsigcpp $(CFG)\$(PLAT)\libsigcpp-ex $(CFG)\$(PLAT)\libsigcpp-tests:
+ @-mkdir $@
diff --git a/MSVC_NMake/info-msvc.mak b/MSVC_NMake/info-msvc.mak
new file mode 100644
index 0000000..b669ec2
--- /dev/null
+++ b/MSVC_NMake/info-msvc.mak
@@ -0,0 +1,40 @@
+# NMake Makefile portion for displaying config info
+
+all-build-info:
+ @echo.
+ @echo ----------
+ @echo Build info
+ @echo ---------
+ @echo Build Type: $(CFG)
+
+help:
+ @echo.
+ @echo ==============================
+ @echo Building libsigc++ Using NMake
+ @echo ==============================
+ @echo nmake /f Makefile.vc CFG=[release^|debug] ^<PREFIX=PATH^>
+ @echo.
+ @echo Where:
+ @echo ------
+ @echo CFG: Required, use CFG=release for an optimized build and CFG=debug
+ @echo for a debug build. PDB files are generated for all builds.
+ @echo.
+ @echo PREFIX: Optional, the path where dependent libraries and tools may be
+ @echo found, default is ^$(srcrootdir)\..\vs^$(short_vs_ver)\^$(platform),
+ @echo where ^$(short_vs_ver) is 12 for VS 2013 and 14 for VS 2015 and so on;
+ @echo and ^$(platform) is Win32 for 32-bit builds and x64 for x64 builds.
+ @echo.
+ @echo ======
+ @echo A 'clean' target is supported to remove all generated files, intermediate
+ @echo object files and binaries for the specified configuration.
+ @echo.
+ @echo An 'install' target is supported to copy the build (DLLs, LIBs, along with
+ @echo the header files) to appropriate locations under ^$(PREFIX).
+ @echo.
+ @echo A 'tests' target is supported to build the test programs, and a 'benchmark'
+ @echo target is supported to build the benchmarking program. Note that the
+ @echo benchmarking program requires the Boost C++ libraries to build, and you need
+ @echo to pass in BOOST_DLL=1 to the NMake command line if your Boost libraries are
+ @echo built as DLLs.
+ @echo ======
+ @echo.
diff --git a/MSVC_NMake/install.mak b/MSVC_NMake/install.mak
new file mode 100644
index 0000000..c0d76c8
--- /dev/null
+++ b/MSVC_NMake/install.mak
@@ -0,0 +1,19 @@
+# NMake Makefile snippet for copying the built libraries, utilities and headers to
+# a path under $(PREFIX).
+
+install: all
+ @if not exist $(PREFIX)\bin\ mkdir $(PREFIX)\bin
+ @if not exist $(PREFIX)\lib\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\include\ mkdir $(PREFIX)\lib\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\include
+ @if not exist $(PREFIX)\include\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\sigc++\adaptors\lambda\ @mkdir $(PREFIX)\include\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\sigc++\adaptors\lambda
+ @if not exist $(PREFIX)\include\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\sigc++\functors\ @mkdir $(PREFIX)\include\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\sigc++\functors
+ @if not exist $(PREFIX)\include\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\sigc++\tuple-utils\ @mkdir $(PREFIX)\include\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\sigc++\tuple-utils
+ @copy /b $(CFG)\$(PLAT)\$(LIBSIGC_LIBNAME).dll $(PREFIX)\bin
+ @copy /b $(CFG)\$(PLAT)\$(LIBSIGC_LIBNAME).pdb $(PREFIX)\bin
+ @copy /b $(CFG)\$(PLAT)\$(LIBSIGC_LIBNAME).lib $(PREFIX)\lib
+ @copy "..\sigc++\sigc++.h" "$(PREFIX)\include\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\sigc++\"
+ @for %h in ($(LIBSIGC_INT_HDRS)) do @copy "..\sigc++\%h" "$(PREFIX)\include\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\sigc++\%h"
+ @for %h in ($(base_built_h)) do @copy "..\sigc++\%h" "$(PREFIX)\include\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\sigc++\%h"
+ @for %h in ($(functors_built_h)) do @copy "..\sigc++\functors\%h" "$(PREFIX)\include\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\sigc++\functors\%h"
+ @for %h in ($(adaptors_built_h)) do @copy "..\sigc++\adaptors\%h" "$(PREFIX)\include\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\sigc++\adaptors\%h"
+ @for %h in ($(lambda_built_h)) do @copy "..\sigc++\adaptors\lambda\%h" "$(PREFIX)\include\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\sigc++\adaptors\lambda\%h"
+ @copy "sigc++config.h" "$(PREFIX)\lib\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\include\"
diff --git a/Makefile.am b/Makefile.am
index 72e57e5..e04ec3e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,7 +35,7 @@ dist_noinst_SCRIPTS = autogen.sh
include $(srcdir)/MSVC_NMake/filelist.am
-dist_noinst_DATA = $(addprefix MSVC_NMake/,$(msvc_net2013_data))
+dist_noinst_DATA = $(addprefix MSVC_NMake/,$(msvc_nmake_data))
DISTCLEANFILES = MSVC_NMake/sigc++config.h