diff options
-rw-r--r-- | .gitignore | 12 | ||||
-rw-r--r-- | MSVC_NMake/Makefile.vc | 1 | ||||
-rw-r--r-- | MSVC_NMake/config-msvc.mak | 19 | ||||
-rw-r--r-- | MSVC_NMake/generate-msvc.mak | 36 |
4 files changed, 42 insertions, 26 deletions
@@ -77,12 +77,12 @@ toy-text.png user-font.png # Windows -*.exe -*.user -*.ncb -*.suo -Debug -Release +MSVC_NMake/vs14/ +MSVC_NMake/vs15/ +MSVC_NMake/vs16/ +MSVC_NMake/cairomm/cairommconfig.h +MSVC_NMake/cairomm/cairomm.rc +MSVC_NMake/pkg-ver.mak # untracked/ untracked/build_scripts/ diff --git a/MSVC_NMake/Makefile.vc b/MSVC_NMake/Makefile.vc index 45e6ef3..93157d4 100644 --- a/MSVC_NMake/Makefile.vc +++ b/MSVC_NMake/Makefile.vc @@ -32,6 +32,7 @@ VALID_MSC = TRUE !ifdef GENERATE_VERSIONED_FILES !include pkg-ver.mak +DO_REAL_GEN = 1 !endif # Include the Makefile portion to convert the source and header lists diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak index c2d0344..1d14b2e 100644 --- a/MSVC_NMake/config-msvc.mak +++ b/MSVC_NMake/config-msvc.mak @@ -49,19 +49,30 @@ CAIROMM_INT_HDRS = $(cairomm_public_h:/=\) # We build cairomm-vc$(VSVER_LIB)-$(CAIROMM_MAJOR_VERSION)_$(CAIROMM_MINOR_VERSION).dll or # cairomm-vc$(VSVER_LIB)-d-$(CAIROMM_MAJOR_VERSION)_$(CAIROMM_MINOR_VERSION).dll at least +!if $(VSVER) > 14 && "$(USE_COMPAT_LIBS)" != "" +VSVER_LIB = 150 +MESON_VSVER_LIB = +!else +VSVER_LIB = $(PDBVER)$(VSVER_SUFFIX) +MESON_VSVER_LIB = -vc$(VSVER_LIB) +!endif + !ifdef USE_MESON_LIBS LIBSIGC_LIBNAME = sigc-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION) -LIBSIGC_DLL = $(LIBSIGC_LIBNAME)-0.dll +CAIROMM_LIBNAME = cairomm$(MESON_VSVER_LIB)-$(CAIROMM_MAJOR_VERSION).$(CAIROMM_MINOR_VERSION) + +CAIROMM_DLLNAME = $(CAIROMM_LIBNAME)-1 !else LIBSIGC_LIBNAME = sigc-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION) -LIBSIGC_DLL = $(LIBSIGC_LIBNAME).dll +CAIROMM_LIBNAME = cairomm-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(CAIROMM_MAJOR_VERSION)_$(CAIROMM_MINOR_VERSION) + +CAIROMM_DLLNAME = $(CAIROMM_LIBNAME) !endif LIBSIGC_LIB = $(LIBSIGC_LIBNAME).lib -CAIROMM_LIBNAME = cairomm-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(CAIROMM_MAJOR_VERSION)_$(CAIROMM_MINOR_VERSION) -CAIROMM_DLL = vs$(VSVER)\$(CFG)\$(PLAT)\$(CAIROMM_LIBNAME).dll +CAIROMM_DLL = vs$(VSVER)\$(CFG)\$(PLAT)\$(CAIROMM_DLLNAME).dll CAIROMM_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\$(CAIROMM_LIBNAME).lib CAIRO_LIB = cairo.lib diff --git a/MSVC_NMake/generate-msvc.mak b/MSVC_NMake/generate-msvc.mak index f2fac82..5bb6624 100644 --- a/MSVC_NMake/generate-msvc.mak +++ b/MSVC_NMake/generate-msvc.mak @@ -7,24 +7,28 @@ prep-git-build: pkg-ver.mak $(MAKE) /f Makefile.vc CFG=$(CFG) GENERATE_VERSIONED_FILES=1 cairomm\cairomm.rc cairomm\cairommconfig.h -cairomm\cairomm.rc: pkg-ver.mak cairomm\cairomm.rc.in - @echo Generating $@... - @copy $@.in $@ - @$(PERL) -pi.bak -e "s/\@CAIROMM_MAJOR_VERSION\@/$(PKG_MAJOR_VERSION)/g" $@ - @$(PERL) -pi.bak -e "s/\@CAIROMM_MINOR_VERSION\@/$(PKG_MINOR_VERSION)/g" $@ - @$(PERL) -pi.bak -e "s/\@CAIROMM_MICRO_VERSION\@/$(PKG_MICRO_VERSION)/g" $@ - @$(PERL) -pi.bak -e "s/\@VERSION\@/$(PKG_MAJOR_VERSION).$(PKG_MINOR_VERSION).$(PKG_MICRO_VERSION)/g" $@ - @del $@.bak +cairomm\cairomm.rc: ..\configure.ac cairomm\cairomm.rc.in + @if not "$(DO_REAL_GEN)" == "1" if exist pkg-ver.mak del pkg-ver.mak + @if not exist pkg-ver.mak $(MAKE) /f Makefile.vc CFG=$(CFG) prep-git-build + @if "$(DO_REAL_GEN)" == "1" echo Generating $@... + @if "$(DO_REAL_GEN)" == "1" copy $@.in $@ + @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\@CAIROMM_MAJOR_VERSION\@/$(PKG_MAJOR_VERSION)/g" $@ + @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\@CAIROMM_MINOR_VERSION\@/$(PKG_MINOR_VERSION)/g" $@ + @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\@CAIROMM_MICRO_VERSION\@/$(PKG_MICRO_VERSION)/g" $@ + @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\@VERSION\@/$(PKG_MAJOR_VERSION).$(PKG_MINOR_VERSION).$(PKG_MICRO_VERSION)/g" $@ + @if "$(DO_REAL_GEN)" == "1" del $@.bak # You may change CAIROMM_EXCEPTIONS_ENABLED if you know what you are doing -cairomm\cairommconfig.h: pkg-ver.mak ..\cairommconfig.h.in - @echo Generating $@... - @copy ..\$(@F).in $@ - @$(PERL) -pi.bak -e "s/\#undef CAIROMM_EXCEPTIONS_ENABLED/\#define CAIROMM_EXCEPTIONS_ENABLED 1/g" $@ - @$(PERL) -pi.bak -e "s/\#undef CAIROMM_MAJOR_VERSION/\#define CAIROMM_MAJOR_VERSION $(PKG_MAJOR_VERSION)/g" $@ - @$(PERL) -pi.bak -e "s/\#undef CAIROMM_MINOR_VERSION/\#define CAIROMM_MINOR_VERSION $(PKG_MINOR_VERSION)/g" $@ - @$(PERL) -pi.bak -e "s/\#undef CAIROMM_MICRO_VERSION/\#define CAIROMM_MICRO_VERSION $(PKG_MICRO_VERSION)/g" $@ - @del $@.bak +cairomm\cairommconfig.h: ..\configure.ac ..\cairommconfig.h.in + @if not "$(DO_REAL_GEN)" == "1" if exist pkg-ver.mak del pkg-ver.mak + @if not exist pkg-ver.mak $(MAKE) /f Makefile.vc CFG=$(CFG) prep-git-build + @if "$(DO_REAL_GEN)" == "1" echo Generating $@... + @if "$(DO_REAL_GEN)" == "1" copy ..\$(@F).in $@ + @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\#undef CAIROMM_EXCEPTIONS_ENABLED/\#define CAIROMM_EXCEPTIONS_ENABLED 1/g" $@ + @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\#undef CAIROMM_MAJOR_VERSION/\#define CAIROMM_MAJOR_VERSION $(PKG_MAJOR_VERSION)/g" $@ + @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\#undef CAIROMM_MINOR_VERSION/\#define CAIROMM_MINOR_VERSION $(PKG_MINOR_VERSION)/g" $@ + @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\#undef CAIROMM_MICRO_VERSION/\#define CAIROMM_MICRO_VERSION $(PKG_MICRO_VERSION)/g" $@ + @if "$(DO_REAL_GEN)" == "1" del $@.bak pkg-ver.mak: ..\configure.ac @echo Generating version info Makefile Snippet... |