From 32a9594134b5b83e02311905dadc1b6a522e93a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 30 Apr 2016 11:08:56 -0700 Subject: [PATCH] Cleanup. --- makefile | 12 +++++++++--- scripts/geometryc.lua | 5 +++++ scripts/shaderc.lua | 3 +++ scripts/texturec.lua | 7 ++++--- scripts/texturev.lua | 2 +- tools/texturev/texturev.cpp | 2 +- 6 files changed, 23 insertions(+), 8 deletions(-) diff --git a/makefile b/makefile index e69671486..965de58a2 100644 --- a/makefile +++ b/makefile @@ -343,11 +343,13 @@ tools: geometryc shaderc texturec texturev ## Build tools. dist-windows: .build/projects/gmake-mingw-gcc $(SILENT) $(MAKE) -C .build/projects/gmake-mingw-gcc config=release64 -j 6 geometryc - $(SILENT) cp .build/win64_mingw-gcc/bin/geometrycRelease tools/bin/windows/geometryc.exe + $(SILENT) cp .build/win64_mingw-gcc/bin/geometrycRelease.exe tools/bin/windows/geometryc.exe $(SILENT) $(MAKE) -C .build/projects/gmake-mingw-gcc config=release64 -j 6 shaderc - $(SILENT) cp .build/win64_mingw-gcc/bin/shadercRelease tools/bin/windows/shaderc.exe + $(SILENT) cp .build/win64_mingw-gcc/bin/shadercRelease.exe tools/bin/windows/shaderc.exe $(SILENT) $(MAKE) -C .build/projects/gmake-mingw-gcc config=release64 -j 6 texturec - $(SILENT) cp .build/win64_mingw-gcc/bin/texturecRelease tools/bin/windows/texturec.exe + $(SILENT) cp .build/win64_mingw-gcc/bin/texturecRelease.exe tools/bin/windows/texturec.exe + $(SILENT) $(MAKE) -C .build/projects/gmake-mingw-gcc config=release64 -j 6 texturev + $(SILENT) cp .build/win64_mingw-gcc/bin/texturevRelease.exe tools/bin/windows/texturev.exe dist-linux: .build/projects/gmake-linux $(SILENT) $(MAKE) -C .build/projects/gmake-linux config=release64 -j 6 geometryc @@ -356,6 +358,8 @@ dist-linux: .build/projects/gmake-linux $(SILENT) cp .build/linux64_gcc/bin/shadercRelease tools/bin/linux/shaderc $(SILENT) $(MAKE) -C .build/projects/gmake-linux config=release64 -j 6 texturec $(SILENT) cp .build/linux64_gcc/bin/texturecRelease tools/bin/linux/texturec + $(SILENT) $(MAKE) -C .build/projects/gmake-linux config=release64 -j 6 texturev + $(SILENT) cp .build/linux64_gcc/bin/texturevRelease tools/bin/linux/texturev dist-darwin: .build/projects/gmake-osx $(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 geometryc @@ -364,5 +368,7 @@ dist-darwin: .build/projects/gmake-osx $(SILENT) cp .build/osx64_clang/bin/shadercRelease tools/bin/darwin/shaderc $(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 texturec $(SILENT) cp .build/osx64_clang/bin/texturecRelease tools/bin/darwin/texturec + $(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 texturev + $(SILENT) cp .build/osx64_clang/bin/texturevRelease tools/bin/darwin/texturev dist: clean dist-windows dist-linux dist-darwin diff --git a/scripts/geometryc.lua b/scripts/geometryc.lua index 9caecd29d..47b2ee016 100644 --- a/scripts/geometryc.lua +++ b/scripts/geometryc.lua @@ -25,9 +25,14 @@ project "geometryc" path.join(BGFX_DIR, "examples/common/bounds.**"), } + configuration { "mingw-*" } + targetextension ".exe" + configuration { "osx" } links { "Cocoa.framework", } + configuration {} + strip() diff --git a/scripts/shaderc.lua b/scripts/shaderc.lua index 4c09f8477..f45310417 100644 --- a/scripts/shaderc.lua +++ b/scripts/shaderc.lua @@ -36,6 +36,9 @@ project "shaderc" "/wd4996" -- warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. } + configuration { "mingw-*" } + targetextension ".exe" + configuration { "mingw* or linux or osx" } buildoptions { "-fno-strict-aliasing", -- glsl-optimizer has bugs if strict aliasing is used. diff --git a/scripts/texturec.lua b/scripts/texturec.lua index 28e9bcc8b..36a01b15f 100644 --- a/scripts/texturec.lua +++ b/scripts/texturec.lua @@ -38,11 +38,12 @@ project "texturec" path.join(BGFX_DIR, "tools/texturec/**.h"), } - links { --- "bgfx", - } + configuration { "mingw-*" } + targetextension ".exe" configuration { "osx" } links { "Cocoa.framework", } + + configuration {} diff --git a/scripts/texturev.lua b/scripts/texturev.lua index 4a04cff4c..2cfd106a8 100644 --- a/scripts/texturev.lua +++ b/scripts/texturev.lua @@ -120,7 +120,7 @@ project ("texturev") "/DELAYLOAD:\"libGLESv2.dll\"", } - configuration { "mingw*" } + configuration { "mingw-*" } targetextension ".exe" configuration { "vs20* or mingw*" } diff --git a/tools/texturev/texturev.cpp b/tools/texturev/texturev.cpp index ef976d626..28e298acb 100644 --- a/tools/texturev/texturev.cpp +++ b/tools/texturev/texturev.cpp @@ -224,7 +224,7 @@ struct View } std::string name = path; - char ch = name.back(); + char ch = name[name.size()-1]; name += '/' == ch || '\\' == ch ? "" : "/"; name += item->d_name; m_fileList.push_back(name);