From ff6c7bc654712a137287a49332fcfdabd36b34fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 4 May 2014 15:43:14 -0700 Subject: [PATCH] Added --with-tools premake switch. --- makefile | 27 ++++++++++++++------------- premake/premake4.lua | 15 +++++++++++---- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/makefile b/makefile index 14d12561b..25f51ba2e 100644 --- a/makefile +++ b/makefile @@ -17,9 +17,14 @@ endif PREMAKE4=../bx/tools/bin/$(OS)/premake4 all: - $(PREMAKE4) --file=premake/premake4.lua vs2008 - $(PREMAKE4) --file=premake/premake4.lua vs2010 - $(PREMAKE4) --file=premake/premake4.lua vs2012 + $(PREMAKE4) --file=premake/premake4.lua --with-tools vs2008 + $(PREMAKE4) --file=premake/premake4.lua --with-tools vs2010 + $(PREMAKE4) --file=premake/premake4.lua --with-tools vs2012 + $(PREMAKE4) --file=premake/premake4.lua --with-tools --gcc=mingw gmake + $(PREMAKE4) --file=premake/premake4.lua --with-tools --gcc=linux-gcc gmake + $(PREMAKE4) --file=premake/premake4.lua --with-tools --gcc=osx gmake + $(PREMAKE4) --file=premake/premake4.lua --with-tools xcode4 + $(PREMAKE4) --file=premake/premake4.lua --gcc=android-arm gmake $(PREMAKE4) --file=premake/premake4.lua --gcc=android-mips gmake $(PREMAKE4) --file=premake/premake4.lua --gcc=android-x86 gmake @@ -27,12 +32,8 @@ all: $(PREMAKE4) --file=premake/premake4.lua --gcc=nacl gmake $(PREMAKE4) --file=premake/premake4.lua --gcc=nacl-arm gmake $(PREMAKE4) --file=premake/premake4.lua --gcc=pnacl gmake - $(PREMAKE4) --file=premake/premake4.lua --gcc=mingw gmake - $(PREMAKE4) --file=premake/premake4.lua --gcc=linux-gcc gmake - $(PREMAKE4) --file=premake/premake4.lua --gcc=osx gmake $(PREMAKE4) --file=premake/premake4.lua --gcc=ios-arm gmake $(PREMAKE4) --file=premake/premake4.lua --gcc=ios-simulator gmake - $(PREMAKE4) --file=premake/premake4.lua xcode4 .build/projects/gmake-android-arm: $(PREMAKE4) --file=premake/premake4.lua --gcc=android-arm gmake @@ -67,7 +68,7 @@ asmjs-release: .build/projects/gmake-asmjs asmjs: asmjs-debug asmjs-release .build/projects/gmake-linux: - $(PREMAKE4) --file=premake/premake4.lua --gcc=linux-gcc gmake + $(PREMAKE4) --file=premake/premake4.lua --with-tools --gcc=linux-gcc gmake linux-debug32: .build/projects/gmake-linux make -R -C .build/projects/gmake-linux config=debug32 linux-release32: .build/projects/gmake-linux @@ -79,7 +80,7 @@ linux-release64: .build/projects/gmake-linux linux: linux-debug32 linux-release32 linux-debug64 linux-release64 .build/projects/gmake-mingw: - $(PREMAKE4) --file=premake/premake4.lua --gcc=mingw gmake + $(PREMAKE4) --file=premake/premake4.lua --with-tools --gcc=mingw gmake mingw-debug32: .build/projects/gmake-mingw make -R -C .build/projects/gmake-mingw config=debug32 mingw-release32: .build/projects/gmake-mingw @@ -91,7 +92,7 @@ mingw-release64: .build/projects/gmake-mingw mingw: mingw-debug32 mingw-release32 mingw-debug64 mingw-release64 .build/projects/vs2008: - $(PREMAKE4) --file=premake/premake4.lua vs2008 + $(PREMAKE4) --file=premake/premake4.lua --with-tools vs2008 vs2008-debug32: devenv .build/projects/vs2008/bgfx.sln /Build "Debug|Win32" vs2008-release32: @@ -103,10 +104,10 @@ vs2008-release64: vs2008: vs2008-debug32 vs2008-release32 vs2008-debug64 vs2008-release64 .build/projects/vs2010: - $(PREMAKE4) --file=premake/premake4.lua vs2010 + $(PREMAKE4) --file=premake/premake4.lua --with-tools vs2010 .build/projects/vs2012: - $(PREMAKE4) --file=premake/premake4.lua vs2012 + $(PREMAKE4) --file=premake/premake4.lua --with-tools vs2012 .build/projects/gmake-nacl: $(PREMAKE4) --file=premake/premake4.lua --gcc=nacl gmake @@ -137,7 +138,7 @@ pnacl-release: .build/projects/gmake-pnacl pnacl: pnacl-debug pnacl-release .build/projects/gmake-osx: - $(PREMAKE4) --file=premake/premake4.lua --gcc=osx gmake + $(PREMAKE4) --file=premake/premake4.lua --with-tools --gcc=osx gmake osx-debug32: .build/projects/gmake-osx make -C .build/projects/gmake-osx config=debug32 osx-release32: .build/projects/gmake-osx diff --git a/premake/premake4.lua b/premake/premake4.lua index 51f70ed95..a6a72f7a9 100644 --- a/premake/premake4.lua +++ b/premake/premake4.lua @@ -3,6 +3,11 @@ -- License: http://www.opensource.org/licenses/BSD-2-Clause -- +newoption { + trigger = "with-tools", + description = "Enable building tools.", +} + solution "bgfx" configurations { "Debug", @@ -173,7 +178,9 @@ exampleProject("18-ibl", "711bcbb0-9531-11e3-a5e2-0800200c9a66") exampleProject("19-oit", "d7eca4fc-96d7-11e3-a73b-fcafdb0f677b") exampleProject("20-nanovg", "359ce7c4-cd06-11e3-bb8b-6c2f9a125b5a") -dofile "makedisttex.lua" -dofile "shaderc.lua" -dofile "texturec.lua" -dofile "geometryc.lua" +if _OPTIONS["with-tools"] then + dofile "makedisttex.lua" + dofile "shaderc.lua" + dofile "texturec.lua" + dofile "geometryc.lua" +end