[atkmm] NMake Makefiles: Split outdir and intdir by toolset version
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atkmm] NMake Makefiles: Split outdir and intdir by toolset version
- Date: Fri, 7 Feb 2020 11:12:03 +0000 (UTC)
commit 7df0413a158f5d157c9c3422cd19a3b26d70655b
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Feb 7 18:58:33 2020 +0800
NMake Makefiles: Split outdir and intdir by toolset version
This makes things a bit cleaner so that we reduce the likelyhood of
building and linking against objects and libraries with different CRT
versions, which is a source of trouble.
MSVC_NMake/build-rules-msvc.mak | 43 ++++++++++++++++++++--------------------
MSVC_NMake/config-msvc.mak | 8 ++++----
MSVC_NMake/create-lists-msvc.mak | 6 +++---
MSVC_NMake/generate-msvc.mak | 8 ++++----
MSVC_NMake/install.mak | 6 +++---
5 files changed, 36 insertions(+), 35 deletions(-)
---
diff --git a/MSVC_NMake/build-rules-msvc.mak b/MSVC_NMake/build-rules-msvc.mak
index 8188a39..44959b3 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) $(LIBATKMM_CFLAGS) $(CFLAGS_NOGL) /Fo$(CFG)\$(PLAT)\atkmm\ /c @<<
+{..\atk\atkmm\}.cc{vs$(VSVER)\$(CFG)\$(PLAT)\atkmm\}.obj::
+ $(CXX) $(LIBATKMM_CFLAGS) $(CFLAGS_NOGL) /Fovs$(VSVER)\$(CFG)\$(PLAT)\atkmm\
/Fdvs$(VSVER)\$(CFG)\$(PLAT)\atkmm\ /c @<<
$<
<<
-{.\atkmm\}.rc{$(CFG)\$(PLAT)\atkmm\}.res:
+{.\atkmm\}.rc{vs$(VSVER)\$(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) $(ATKMM_DEP_LIBS) /implib:$(ATKMM_LIB)
/def:$(CFG)\$(PLAT)\atkmm\atkmm.def -out:$@ @<<
+$(ATKMM_DLL): vs$(VSVER)\$(CFG)\$(PLAT)\atkmm\atkmm.def $(atkmm_OBJS)
+ link /DLL $(LDFLAGS_NOLTCG) $(ATKMM_DEP_LIBS) /implib:$(ATKMM_LIB)
/def:vs$(VSVER)\$(CFG)\$(PLAT)\atkmm\atkmm.def -out:$@ @<<
$(atkmm_OBJS)
<<
@@ -47,21 +47,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$(VSVER)\$(CFG)\$(PLAT)\}.exe:
+ @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\gendef\ $(MAKE) -f Makefile.vc CFG=$(CFG)
vs$(VSVER)\$(CFG)\$(PLAT)\gendef
+ $(CXX) $(ATKMM_BASE_CFLAGS) $(CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gendef\
/Fdvs$(VSVER)\$(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$(VSVER)\$(CFG)\$(PLAT)\*.exe
+ @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\*.dll
+ @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\*.pdb
+ @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\*.ilk
+ @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\*.exp
+ @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\*.lib
+ @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\atkmm\*.def
+ @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\atkmm\*.res
+ @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\atkmm\*.pdb
+ @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\atkmm\*.obj
+ @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gendef\*.pdb
+ @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gendef\*.obj
+ @-rd vs$(VSVER)\$(CFG)\$(PLAT)\atkmm
+ @-rd vs$(VSVER)\$(CFG)\$(PLAT)\gendef
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
index 5a23f8b..38e2638 100644
--- a/MSVC_NMake/config-msvc.mak
+++ b/MSVC_NMake/config-msvc.mak
@@ -13,7 +13,7 @@ GLIB_API_VERSION = 2.0
LIBSIGC_MAJOR_VERSION = 3
LIBSIGC_MINOR_VERSION = 0
GLIBMM_MAJOR_VERSION = 2
-GLIBMM_MINOR_VERSION = 64
+GLIBMM_MINOR_VERSION = 62
!if "$(CFG)" == "debug" || "$(CFG)" == "Debug"
@@ -53,10 +53,10 @@ GLIBMM_LIB = $(GLIBMM_LIBNAME).lib
ATKMM_LIBNAME = atkmm-vc$(VSVER)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$(VSVER)\$(CFG)\$(PLAT)\$(ATKMM_LIBNAME).dll
+ATKMM_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\$(ATKMM_LIBNAME).lib
-GENDEF = $(CFG)\$(PLAT)\gendef.exe
+GENDEF = vs$(VSVER)\$(CFG)\$(PLAT)\gendef.exe
GOBJECT_LIBS = gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib
ATK_LIBS = atk-1.0.lib $(GOBJECT_LIBS)
diff --git a/MSVC_NMake/create-lists-msvc.mak b/MSVC_NMake/create-lists-msvc.mak
index 9279c1a..8f4634b 100644
--- a/MSVC_NMake/create-lists-msvc.mak
+++ b/MSVC_NMake/create-lists-msvc.mak
@@ -40,13 +40,13 @@ atkmm_generated_private_headers = $(atkmm_files_hg:.hg=_p.h)
!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^$(VSVER)\^$(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^$(VSVER)\^$(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^$(VSVER)\^$(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..0b87b00 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$(VSVER)\$(CFG)\$(PLAT)\gendef \
+vs$(VSVER)\$(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$(VSVER)\$(CFG)\$(PLAT)\atkmm\atkmm.def: $(GENDEF) vs$(VSVER)\$(CFG)\$(PLAT)\atkmm $(atkmm_OBJS)
+ vs$(VSVER)\$(CFG)\$(PLAT)\gendef.exe $@ $(ATKMM_LIBNAME) vs$(VSVER)\$(CFG)\$(PLAT)\atkmm\*.obj
diff --git a/MSVC_NMake/install.mak b/MSVC_NMake/install.mak
index 37530d4..2073ddc 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$(VSVER)\$(CFG)\$(PLAT)\$(ATKMM_LIBNAME).dll $(PREFIX)\bin
+ @copy /b vs$(VSVER)\$(CFG)\$(PLAT)\$(ATKMM_LIBNAME).pdb $(PREFIX)\bin
+ @copy /b vs$(VSVER)\$(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_built_h) $(atkmm_files_extra_h)) do @copy ..\atk\atkmm\%h
"$(PREFIX)\include\atkmm-$(ATKMM_MAJOR_VERSION).$(ATKMM_MINOR_VERSION)\atkmm\%h"
@for %h in ($(atkmm_generated_private_headers)) do @copy ..\atk\atkmm\private\%h
"$(PREFIX)\include\atkmm-$(ATKMM_MAJOR_VERSION).$(ATKMM_MINOR_VERSION)\atkmm\private\%h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]