[atkmm/atkmm-2-28] NMake Makefiles: Split outdir and intdir by toolset version



commit a36e9a8430cbb3598d9d8ab306447c90ce9fed7e
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Feb 7 18:28:30 2020 +0800

    NMake Makefiles: Split outdir and intdir by toolset version
    
    This will reduce the likelihood that one confuses builds done by
    different Visual Studio toolset versions, making things a bit neater.

 MSVC_NMake/build-rules-msvc.mak  | 43 ++++++++++++++++++++--------------------
 MSVC_NMake/config-msvc.mak       |  6 +++---
 MSVC_NMake/create-lists-msvc.mak |  6 +++---
 MSVC_NMake/generate-msvc.mak     |  8 ++++----
 MSVC_NMake/install.mak           |  6 +++---
 5 files changed, 35 insertions(+), 34 deletions(-)
---
diff --git a/MSVC_NMake/build-rules-msvc.mak b/MSVC_NMake/build-rules-msvc.mak
index b615f11..85c43f1 100644
--- a/MSVC_NMake/build-rules-msvc.mak
+++ b/MSVC_NMake/build-rules-msvc.mak
@@ -13,12 +13,12 @@
 #      $(CC)|$(CXX) $(cflags) /Fo$(destdir) /c @<<
 # $<
 # <<
-{..\atk\atkmm\}.cc{$(CFG)\$(PLAT)\atkmm\}.obj::
-       $(CXX) $(ATKMM_CFLAGS) $(CFLAGS_NOGL) /Fo$(CFG)\$(PLAT)\atkmm\ /c @<<
+{..\atk\atkmm\}.cc{vs$(PDBVER)\$(CFG)\$(PLAT)\atkmm\}.obj::
+       $(CXX) $(ATKMM_CFLAGS) $(CFLAGS_NOGL) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\atkmm\ 
/Fdvs$(PDBVER)\$(CFG)\$(PLAT)\atkmm\ /c @<<
 $<
 <<
 
-{.\atkmm\}.rc{$(CFG)\$(PLAT)\atkmm\}.res:
+{.\atkmm\}.rc{vs$(PDBVER)\$(CFG)\$(PLAT)\atkmm\}.res:
        rc /fo$@ $<
 
 # Rules for building .lib files
@@ -31,8 +31,8 @@ $(ATKMM_LIB): $(ATKMM_DLL)
 # $(dependent_objects)
 # <<
 #      @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
-$(ATKMM_DLL): $(CFG)\$(PLAT)\atkmm\atkmm.def $(atkmm_OBJS)
-       link /DLL $(LDFLAGS_NOLTCG) $(ATK_LIBS) $(GLIBMM_LIB) $(LIBSIGC_LIB) /implib:$(ATKMM_LIB) 
/def:$(CFG)\$(PLAT)\atkmm\atkmm.def -out:$@ @<<
+$(ATKMM_DLL): vs$(PDBVER)\$(CFG)\$(PLAT)\atkmm\atkmm.def $(atkmm_OBJS)
+       link /DLL $(LDFLAGS_NOLTCG) $(ATK_LIBS) $(GLIBMM_LIB) $(LIBSIGC_LIB) /implib:$(ATKMM_LIB) 
/def:vs$(PDBVER)\$(CFG)\$(PLAT)\atkmm\atkmm.def -out:$@ @<<
 $(atkmm_OBJS)
 <<
        @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
@@ -46,21 +46,22 @@ $(atkmm_OBJS)
 #      @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
 
 # For the gendef tool
-{.\gendef\}.cc{$(CFG)\$(PLAT)\}.exe:
-       @if not exist $(CFG)\$(PLAT)\gendef\ $(MAKE) -f Makefile.vc CFG=$(CFG) $(CFG)\$(PLAT)\gendef
-       $(CXX) $(ATKMM_BASE_CFLAGS) $(CFLAGS) /Fo$(CFG)\$(PLAT)\gendef\ $< /link $(LDFLAGS) /out:$@
+{.\gendef\}.cc{vs$(PDBVER)\$(CFG)\$(PLAT)\}.exe:
+       @if not exist vs$(PDBVER)\$(CFG)\$(PLAT)\gendef\ $(MAKE) -f Makefile.vc CFG=$(CFG) 
vs$(PDBVER)\$(CFG)\$(PLAT)\gendef
+       $(CXX) $(ATKMM_BASE_CFLAGS) $(CFLAGS) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\gendef\ 
/Fdvs$(PDBVER)\$(CFG)\$(PLAT)\gendef\ $< /link $(LDFLAGS) /out:$@
 
 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
-       @-del /f /q $(CFG)\$(PLAT)\atkmm\*.def
-       @-del /f /q $(CFG)\$(PLAT)\atkmm\*.res
-       @-del /f /q $(CFG)\$(PLAT)\atkmm\*.obj
-       @-del /f /q $(CFG)\$(PLAT)\gendef\*.obj
-       @-rd $(CFG)\$(PLAT)\atkmm
-       @-rd $(CFG)\$(PLAT)\gendef
-       @-del /f /q vc$(PDBVER)0.pdb
+       @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.exe
+       @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.dll
+       @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.pdb
+       @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.ilk
+       @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.exp
+       @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.lib
+       @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\atkmm\*.def
+       @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\atkmm\*.pdb
+       @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\atkmm\*.res
+       @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\atkmm\*.obj
+       @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\gendef\*.pdb
+       @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\gendef\*.obj
+       @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\atkmm
+       @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\gendef
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
index f4ee3d4..a8b05fc 100644
--- a/MSVC_NMake/config-msvc.mak
+++ b/MSVC_NMake/config-msvc.mak
@@ -51,10 +51,10 @@ LIBSIGC_LIB = $(LIBSIGC_LIBNAME).lib
 
 ATKMM_LIBNAME = atkmm-vc$(PDBVER)0$(DEBUG_SUFFIX)-$(ATKMM_MAJOR_VERSION)_$(ATKMM_MINOR_VERSION)
 
-ATKMM_DLL = $(CFG)\$(PLAT)\$(ATKMM_LIBNAME).dll
-ATKMM_LIB = $(CFG)\$(PLAT)\$(ATKMM_LIBNAME).lib
+ATKMM_DLL = vs$(PDBVER)\$(CFG)\$(PLAT)\$(ATKMM_LIBNAME).dll
+ATKMM_LIB = vs$(PDBVER)\$(CFG)\$(PLAT)\$(ATKMM_LIBNAME).lib
 
-GENDEF = $(CFG)\$(PLAT)\gendef.exe
+GENDEF = vs$(PDBVER)\$(CFG)\$(PLAT)\gendef.exe
 GOBJECT_LIBS = gobject-$(GLIB_API_VERSION).lib glib-$(GLIB_API_VERSION).lib
 
 ATK_LIBS = atk-$(ATK_API_VERSION).lib $(GOBJECT_LIBS)
diff --git a/MSVC_NMake/create-lists-msvc.mak b/MSVC_NMake/create-lists-msvc.mak
index a0cc56a..f609914 100644
--- a/MSVC_NMake/create-lists-msvc.mak
+++ b/MSVC_NMake/create-lists-msvc.mak
@@ -42,13 +42,13 @@ atkmm_files_extra_ph_int = $(atkmm_files_extra_ph:/=\)
 !if [call create-lists.bat header atkmm.mak atkmm_OBJS]
 !endif
 
-!if [for %c in ($(atkmm_files_built_cc)) do @if "%~xc" == ".cc" @call create-lists.bat file atkmm.mak 
^$(CFG)\^$(PLAT)\atkmm\%~nc.obj]
+!if [for %c in ($(atkmm_files_built_cc)) do @if "%~xc" == ".cc" @call create-lists.bat file atkmm.mak 
vs^$(PDBVER)\^$(CFG)\^$(PLAT)\atkmm\%~nc.obj]
 !endif
 
-!if [for %c in ($(atkmm_files_extra_cc)) do @if "%~xc" == ".cc" @call create-lists.bat file atkmm.mak 
^$(CFG)\^$(PLAT)\atkmm\%~nc.obj]
+!if [for %c in ($(atkmm_files_extra_cc)) do @if "%~xc" == ".cc" @call create-lists.bat file atkmm.mak 
vs^$(PDBVER)\^$(CFG)\^$(PLAT)\atkmm\%~nc.obj]
 !endif
 
-!if [@call create-lists.bat file atkmm.mak ^$(CFG)\^$(PLAT)\atkmm\atkmm.res]
+!if [@call create-lists.bat file atkmm.mak vs^$(PDBVER)\^$(CFG)\^$(PLAT)\atkmm\atkmm.res]
 !endif
 
 !if [call create-lists.bat footer atkmm.mak]
diff --git a/MSVC_NMake/generate-msvc.mak b/MSVC_NMake/generate-msvc.mak
index a322e5f..192ea2c 100644
--- a/MSVC_NMake/generate-msvc.mak
+++ b/MSVC_NMake/generate-msvc.mak
@@ -4,10 +4,10 @@
 # one is maintaining the NMake build files.
 
 # Create the build directories
-$(CFG)\$(PLAT)\gendef  \
-$(CFG)\$(PLAT)\atkmm:
+vs$(PDBVER)\$(CFG)\$(PLAT)\gendef      \
+vs$(PDBVER)\$(CFG)\$(PLAT)\atkmm:
        @-mkdir $@
 
 # Generate .def files
-$(CFG)\$(PLAT)\atkmm\atkmm.def: $(GENDEF) $(CFG)\$(PLAT)\atkmm $(atkmm_OBJS)
-       $(CFG)\$(PLAT)\gendef.exe $@ $(ATKMM_LIBNAME) $(CFG)\$(PLAT)\atkmm\*.obj
+vs$(PDBVER)\$(CFG)\$(PLAT)\atkmm\atkmm.def: $(GENDEF) vs$(PDBVER)\$(CFG)\$(PLAT)\atkmm $(atkmm_OBJS)
+       vs$(PDBVER)\$(CFG)\$(PLAT)\gendef.exe $@ $(ATKMM_LIBNAME) vs$(PDBVER)\$(CFG)\$(PLAT)\atkmm\*.obj
diff --git a/MSVC_NMake/install.mak b/MSVC_NMake/install.mak
index 13510cc..c61d8b5 100644
--- a/MSVC_NMake/install.mak
+++ b/MSVC_NMake/install.mak
@@ -5,9 +5,9 @@ install: all
        @if not exist $(PREFIX)\bin\ mkdir $(PREFIX)\bin
        @if not exist $(PREFIX)\lib\atkmm-$(ATKMM_MAJOR_VERSION).$(ATKMM_MINOR_VERSION)\include\ mkdir 
$(PREFIX)\lib\atkmm-$(ATKMM_MAJOR_VERSION).$(ATKMM_MINOR_VERSION)\include
        @if not exist $(PREFIX)\include\atkmm-$(ATKMM_MAJOR_VERSION).$(ATKMM_MINOR_VERSION)\atkmm\private\ 
@mkdir $(PREFIX)\include\atkmm-$(ATKMM_MAJOR_VERSION).$(ATKMM_MINOR_VERSION)\atkmm\private
-       @copy /b $(CFG)\$(PLAT)\$(ATKMM_LIBNAME).dll $(PREFIX)\bin
-       @copy /b $(CFG)\$(PLAT)\$(ATKMM_LIBNAME).pdb $(PREFIX)\bin
-       @copy /b $(CFG)\$(PLAT)\$(ATKMM_LIBNAME).lib $(PREFIX)\lib
+       @copy /b vs$(PDBVER)\$(CFG)\$(PLAT)\$(ATKMM_LIBNAME).dll $(PREFIX)\bin
+       @copy /b vs$(PDBVER)\$(CFG)\$(PLAT)\$(ATKMM_LIBNAME).pdb $(PREFIX)\bin
+       @copy /b vs$(PDBVER)\$(CFG)\$(PLAT)\$(ATKMM_LIBNAME).lib $(PREFIX)\lib
        @copy ..\atk\atkmm.h "$(PREFIX)\include\atkmm-$(ATKMM_MAJOR_VERSION).$(ATKMM_MINOR_VERSION)\"
        @for %h in ($(atkmm_files_extra_h)) do @copy ..\atk\atkmm\%h 
"$(PREFIX)\include\atkmm-$(ATKMM_MAJOR_VERSION).$(ATKMM_MINOR_VERSION)\atkmm\%h"
        @for %h in ($(atkmm_files_built_h)) do @copy ..\atk\atkmm\%h 
"$(PREFIX)\include\atkmm-$(ATKMM_MAJOR_VERSION).$(ATKMM_MINOR_VERSION)\atkmm\%h"


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