[gtkmm/use-dllexport: 11/12] NMake Makefiles: Stop using gendef.exe



commit 0f31e0dea2ff296dd63fe77b1e0603fd0c591d63
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Jun 5 16:58:33 2020 +0800

    NMake Makefiles: Stop using gendef.exe
    
    Since the code is ready to use __declspec(dllexport) to export the symbols from
    gdkmm and gtkmm, stop building and using gendef.exe.  Also make sure that we
    generate and build the gdkmm sources and headers before we attempt to generate
    or build the gtkmm sources and headers.
    
    gendef.exe will be dropped in the next commit

 MSVC_NMake/build-rules-msvc.mak | 16 +++-------------
 MSVC_NMake/config-msvc.mak      |  2 --
 MSVC_NMake/generate-msvc.mak    |  4 ----
 3 files changed, 3 insertions(+), 19 deletions(-)
---
diff --git a/MSVC_NMake/build-rules-msvc.mak b/MSVC_NMake/build-rules-msvc.mak
index 3017f336..cde02e6d 100644
--- a/MSVC_NMake/build-rules-msvc.mak
+++ b/MSVC_NMake/build-rules-msvc.mak
@@ -87,9 +87,9 @@ $(GTKMM_LIB): $(GTKMM_DLL)
 # <<
 #      @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
 
-$(GTKMM_DLL): vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\gtkmm.def $(gtkmm_OBJS) $(gdkmm_OBJS)
-       link /DLL $(LDFLAGS_NOLTCG) $(GTKMM_DEP_LIBS) /implib:$(GTKMM_LIB) 
/def:vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\gtkmm.def -out:$@ @<<
-$(gtkmm_OBJS) $(gdkmm_OBJS)
+$(GTKMM_DLL): $(gdkmm_OBJS) $(gtkmm_OBJS)
+       link /DLL $(LDFLAGS_NOLTCG) $(GTKMM_DEP_LIBS) /implib:$(GTKMM_LIB) -out:$@ @<<
+$(gdkmm_OBJS) $(gtkmm_OBJS)
 <<
        @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
 
@@ -101,12 +101,6 @@ $(gtkmm_OBJS) $(gdkmm_OBJS)
 # <<
 #      @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
 
-# For the gendef tool
-{.\gendef\}.cc{vs$(VSVER)\$(CFG)\$(PLAT)\}.exe:
-       @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\gendef\ md vs$(VSVER)\$(CFG)\$(PLAT)\gendef
-       $(CXX) $(GTKMM_BASE_CFLAGS) $(CFLAGS) /Fo$(@D)\gendef\ /Fd$(@D)\gendef\ $< /link $(LDFLAGS) /out:$@
-       @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
-
 $(GTKMM4_DEMO): $(GTKMM_LIB) vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo $(gtkmm_demo_OBJS)
        link $(LDFLAGS) $(GTKMM_LIB) $(GTKMM_DEMO_DEP_LIBS) -out:$@ @<<
 $(gtkmm_demo_OBJS)
@@ -162,7 +156,6 @@ clean:
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\*.pdb
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\*.obj
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\private\*.h
-       @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\*.def
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\*.res
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\*.pdb
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\*.obj
@@ -173,14 +166,11 @@ clean:
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm\*.obj
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm\*.cc
        @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm\*.h
-       @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gendef\*.pdb
-       @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gendef\*.obj
        @-for /f %d in ('dir /ad /b ..\tests') do @if exist vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-%d rd 
vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-%d
        @-rd vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo
        @-rd vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\private
        @-rd vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm
        @-rd vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm\private
        @-rd vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm
-       @-rd vs$(VSVER)\$(CFG)\$(PLAT)\gendef
 
 .SUFFIXES: .cc .h .ccg .hg .obj
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
index bef43e47..8341f2c1 100644
--- a/MSVC_NMake/config-msvc.mak
+++ b/MSVC_NMake/config-msvc.mak
@@ -236,8 +236,6 @@ GTKMM_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\$(GTKMM_LIBNAME).lib
 
 GTKMM4_DEMO = vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo$(DEBUG_SUFFIX).exe
 
-GENDEF = vs$(VSVER)\$(CFG)\$(PLAT)\gendef.exe
-
 GTKMM_INT_EXTRA_SOURCES = $(gtkmm_files_extra_any_cc)
 GTKMM_INT_EXTRA_HEADERS = $(gtkmm_files_extra_any_h)
 GTKMM_INT_EXTRA_HEADERS_P = $(gtkmm_files_extra_ph:/=\)
diff --git a/MSVC_NMake/generate-msvc.mak b/MSVC_NMake/generate-msvc.mak
index a6f76fc3..9e7394e1 100644
--- a/MSVC_NMake/generate-msvc.mak
+++ b/MSVC_NMake/generate-msvc.mak
@@ -26,10 +26,6 @@ vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\wrap_init.cc: $(gtkmm_real_hg)
        @if not exist ..\gtk\gtkmm\wrap_init.cc call gen_$(@B).bat>$@
        @del gen_$(@B).bat
 
-# Generate .def files
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\gtkmm.def: $(GENDEF) $(gdkmm_OBJS) $(gtkmm_OBJS)
-       vs$(VSVER)\$(CFG)\$(PLAT)\gendef.exe $@ $(GTKMM_LIBNAME) vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm\*.obj 
vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\*.obj
-
 # Generate demo GResource source file
 vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\demo_resources.c:        \
 $(gtkmm_demo_example_sources)  \


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