[glibmm/glibmm-2-62] NMake Makefiles: build glibmm_generate_extra_defs-2.4.lib



commit 4cf074254e090d4c06ae4e7d40fe65180e42a053
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Feb 24 18:49:34 2020 +0800

    NMake Makefiles: build glibmm_generate_extra_defs-2.4.lib
    
    Since this is entirely buildable by Visual Studio, build it as well and see
    whether we can use this to allow builds from GIT checkouts for other -mm
    libraries with MSVC builds.
    
    Copy this .lib and its header upon 'install'.

 MSVC_NMake/Makefile.vc          |  2 +-
 MSVC_NMake/build-rules-msvc.mak | 14 ++++++++++++++
 MSVC_NMake/config-msvc.mak      |  1 +
 MSVC_NMake/generate-msvc.mak    |  3 ++-
 MSVC_NMake/install.mak          |  3 +++
 5 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/MSVC_NMake/Makefile.vc b/MSVC_NMake/Makefile.vc
index 337157b7..6f98bf8d 100644
--- a/MSVC_NMake/Makefile.vc
+++ b/MSVC_NMake/Makefile.vc
@@ -33,7 +33,7 @@ VALID_MSC = TRUE
 # into the lists we need for compilation and introspection
 !include create-lists-msvc.mak
 
-all: $(GIOMM_LIB) $(glibmm_ex) $(giomm_ex) all-build-info
+all: $(GIOMM_LIB) $(GLIBMM_EXTRA_DEFS_GEN_LIB) $(glibmm_ex) $(giomm_ex) all-build-info
 
 tests: $(glibmm_tests) $(giomm_tests) all-build-info
 
diff --git a/MSVC_NMake/build-rules-msvc.mak b/MSVC_NMake/build-rules-msvc.mak
index d15b3a49..e42024b8 100644
--- a/MSVC_NMake/build-rules-msvc.mak
+++ b/MSVC_NMake/build-rules-msvc.mak
@@ -23,16 +23,27 @@ $<
 $<
 <<
 
+{..\tools\extra_defs_gen\}.cc{vs$(VSVER)\$(CFG)\$(PLAT)\glib-extra-defs-gen\}.obj::
+       @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\glib-extra-defs-gen\ $(MAKE) /f Makefile.vc CFG=$(CFG) 
vs$(VSVER)\$(CFG)\$(PLAT)\glib-extra-defs-gen
+       $(CXX) $(GLIBMM_BASE_CFLAGS) $(GLIBMM_EXTRA_INCLUDES) $(CFLAGS_NOGL) 
/Fovs$(VSVER)\$(CFG)\$(PLAT)\glib-extra-defs-gen\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\glib-extra-defs-gen\ /c @<<
+$<
+<<
+
 {.\glibmm\}.rc{vs$(VSVER)\$(CFG)\$(PLAT)\glibmm\}.res:
        rc /fo$@ $<
 
 {.\giomm\}.rc{vs$(VSVER)\$(CFG)\$(PLAT)\giomm\}.res:
        rc /fo$@ $<
 
+vs$(VSVER)\$(CFG)\$(PLAT)\glib-extra-defs-gen\generate_extra_defs.obj:  
..\tools\extra_defs_gen\generate_extra_defs.cc  ..\tools\extra_defs_gen\generate_extra_defs.h
 # Rules for building .lib files
 $(GLIBMM_LIB): $(GLIBMM_DLL)
 $(GIOMM_LIB): $(GIOMM_DLL)
 
+$(GLIBMM_EXTRA_DEFS_GEN_LIB): vs$(VSVER)\$(CFG)\$(PLAT)\glib-extra-defs-gen\generate_extra_defs.obj
+       lib $(ARFLAGS_NOLTCG) /out:$@ $**
+
+
 # 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)
@@ -196,6 +207,8 @@ clean:
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\*.exp
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\*.lib
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gschemas.compiled
+       @-del vs$(VSVER)\$(CFG)\$(PLAT)\glib-extra-defs-gen\*.pdb
+       @-del vs$(VSVER)\$(CFG)\$(PLAT)\glib-extra-defs-gen\*.obj
        @-if exist vs$(VSVER)\$(CFG)\$(PLAT)\giomm-tests del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\giomm-tests\*.obj
        @-if exist vs$(VSVER)\$(CFG)\$(PLAT)\giomm-tests del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\giomm-tests\*.pdb
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\giomm-ex\*.obj
@@ -215,6 +228,7 @@ clean:
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gendef\*.obj
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gendef\*.pdb
        @-if exist vs$(VSVER)\$(CFG)\$(PLAT)\giomm-tests rd vs$(VSVER)\$(CFG)\$(PLAT)\giomm-tests
+       @-rd vs$(VSVER)\$(CFG)\$(PLAT)\glib-extra-defs-gen
        @-rd vs$(VSVER)\$(CFG)\$(PLAT)\giomm-ex
        @-rd vs$(VSVER)\$(CFG)\$(PLAT)\giomm
        @-if exist vs$(VSVER)\$(CFG)\$(PLAT)\glibmm-tests rd vs$(VSVER)\$(CFG)\$(PLAT)\glibmm-tests
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
index 89fd59bd..3210daf1 100644
--- a/MSVC_NMake/config-msvc.mak
+++ b/MSVC_NMake/config-msvc.mak
@@ -56,6 +56,7 @@ GLIBMM_LIBNAME = glibmm-vc$(PDBVER)0$(DEBUG_SUFFIX)-$(GLIBMM_MAJOR_VERSION)_$(GL
 
 GLIBMM_DLL = vs$(VSVER)\$(CFG)\$(PLAT)\$(GLIBMM_LIBNAME).dll
 GLIBMM_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\$(GLIBMM_LIBNAME).lib
+GLIBMM_EXTRA_DEFS_GEN_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\glibmm_generate_extra_defs-2.4.lib
 
 GIOMM_LIBNAME = giomm-vc$(PDBVER)0$(DEBUG_SUFFIX)-$(GLIBMM_MAJOR_VERSION)_$(GLIBMM_MINOR_VERSION)
 
diff --git a/MSVC_NMake/generate-msvc.mak b/MSVC_NMake/generate-msvc.mak
index cf3d6262..221ba87f 100644
--- a/MSVC_NMake/generate-msvc.mak
+++ b/MSVC_NMake/generate-msvc.mak
@@ -10,7 +10,8 @@ vs$(VSVER)\$(CFG)\$(PLAT)\giomm       \
 vs$(VSVER)\$(CFG)\$(PLAT)\glibmm-ex    \
 vs$(VSVER)\$(CFG)\$(PLAT)\giomm-ex     \
 vs$(VSVER)\$(CFG)\$(PLAT)\glibmm-tests \
-vs$(VSVER)\$(CFG)\$(PLAT)\giomm-tests:
+vs$(VSVER)\$(CFG)\$(PLAT)\giomm-tests  \
+vs$(VSVER)\$(CFG)\$(PLAT)\glib-extra-defs-gen:
        @-mkdir $@
 
 # Generate .def files
diff --git a/MSVC_NMake/install.mak b/MSVC_NMake/install.mak
index 40ab0617..9158a61e 100644
--- a/MSVC_NMake/install.mak
+++ b/MSVC_NMake/install.mak
@@ -5,6 +5,7 @@ install: all
        @if not exist $(PREFIX)\bin\ mkdir $(PREFIX)\bin
        @if not exist $(PREFIX)\lib\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include\ mkdir 
$(PREFIX)\lib\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include
        @if not exist 
$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\private\ @mkdir 
$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\private
+       @if not exist 
$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm_generate_extra_defs\ @mkdir 
$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm_generate_extra_defs
        @if not exist $(PREFIX)\lib\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include\ mkdir 
$(PREFIX)\lib\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include
        @if not exist $(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\giomm\private\ 
@mkdir $(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\giomm\private
        @copy /b vs$(VSVER)\$(CFG)\$(PLAT)\$(GLIBMM_LIBNAME).dll $(PREFIX)\bin
@@ -13,6 +14,7 @@ install: all
        @copy /b vs$(VSVER)\$(CFG)\$(PLAT)\$(GIOMM_LIBNAME).dll $(PREFIX)\bin
        @copy /b vs$(VSVER)\$(CFG)\$(PLAT)\$(GIOMM_LIBNAME).pdb $(PREFIX)\bin
        @copy /b vs$(VSVER)\$(CFG)\$(PLAT)\$(GIOMM_LIBNAME).lib $(PREFIX)\lib
+       @copy /b $(GLIBMM_EXTRA_DEFS_GEN_LIB) $(PREFIX)\lib
        @copy ..\glib\glibmm.h "$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\"
        @copy ..\gio\giomm.h "$(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\"
        @for %h in ($(glibmm_files_all_h)) do @copy ..\glib\glibmm\%h 
"$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\%h"
@@ -22,3 +24,4 @@ install: all
        @for %h in ($(giomm_generated_private_headers)) do @copy ..\gio\giomm\private\%h 
"$(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\giomm\private\%h"
        @copy ".\glibmm\glibmmconfig.h" 
"$(PREFIX)\lib\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include\"
        @copy ".\giomm\giommconfig.h" 
"$(PREFIX)\lib\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include\"
+       @copy "..\tools\extra_defs_gen\generate_extra_defs.h" 
"$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm_generate_extra_defs\"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]