From f98dcfc2360302753f9a8bf66ee8ccfe4366f0e7 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 7 Jul 2016 15:44:20 +0200 Subject: tracker/rs: use static linkage There's no reason not to link statically the impl library. As suggested by @ph0b, use subdirs for each arch. This helps with object file clobber. --- tracker-rs/rs_impl/bin/.gitignore | 1 - tracker-rs/rs_impl/bin/amd64/.gitignore | 2 ++ tracker-rs/rs_impl/bin/amd64/rs-impl.lib | Bin 0 -> 19184 bytes tracker-rs/rs_impl/bin/ia32/.gitignore | 2 ++ tracker-rs/rs_impl/bin/ia32/rs-impl.lib | Bin 0 -> 12906 bytes tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl.dll | Bin 76288 -> 0 bytes tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl.lib | Bin 2882 -> 0 bytes .../rs_impl/bin/opentrack-tracker-rs-impl_amd64.dll | Bin 91648 -> 0 bytes .../rs_impl/bin/opentrack-tracker-rs-impl_amd64.lib | Bin 2962 -> 0 bytes tracker-rs/rs_impl/build.bat | 2 +- tracker-rs/rs_impl/build_amd64.bat | 4 ---- tracker-rs/rs_impl/build_common.bat | 11 +++++++++++ tracker-rs/rs_impl/build_wrapped.bat | 19 ++++++++++++++++--- tracker-rs/rs_impl/build_x86.bat | 4 ---- 14 files changed, 32 insertions(+), 13 deletions(-) delete mode 100644 tracker-rs/rs_impl/bin/.gitignore create mode 100644 tracker-rs/rs_impl/bin/amd64/.gitignore create mode 100644 tracker-rs/rs_impl/bin/amd64/rs-impl.lib create mode 100644 tracker-rs/rs_impl/bin/ia32/.gitignore create mode 100644 tracker-rs/rs_impl/bin/ia32/rs-impl.lib delete mode 100644 tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl.dll delete mode 100644 tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl.lib delete mode 100644 tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl_amd64.dll delete mode 100644 tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl_amd64.lib delete mode 100644 tracker-rs/rs_impl/build_amd64.bat create mode 100644 tracker-rs/rs_impl/build_common.bat delete mode 100644 tracker-rs/rs_impl/build_x86.bat (limited to 'tracker-rs/rs_impl') diff --git a/tracker-rs/rs_impl/bin/.gitignore b/tracker-rs/rs_impl/bin/.gitignore deleted file mode 100644 index e94bb21f..00000000 --- a/tracker-rs/rs_impl/bin/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/*.exp diff --git a/tracker-rs/rs_impl/bin/amd64/.gitignore b/tracker-rs/rs_impl/bin/amd64/.gitignore new file mode 100644 index 00000000..59314700 --- /dev/null +++ b/tracker-rs/rs_impl/bin/amd64/.gitignore @@ -0,0 +1,2 @@ +/*.exp +/*.obj diff --git a/tracker-rs/rs_impl/bin/amd64/rs-impl.lib b/tracker-rs/rs_impl/bin/amd64/rs-impl.lib new file mode 100644 index 00000000..e421f5a2 Binary files /dev/null and b/tracker-rs/rs_impl/bin/amd64/rs-impl.lib differ diff --git a/tracker-rs/rs_impl/bin/ia32/.gitignore b/tracker-rs/rs_impl/bin/ia32/.gitignore new file mode 100644 index 00000000..59314700 --- /dev/null +++ b/tracker-rs/rs_impl/bin/ia32/.gitignore @@ -0,0 +1,2 @@ +/*.exp +/*.obj diff --git a/tracker-rs/rs_impl/bin/ia32/rs-impl.lib b/tracker-rs/rs_impl/bin/ia32/rs-impl.lib new file mode 100644 index 00000000..ebb64498 Binary files /dev/null and b/tracker-rs/rs_impl/bin/ia32/rs-impl.lib differ diff --git a/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl.dll b/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl.dll deleted file mode 100644 index 3f18f212..00000000 Binary files a/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl.dll and /dev/null differ diff --git a/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl.lib b/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl.lib deleted file mode 100644 index 7e49ed05..00000000 Binary files a/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl.lib and /dev/null differ diff --git a/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl_amd64.dll b/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl_amd64.dll deleted file mode 100644 index 69024800..00000000 Binary files a/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl_amd64.dll and /dev/null differ diff --git a/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl_amd64.lib b/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl_amd64.lib deleted file mode 100644 index a8c5ffba..00000000 Binary files a/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl_amd64.lib and /dev/null differ diff --git a/tracker-rs/rs_impl/build.bat b/tracker-rs/rs_impl/build.bat index 2a87f584..612b1371 100644 --- a/tracker-rs/rs_impl/build.bat +++ b/tracker-rs/rs_impl/build.bat @@ -1,2 +1,2 @@ -@cmd /c %~dp0\build_wrapped.bat +@cmd /c "%~dp0\build_wrapped.bat" @pause \ No newline at end of file diff --git a/tracker-rs/rs_impl/build_amd64.bat b/tracker-rs/rs_impl/build_amd64.bat deleted file mode 100644 index f2b9acbd..00000000 --- a/tracker-rs/rs_impl/build_amd64.bat +++ /dev/null @@ -1,4 +0,0 @@ -@set path=%vs_dir%;%path% -call vcvarsall %vs_64% -@if %errorlevel% neq 0 exit 1 -CL /nologo /Ox /DUNICODE /D_UNICODE /DEXPORT_RS_IMPL /MT /I "%RSSDK_DIR%\opensource\include" %~dp0\ftnoir_tracker_rs_impl.cpp "%RSSDK_DIR%\opensource\src\libpxc\libpxc.cpp" /link ADVAPI32.LIB /DLL /OUT:%~dp0\bin\opentrack-tracker-rs-impl_amd64.dll \ No newline at end of file diff --git a/tracker-rs/rs_impl/build_common.bat b/tracker-rs/rs_impl/build_common.bat new file mode 100644 index 00000000..bd83fcd0 --- /dev/null +++ b/tracker-rs/rs_impl/build_common.bat @@ -0,0 +1,11 @@ +@echo off + +cd /d .\bin\%rs_subdir% +if %errorlevel% neq 0 exit 1 + +echo --- %rs_subdir% + +call %vs_dir%\vcvarsall %vs_var% && CL /c /GS- /nologo /Ox /DUNICODE /D_UNICODE /MT /I "%RSSDK_DIR%\opensource\include" ..\..\ftnoir_tracker_rs_impl.cpp "%RSSDK_DIR%\opensource\src\libpxc\libpxc.cpp" && lib %rs_objs% /OUT:rs-impl.lib + +if %errorlevel% neq 0 exit 1 +exit 0 diff --git a/tracker-rs/rs_impl/build_wrapped.bat b/tracker-rs/rs_impl/build_wrapped.bat index 2f547e95..7a67c7b8 100644 --- a/tracker-rs/rs_impl/build_wrapped.bat +++ b/tracker-rs/rs_impl/build_wrapped.bat @@ -1,4 +1,6 @@ -@IF DEFINED VS150COMNTOOLS ( +@echo off + +IF DEFINED VS150COMNTOOLS ( set vs_dir="%VS150COMNTOOLS%\..\..\VC" set vs_64=x86_amd64 ) ELSE ( @@ -6,5 +8,16 @@ set vs_64=amd64 ) -cmd /c %~dp0\build_x86.bat -cmd /c %~dp0\build_amd64.bat \ No newline at end of file + +cd /d "%~dp0" +if %errorlevel% neq 0 exit 1 + +set rs_objs=ftnoir_tracker_rs_impl.obj libpxc.obj + +set rs_subdir=ia32 +set vs_var=x86 +cmd /c "call .\build_common.bat" + +set rs_subdir=amd64 +set vs_var=%vs_64% +cmd /c "call .\build_common.bat" diff --git a/tracker-rs/rs_impl/build_x86.bat b/tracker-rs/rs_impl/build_x86.bat deleted file mode 100644 index b35b44b3..00000000 --- a/tracker-rs/rs_impl/build_x86.bat +++ /dev/null @@ -1,4 +0,0 @@ -@set path=%vs_dir%;%path% -call vcvarsall x86 -@if %errorlevel% neq 0 exit 1 -CL /nologo /Ox /DUNICODE /D_UNICODE /DEXPORT_RS_IMPL /MT /I "%RSSDK_DIR%\opensource\include" %~dp0\ftnoir_tracker_rs_impl.cpp "%RSSDK_DIR%\opensource\src\libpxc\libpxc.cpp" /link ADVAPI32.LIB /DLL /OUT:%~dp0\bin\opentrack-tracker-rs-impl.dll \ No newline at end of file -- cgit v1.2.3