From e8cb3e06d030cd4a04df0db786081af6436288c2 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Wed, 8 Jun 2016 19:36:57 +0200 Subject: [PATCH] Updated GENie to latest (nw) --- 3rdparty/genie/LICENSE | 3 +- 3rdparty/genie/README.md | 92 ++- 3rdparty/genie/build/gmake.darwin/genie.make | 552 +++++++++--------- .../{gmake.bsd => gmake.freebsd}/Makefile | 0 .../{gmake.bsd => gmake.freebsd}/genie.make | 339 +++++------ 3rdparty/genie/build/gmake.linux/genie.make | 328 +++++------ 3rdparty/genie/build/gmake.windows/genie.make | 330 +++++------ 3rdparty/genie/docs/scripting-reference.md | 36 +- 3rdparty/genie/makefile | 10 +- 3rdparty/genie/scripts/release.lua | 2 +- 3rdparty/genie/src/_manifest.lua | 9 + .../src/actions/codeblocks/codeblocks_cbp.lua | 6 +- .../src/actions/codelite/codelite_project.lua | 4 +- .../actions/fastbuild/fastbuild_project.lua | 147 +++-- .../actions/fastbuild/fastbuild_solution.lua | 165 ++++-- 3rdparty/genie/src/actions/make/_make.lua | 7 +- 3rdparty/genie/src/actions/make/make_cpp.lua | 43 +- .../genie/src/actions/make/make_solution.lua | 11 +- 3rdparty/genie/src/actions/make/make_vala.lua | 153 +++++ 3rdparty/genie/src/actions/ninja/_ninja.lua | 50 ++ .../genie/src/actions/ninja/ninja_base.lua | 143 +++++ .../genie/src/actions/ninja/ninja_cpp.lua | 149 +++++ .../src/actions/ninja/ninja_solution.lua | 162 +++++ .../src/actions/vstudio/vs200x_vcproj.lua | 20 +- .../actions/vstudio/vs200x_vcproj_user.lua | 4 - .../src/actions/vstudio/vs2010_vcxproj.lua | 115 +++- .../vstudio/vs2010_vcxproj_filters.lua | 23 +- .../genie/src/actions/xcode/xcode_common.lua | 24 +- .../genie/src/actions/xcode/xcode_project.lua | 12 + 3rdparty/genie/src/base/api.lua | 35 +- 3rdparty/genie/src/base/bake.lua | 2 +- 3rdparty/genie/src/base/globals.lua | 7 +- 3rdparty/genie/src/base/io.lua | 47 ++ 3rdparty/genie/src/base/iter.lua | 16 + 3rdparty/genie/src/base/path.lua | 91 ++- 3rdparty/genie/src/base/premake.lua | 38 +- 3rdparty/genie/src/base/project.lua | 12 +- 3rdparty/genie/src/base/table.lua | 28 + 3rdparty/genie/src/host/scripts.c | 327 ++++++----- 3rdparty/genie/src/tools/gcc.lua | 11 + 3rdparty/genie/src/tools/valac.lua | 93 +++ makefile | 8 +- scripts/src/main.lua | 2 +- 43 files changed, 2500 insertions(+), 1156 deletions(-) rename 3rdparty/genie/build/{gmake.bsd => gmake.freebsd}/Makefile (100%) rename 3rdparty/genie/build/{gmake.bsd => gmake.freebsd}/genie.make (59%) create mode 100644 3rdparty/genie/src/actions/make/make_vala.lua create mode 100644 3rdparty/genie/src/actions/ninja/_ninja.lua create mode 100644 3rdparty/genie/src/actions/ninja/ninja_base.lua create mode 100644 3rdparty/genie/src/actions/ninja/ninja_cpp.lua create mode 100644 3rdparty/genie/src/actions/ninja/ninja_solution.lua create mode 100644 3rdparty/genie/src/base/iter.lua create mode 100644 3rdparty/genie/src/tools/valac.lua diff --git a/3rdparty/genie/LICENSE b/3rdparty/genie/LICENSE index bce0a4497af..889065a9e36 100644 --- a/3rdparty/genie/LICENSE +++ b/3rdparty/genie/LICENSE @@ -3,7 +3,8 @@ GENie Copyright (c) 2014-2016 Branimir Karadžić, Neil Richardson, Mike Popoloski, Drew Solomon, Ted de Munnik, Miodrag Milanović, Brett Vickers, Bill Freist, -Terry Hendrix II, Ryan Juckett, Andrew Johnson, Johan Sköld, Alastair Murray +Terry Hendrix II, Ryan Juckett, Andrew Johnson, Johan Sköld, Alastair +Murray, Patrick Munns, Jan-Eric Duden, Phil Stevens, Stuart Carnie. All rights reserved. https://github.com/bkaradzic/genie diff --git a/3rdparty/genie/README.md b/3rdparty/genie/README.md index 27fe51f698d..b89a35eb81e 100644 --- a/3rdparty/genie/README.md +++ b/3rdparty/genie/README.md @@ -9,8 +9,10 @@ generates project from Lua script, making applying the same settings for multiple projects easy. Supported project generators: - * Visual Studio 2008, 2010, 2012, 2013, 2015, 15 + * FASTBuild (experimental) * GNU Makefile + * Ninja (experimental) + * Visual Studio 2008, 2010, 2012, 2013, 2015, 15 * XCode Download (stable) @@ -18,7 +20,7 @@ Download (stable) [![Build Status](https://travis-ci.org/bkaradzic/GENie.svg?branch=master)](https://travis-ci.org/bkaradzic/GENie) - version 445 (commit 6798f93ba8ee029b629cfc340e90c653e780d8b1) + version 545 (commit 34f239f24d8004777174a375b8f04ff21f2f5b8e) Linux: https://github.com/bkaradzic/bx/raw/master/tools/bin/linux/genie @@ -41,25 +43,6 @@ Documentation [Scripting Reference](https://github.com/bkaradzic/genie/blob/master/docs/scripting-reference.md#scripting-reference) -Who is using it? ----------------- - -https://github.com/bkaradzic/bgfx bgfx - Cross-platform, graphics API -agnostic, "Bring Your Own Engine/Framework" style rendering library. - -https://github.com/Psybrus/Psybrus Psybrus Engine & Toolchain - -https://github.com/dariomanesku/cmftstudio cmftStudio - cubemap filtering tool - -https://github.com/mamedev/mame MAME - Multiple Arcade Machine Emulator - -http://sol.gfxile.net/soloud SoLoud is an easy to use, free, -portable c/c++ audio engine for games. - -https://github.com/andr3wmac/Torque6 Torque 6 is an MIT licensed 3D engine -loosely based on Torque2D. Being neither Torque2D or Torque3D it is the 6th -derivative of the original Torque Engine. - History ------- @@ -111,6 +94,68 @@ intention to keep it compatible with it. - Added `NoBufferSecurityCheck` flag to disable security checks in VS. - Added `nopch` file list to exclude files from using PCH. - Added `EnableAVX` and `EnableAVX2` flags to enable enhanced instruction set. + - Added FASTBuild (.bff) project generator. + - Added Vala language support. + - Added MASM support for Visual Studio projects. + - Added `userincludedirs` for include header with angle brackets and quotes + search path control. + - Detect when generated project files are not changing, and skip writing over + existing project files. + - Added Ninja project generator. + +Debugging GENie scripts +----------------------- + +It is possible to debug build scripts using [ZeroBrane Studio][zbs]. You must +compile GENie in debug mode + + $ make config=debug + +This ensures the core lua scripts are loaded from disk rather than compiled +into the GENie binary. Create a file named `debug.lua` as a sibling to your +main `genie.lua` script with the following content: + + local zb_path = + local cpaths = { + string.format("%s/bin/lib?.dylib;%s/bin/clibs53/?.dylib;", zb_path, zb_path), + package.cpath, + } + package.cpath = table.concat(cpaths, ';') + + local paths = { + string.format('%s/lualibs/?.lua;%s/lualibs/?/?.lua', zb_path, zb_path), + string.format('%s/lualibs/?/init.lua;%s/lualibs/?/?/?.lua', zb_path, zb_path), + string.format('%s/lualibs/?/?/init.lua', zb), + package.path, + } + package.path = table.concat(paths, ';') + + require('mobdebug').start() + +**NOTE:** update `zb_path` to refer to the root of your ZeroBrane Studio +install. For reference, you should find `lualibs` in you `zb_path` folder + +To debug, make sure ZBS is listening for debug connections and add +`dofile("debug.lua")` to `genie.lua` + +Who is using it? +---------------- + +https://github.com/bkaradzic/bgfx bgfx - Cross-platform, graphics API +agnostic, "Bring Your Own Engine/Framework" style rendering library. + +https://github.com/Psybrus/Psybrus Psybrus Engine & Toolchain + +https://github.com/dariomanesku/cmftstudio cmftStudio - cubemap filtering tool + +https://github.com/mamedev/mame MAME - Multiple Arcade Machine Emulator + +http://sol.gfxile.net/soloud SoLoud is an easy to use, free, +portable c/c++ audio engine for games. + +https://github.com/andr3wmac/Torque6 Torque 6 is an MIT licensed 3D engine +loosely based on Torque2D. Being neither Torque2D or Torque3D it is the 6th +derivative of the original Torque Engine. [License](https://github.com/bkaradzic/genie/blob/master/LICENSE) ----------------------------------------------------------------- @@ -118,7 +163,8 @@ intention to keep it compatible with it. GENie Copyright (c) 2014-2016 Branimir Karadžić, Neil Richardson, Mike Popoloski, Drew Solomon, Ted de Munnik, Miodrag Milanović, Brett Vickers, Bill Freist, - Terry Hendrix II, Ryan Juckett, Andrew Johnson, Johan Sköld, Alastair Murray + Terry Hendrix II, Ryan Juckett, Andrew Johnson, Johan Sköld, Alastair + Murray, Patrick Munns, Jan-Eric Duden, Phil Stevens, Stuart Carnie. All rights reserved. https://github.com/bkaradzic/genie @@ -147,3 +193,5 @@ intention to keep it compatible with it. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + [zbs]: https://studio.zerobrane.com diff --git a/3rdparty/genie/build/gmake.darwin/genie.make b/3rdparty/genie/build/gmake.darwin/genie.make index d424a93c156..ac1adeac66f 100644 --- a/3rdparty/genie/build/gmake.darwin/genie.make +++ b/3rdparty/genie/build/gmake.darwin/genie.make @@ -21,7 +21,7 @@ endif ifeq (posix,$(SHELLTYPE)) MKDIR = $(SILENT) mkdir -p "$(1)" COPY = $(SILENT) cp -fR "$(1)" "$(2)" - RM= $(SILENT) rm -f "$(1)" + RM = $(SILENT) rm -f "$(1)" else MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0 COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))" @@ -41,74 +41,75 @@ ifndef RESCOMP endif ifeq ($(config),release) - OBJDIR = obj/Release - TARGETDIR = ../../bin/darwin - override TARGET = $(TARGETDIR)/genie - DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX - INCLUDES += -I../../src/host/lua-5.3.0/src + OBJDIR = obj/Release + TARGETDIR = ../../bin/darwin + override TARGET = $(TARGETDIR)/genie + DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX + INCLUDES += -I../../src/host/lua-5.3.0/src + INCLUDES += ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -mmacosx-version-min=10.4 ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -mmacosx-version-min=10.4 ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -mmacosx-version-min=10.4 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L. -mmacosx-version-min=10.4 - LDDEPS += - LIBS += $(LDDEPS) -framework CoreServices + LDDEPS += + LIBS += $(LDDEPS) -framework CoreServices EXTERNAL_LIBS += - LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) OBJECTS := \ - $(OBJDIR)/src/host/os_getcwd.o \ - $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ $(OBJDIR)/src/host/os_chdir.o \ - $(OBJDIR)/src/host/premake_main.o \ - $(OBJDIR)/src/host/os_uuid.o \ - $(OBJDIR)/src/host/os_isfile.o \ - $(OBJDIR)/src/host/os_ticks.o \ $(OBJDIR)/src/host/os_copyfile.o \ + $(OBJDIR)/src/host/os_getcwd.o \ + $(OBJDIR)/src/host/os_is64bit.o \ + $(OBJDIR)/src/host/os_isdir.o \ + $(OBJDIR)/src/host/os_isfile.o \ + $(OBJDIR)/src/host/os_match.o \ + $(OBJDIR)/src/host/os_mkdir.o \ + $(OBJDIR)/src/host/os_pathsearch.o \ + $(OBJDIR)/src/host/os_rmdir.o \ + $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/os_ticks.o \ + $(OBJDIR)/src/host/os_uuid.o \ + $(OBJDIR)/src/host/path_isabsolute.o \ + $(OBJDIR)/src/host/premake.o \ + $(OBJDIR)/src/host/premake_main.o \ $(OBJDIR)/src/host/scripts.o \ $(OBJDIR)/src/host/string_endswith.o \ $(OBJDIR)/src/host/string_hash.o \ - $(OBJDIR)/src/host/os_pathsearch.o \ - $(OBJDIR)/src/host/os_rmdir.o \ - $(OBJDIR)/src/host/os_match.o \ - $(OBJDIR)/src/host/premake.o \ - $(OBJDIR)/src/host/os_isdir.o \ - $(OBJDIR)/src/host/os_mkdir.o \ - $(OBJDIR)/src/host/path_isabsolute.o \ - $(OBJDIR)/src/host/os_is64bit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ define PREBUILDCMDS endef @@ -119,74 +120,75 @@ ifeq ($(config),release) endif ifeq ($(config),debug) - OBJDIR = obj/Debug - TARGETDIR = ../../bin/darwin - override TARGET = $(TARGETDIR)/genie - DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX - INCLUDES += -I../../src/host/lua-5.3.0/src + OBJDIR = obj/Debug + TARGETDIR = ../../bin/darwin + override TARGET = $(TARGETDIR)/genie + DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX + INCLUDES += -I../../src/host/lua-5.3.0/src + INCLUDES += ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -mmacosx-version-min=10.4 ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -mmacosx-version-min=10.4 ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -mmacosx-version-min=10.4 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L. -mmacosx-version-min=10.4 - LDDEPS += - LIBS += $(LDDEPS) -framework CoreServices + LDDEPS += + LIBS += $(LDDEPS) -framework CoreServices EXTERNAL_LIBS += - LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) OBJECTS := \ - $(OBJDIR)/src/host/os_getcwd.o \ - $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ $(OBJDIR)/src/host/os_chdir.o \ - $(OBJDIR)/src/host/premake_main.o \ - $(OBJDIR)/src/host/os_uuid.o \ - $(OBJDIR)/src/host/os_isfile.o \ - $(OBJDIR)/src/host/os_ticks.o \ $(OBJDIR)/src/host/os_copyfile.o \ + $(OBJDIR)/src/host/os_getcwd.o \ + $(OBJDIR)/src/host/os_is64bit.o \ + $(OBJDIR)/src/host/os_isdir.o \ + $(OBJDIR)/src/host/os_isfile.o \ + $(OBJDIR)/src/host/os_match.o \ + $(OBJDIR)/src/host/os_mkdir.o \ + $(OBJDIR)/src/host/os_pathsearch.o \ + $(OBJDIR)/src/host/os_rmdir.o \ + $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/os_ticks.o \ + $(OBJDIR)/src/host/os_uuid.o \ + $(OBJDIR)/src/host/path_isabsolute.o \ + $(OBJDIR)/src/host/premake.o \ + $(OBJDIR)/src/host/premake_main.o \ $(OBJDIR)/src/host/scripts.o \ $(OBJDIR)/src/host/string_endswith.o \ $(OBJDIR)/src/host/string_hash.o \ - $(OBJDIR)/src/host/os_pathsearch.o \ - $(OBJDIR)/src/host/os_rmdir.o \ - $(OBJDIR)/src/host/os_match.o \ - $(OBJDIR)/src/host/premake.o \ - $(OBJDIR)/src/host/os_isdir.o \ - $(OBJDIR)/src/host/os_mkdir.o \ - $(OBJDIR)/src/host/path_isabsolute.o \ - $(OBJDIR)/src/host/os_is64bit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ define PREBUILDCMDS endef @@ -198,74 +200,75 @@ endif ifeq ($(config),releaseuniv32) AR = libtool - OBJDIR = obj/Universal32/Release - TARGETDIR = ../../bin/darwin - override TARGET = $(TARGETDIR)/genie - DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX - INCLUDES += -I../../src/host/lua-5.3.0/src + OBJDIR = obj/Universal32/Release + TARGETDIR = ../../bin/darwin + override TARGET = $(TARGETDIR)/genie + DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX + INCLUDES += -I../../src/host/lua-5.3.0/src + INCLUDES += ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -arch i386 -arch ppc -mmacosx-version-min=10.4 ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -arch i386 -arch ppc -mmacosx-version-min=10.4 ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -arch i386 -arch ppc -mmacosx-version-min=10.4 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L. -arch i386 -arch ppc -mmacosx-version-min=10.4 - LDDEPS += - LIBS += $(LDDEPS) -framework CoreServices + LDDEPS += + LIBS += $(LDDEPS) -framework CoreServices EXTERNAL_LIBS += - LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) OBJECTS := \ - $(OBJDIR)/src/host/os_getcwd.o \ - $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ $(OBJDIR)/src/host/os_chdir.o \ - $(OBJDIR)/src/host/premake_main.o \ - $(OBJDIR)/src/host/os_uuid.o \ - $(OBJDIR)/src/host/os_isfile.o \ - $(OBJDIR)/src/host/os_ticks.o \ $(OBJDIR)/src/host/os_copyfile.o \ + $(OBJDIR)/src/host/os_getcwd.o \ + $(OBJDIR)/src/host/os_is64bit.o \ + $(OBJDIR)/src/host/os_isdir.o \ + $(OBJDIR)/src/host/os_isfile.o \ + $(OBJDIR)/src/host/os_match.o \ + $(OBJDIR)/src/host/os_mkdir.o \ + $(OBJDIR)/src/host/os_pathsearch.o \ + $(OBJDIR)/src/host/os_rmdir.o \ + $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/os_ticks.o \ + $(OBJDIR)/src/host/os_uuid.o \ + $(OBJDIR)/src/host/path_isabsolute.o \ + $(OBJDIR)/src/host/premake.o \ + $(OBJDIR)/src/host/premake_main.o \ $(OBJDIR)/src/host/scripts.o \ $(OBJDIR)/src/host/string_endswith.o \ $(OBJDIR)/src/host/string_hash.o \ - $(OBJDIR)/src/host/os_pathsearch.o \ - $(OBJDIR)/src/host/os_rmdir.o \ - $(OBJDIR)/src/host/os_match.o \ - $(OBJDIR)/src/host/premake.o \ - $(OBJDIR)/src/host/os_isdir.o \ - $(OBJDIR)/src/host/os_mkdir.o \ - $(OBJDIR)/src/host/path_isabsolute.o \ - $(OBJDIR)/src/host/os_is64bit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ define PREBUILDCMDS endef @@ -277,74 +280,75 @@ endif ifeq ($(config),debuguniv32) AR = libtool - OBJDIR = obj/Universal32/Debug - TARGETDIR = ../../bin/darwin - override TARGET = $(TARGETDIR)/genie - DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX - INCLUDES += -I../../src/host/lua-5.3.0/src + OBJDIR = obj/Universal32/Debug + TARGETDIR = ../../bin/darwin + override TARGET = $(TARGETDIR)/genie + DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX + INCLUDES += -I../../src/host/lua-5.3.0/src + INCLUDES += ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -arch i386 -arch ppc -mmacosx-version-min=10.4 ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -arch i386 -arch ppc -mmacosx-version-min=10.4 ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -arch i386 -arch ppc -mmacosx-version-min=10.4 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L. -arch i386 -arch ppc -mmacosx-version-min=10.4 - LDDEPS += - LIBS += $(LDDEPS) -framework CoreServices + LDDEPS += + LIBS += $(LDDEPS) -framework CoreServices EXTERNAL_LIBS += - LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) OBJECTS := \ - $(OBJDIR)/src/host/os_getcwd.o \ - $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ $(OBJDIR)/src/host/os_chdir.o \ - $(OBJDIR)/src/host/premake_main.o \ - $(OBJDIR)/src/host/os_uuid.o \ - $(OBJDIR)/src/host/os_isfile.o \ - $(OBJDIR)/src/host/os_ticks.o \ $(OBJDIR)/src/host/os_copyfile.o \ + $(OBJDIR)/src/host/os_getcwd.o \ + $(OBJDIR)/src/host/os_is64bit.o \ + $(OBJDIR)/src/host/os_isdir.o \ + $(OBJDIR)/src/host/os_isfile.o \ + $(OBJDIR)/src/host/os_match.o \ + $(OBJDIR)/src/host/os_mkdir.o \ + $(OBJDIR)/src/host/os_pathsearch.o \ + $(OBJDIR)/src/host/os_rmdir.o \ + $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/os_ticks.o \ + $(OBJDIR)/src/host/os_uuid.o \ + $(OBJDIR)/src/host/path_isabsolute.o \ + $(OBJDIR)/src/host/premake.o \ + $(OBJDIR)/src/host/premake_main.o \ $(OBJDIR)/src/host/scripts.o \ $(OBJDIR)/src/host/string_endswith.o \ $(OBJDIR)/src/host/string_hash.o \ - $(OBJDIR)/src/host/os_pathsearch.o \ - $(OBJDIR)/src/host/os_rmdir.o \ - $(OBJDIR)/src/host/os_match.o \ - $(OBJDIR)/src/host/premake.o \ - $(OBJDIR)/src/host/os_isdir.o \ - $(OBJDIR)/src/host/os_mkdir.o \ - $(OBJDIR)/src/host/path_isabsolute.o \ - $(OBJDIR)/src/host/os_is64bit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ define PREBUILDCMDS endef @@ -356,8 +360,8 @@ endif OBJDIRS := \ $(OBJDIR) \ - $(OBJDIR)/src/host/lua-5.3.0/src \ $(OBJDIR)/src/host \ + $(OBJDIR)/src/host/lua-5.3.0/src \ RESOURCES := \ @@ -401,211 +405,211 @@ $(GCH): $(PCH) | $(OBJDIR) $(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<" endif -$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) +$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) +$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) +$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) +$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) +$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) +$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) +$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) +$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) +$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) +$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) +$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) +$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) +$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) +$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) +$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) +$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) +$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) +$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) +$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" diff --git a/3rdparty/genie/build/gmake.bsd/Makefile b/3rdparty/genie/build/gmake.freebsd/Makefile similarity index 100% rename from 3rdparty/genie/build/gmake.bsd/Makefile rename to 3rdparty/genie/build/gmake.freebsd/Makefile diff --git a/3rdparty/genie/build/gmake.bsd/genie.make b/3rdparty/genie/build/gmake.freebsd/genie.make similarity index 59% rename from 3rdparty/genie/build/gmake.bsd/genie.make rename to 3rdparty/genie/build/gmake.freebsd/genie.make index ab3b36b4f0b..48d559f4a20 100644 --- a/3rdparty/genie/build/gmake.bsd/genie.make +++ b/3rdparty/genie/build/gmake.freebsd/genie.make @@ -14,11 +14,14 @@ endif ifeq (/bin,$(findstring /bin,$(SHELL))) SHELLTYPE := posix endif +ifeq (/bin,$(findstring /bin,$(MAKESHELL))) + SHELLTYPE := posix +endif ifeq (posix,$(SHELLTYPE)) MKDIR = $(SILENT) mkdir -p "$(1)" COPY = $(SILENT) cp -fR "$(1)" "$(2)" - RM= $(SILENT) rm -f "$(1)" + RM = $(SILENT) rm -f "$(1)" else MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0 COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))" @@ -38,40 +41,23 @@ ifndef RESCOMP endif ifeq ($(config),release) - OBJDIR = obj/Release - TARGETDIR = ../../bin/bsd - override TARGET = $(TARGETDIR)/genie - DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN - INCLUDES += -I../../src/host/lua-5.3.0/src - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) + OBJDIR = obj/Release + TARGETDIR = ../../bin/bsd + override TARGET = $(TARGETDIR)/genie + DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN + INCLUDES += -I../../src/host/lua-5.3.0/src + INCLUDES += + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L. -s -rdynamic - LDDEPS += - LIBS += $(LDDEPS) -lm - LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + LDDEPS += + LIBS += $(LDDEPS) -lm + EXTERNAL_LIBS += + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) OBJECTS := \ - $(OBJDIR)/src/host/os_chdir.o \ - $(OBJDIR)/src/host/os_copyfile.o \ - $(OBJDIR)/src/host/os_getcwd.o \ - $(OBJDIR)/src/host/os_is64bit.o \ - $(OBJDIR)/src/host/os_isdir.o \ - $(OBJDIR)/src/host/os_isfile.o \ - $(OBJDIR)/src/host/os_match.o \ - $(OBJDIR)/src/host/os_mkdir.o \ - $(OBJDIR)/src/host/os_pathsearch.o \ - $(OBJDIR)/src/host/os_rmdir.o \ - $(OBJDIR)/src/host/os_stat.o \ - $(OBJDIR)/src/host/os_ticks.o \ - $(OBJDIR)/src/host/os_uuid.o \ - $(OBJDIR)/src/host/path_isabsolute.o \ - $(OBJDIR)/src/host/premake.o \ - $(OBJDIR)/src/host/premake_main.o \ - $(OBJDIR)/src/host/scripts.o \ - $(OBJDIR)/src/host/string_endswith.o \ - $(OBJDIR)/src/host/string_hash.o \ $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ @@ -105,6 +91,25 @@ ifeq ($(config),release) $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ + $(OBJDIR)/src/host/os_chdir.o \ + $(OBJDIR)/src/host/os_copyfile.o \ + $(OBJDIR)/src/host/os_getcwd.o \ + $(OBJDIR)/src/host/os_is64bit.o \ + $(OBJDIR)/src/host/os_isdir.o \ + $(OBJDIR)/src/host/os_isfile.o \ + $(OBJDIR)/src/host/os_match.o \ + $(OBJDIR)/src/host/os_mkdir.o \ + $(OBJDIR)/src/host/os_pathsearch.o \ + $(OBJDIR)/src/host/os_rmdir.o \ + $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/os_ticks.o \ + $(OBJDIR)/src/host/os_uuid.o \ + $(OBJDIR)/src/host/path_isabsolute.o \ + $(OBJDIR)/src/host/premake.o \ + $(OBJDIR)/src/host/premake_main.o \ + $(OBJDIR)/src/host/scripts.o \ + $(OBJDIR)/src/host/string_endswith.o \ + $(OBJDIR)/src/host/string_hash.o \ define PREBUILDCMDS endef @@ -115,40 +120,23 @@ ifeq ($(config),release) endif ifeq ($(config),debug) - OBJDIR = obj/Debug - TARGETDIR = ../../bin/bsd - override TARGET = $(TARGETDIR)/genie - DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN - INCLUDES += -I../../src/host/lua-5.3.0/src - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) + OBJDIR = obj/Debug + TARGETDIR = ../../bin/bsd + override TARGET = $(TARGETDIR)/genie + DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN + INCLUDES += -I../../src/host/lua-5.3.0/src + INCLUDES += + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L. -rdynamic - LDDEPS += - LIBS += $(LDDEPS) -lm - LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + LDDEPS += + LIBS += $(LDDEPS) -lm + EXTERNAL_LIBS += + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) OBJECTS := \ - $(OBJDIR)/src/host/os_chdir.o \ - $(OBJDIR)/src/host/os_copyfile.o \ - $(OBJDIR)/src/host/os_getcwd.o \ - $(OBJDIR)/src/host/os_is64bit.o \ - $(OBJDIR)/src/host/os_isdir.o \ - $(OBJDIR)/src/host/os_isfile.o \ - $(OBJDIR)/src/host/os_match.o \ - $(OBJDIR)/src/host/os_mkdir.o \ - $(OBJDIR)/src/host/os_pathsearch.o \ - $(OBJDIR)/src/host/os_rmdir.o \ - $(OBJDIR)/src/host/os_stat.o \ - $(OBJDIR)/src/host/os_ticks.o \ - $(OBJDIR)/src/host/os_uuid.o \ - $(OBJDIR)/src/host/path_isabsolute.o \ - $(OBJDIR)/src/host/premake.o \ - $(OBJDIR)/src/host/premake_main.o \ - $(OBJDIR)/src/host/scripts.o \ - $(OBJDIR)/src/host/string_endswith.o \ - $(OBJDIR)/src/host/string_hash.o \ $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ @@ -182,6 +170,25 @@ ifeq ($(config),debug) $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ + $(OBJDIR)/src/host/os_chdir.o \ + $(OBJDIR)/src/host/os_copyfile.o \ + $(OBJDIR)/src/host/os_getcwd.o \ + $(OBJDIR)/src/host/os_is64bit.o \ + $(OBJDIR)/src/host/os_isdir.o \ + $(OBJDIR)/src/host/os_isfile.o \ + $(OBJDIR)/src/host/os_match.o \ + $(OBJDIR)/src/host/os_mkdir.o \ + $(OBJDIR)/src/host/os_pathsearch.o \ + $(OBJDIR)/src/host/os_rmdir.o \ + $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/os_ticks.o \ + $(OBJDIR)/src/host/os_uuid.o \ + $(OBJDIR)/src/host/path_isabsolute.o \ + $(OBJDIR)/src/host/premake.o \ + $(OBJDIR)/src/host/premake_main.o \ + $(OBJDIR)/src/host/scripts.o \ + $(OBJDIR)/src/host/string_endswith.o \ + $(OBJDIR)/src/host/string_hash.o \ define PREBUILDCMDS endef @@ -193,17 +200,17 @@ endif OBJDIRS := \ $(OBJDIR) \ - $(OBJDIR)/src/host/lua-5.3.0/src \ $(OBJDIR)/src/host \ + $(OBJDIR)/src/host/lua-5.3.0/src \ RESOURCES := \ .PHONY: clean prebuild prelink -all: $(TARGETDIR) $(OBJDIRS) prebuild prelink $(TARGET) +all: $(OBJDIRS) prebuild prelink $(TARGET) | $(TARGETDIR) @: -$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES) +$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS) @echo Linking genie $(SILENT) $(LINKCMD) $(POSTBUILDCMDS) @@ -233,218 +240,218 @@ prelink: $(PRELINKCMDS) ifneq (,$(PCH)) -$(GCH): $(PCH) +$(GCH): $(PCH) | $(OBJDIR) @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<" endif -$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c +$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c +$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c +$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c +$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c +$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c +$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c +$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c +$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c +$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c +$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c +$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c +$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c +$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c +$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c +$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c +$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c +$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c +$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c +$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c +$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c +$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c +$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c +$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c +$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c +$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c +$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c +$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c +$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c +$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c +$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c +$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c +$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c +$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c +$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c +$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c +$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c +$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c +$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c +$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c +$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c +$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c +$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c +$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c +$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c +$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c +$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c +$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c +$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c +$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c +$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c +$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c +$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) genie.make @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -include $(OBJECTS:%.o=%.d) ifneq (,$(PCH)) diff --git a/3rdparty/genie/build/gmake.linux/genie.make b/3rdparty/genie/build/gmake.linux/genie.make index 5ec330896f0..e76c96ad355 100644 --- a/3rdparty/genie/build/gmake.linux/genie.make +++ b/3rdparty/genie/build/gmake.linux/genie.make @@ -21,7 +21,7 @@ endif ifeq (posix,$(SHELLTYPE)) MKDIR = $(SILENT) mkdir -p "$(1)" COPY = $(SILENT) cp -fR "$(1)" "$(2)" - RM= $(SILENT) rm -f "$(1)" + RM = $(SILENT) rm -f "$(1)" else MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0 COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))" @@ -41,74 +41,75 @@ ifndef RESCOMP endif ifeq ($(config),release) - OBJDIR = obj/Release - TARGETDIR = ../../bin/linux - override TARGET = $(TARGETDIR)/genie - DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN - INCLUDES += -I../../src/host/lua-5.3.0/src + OBJDIR = obj/Release + TARGETDIR = ../../bin/linux + override TARGET = $(TARGETDIR)/genie + DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN + INCLUDES += -I../../src/host/lua-5.3.0/src + INCLUDES += ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L. -s -rdynamic - LDDEPS += - LIBS += $(LDDEPS) -ldl -lm + LDDEPS += + LIBS += $(LDDEPS) -ldl -lm EXTERNAL_LIBS += - LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) OBJECTS := \ - $(OBJDIR)/src/host/os_getcwd.o \ - $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ $(OBJDIR)/src/host/os_chdir.o \ - $(OBJDIR)/src/host/premake_main.o \ - $(OBJDIR)/src/host/os_uuid.o \ - $(OBJDIR)/src/host/os_isfile.o \ - $(OBJDIR)/src/host/os_ticks.o \ $(OBJDIR)/src/host/os_copyfile.o \ + $(OBJDIR)/src/host/os_getcwd.o \ + $(OBJDIR)/src/host/os_is64bit.o \ + $(OBJDIR)/src/host/os_isdir.o \ + $(OBJDIR)/src/host/os_isfile.o \ + $(OBJDIR)/src/host/os_match.o \ + $(OBJDIR)/src/host/os_mkdir.o \ + $(OBJDIR)/src/host/os_pathsearch.o \ + $(OBJDIR)/src/host/os_rmdir.o \ + $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/os_ticks.o \ + $(OBJDIR)/src/host/os_uuid.o \ + $(OBJDIR)/src/host/path_isabsolute.o \ + $(OBJDIR)/src/host/premake.o \ + $(OBJDIR)/src/host/premake_main.o \ $(OBJDIR)/src/host/scripts.o \ $(OBJDIR)/src/host/string_endswith.o \ $(OBJDIR)/src/host/string_hash.o \ - $(OBJDIR)/src/host/os_pathsearch.o \ - $(OBJDIR)/src/host/os_rmdir.o \ - $(OBJDIR)/src/host/os_match.o \ - $(OBJDIR)/src/host/premake.o \ - $(OBJDIR)/src/host/os_isdir.o \ - $(OBJDIR)/src/host/os_mkdir.o \ - $(OBJDIR)/src/host/path_isabsolute.o \ - $(OBJDIR)/src/host/os_is64bit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ define PREBUILDCMDS endef @@ -119,74 +120,75 @@ ifeq ($(config),release) endif ifeq ($(config),debug) - OBJDIR = obj/Debug - TARGETDIR = ../../bin/linux - override TARGET = $(TARGETDIR)/genie - DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN - INCLUDES += -I../../src/host/lua-5.3.0/src + OBJDIR = obj/Debug + TARGETDIR = ../../bin/linux + override TARGET = $(TARGETDIR)/genie + DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN + INCLUDES += -I../../src/host/lua-5.3.0/src + INCLUDES += ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L. -rdynamic - LDDEPS += - LIBS += $(LDDEPS) -ldl -lm + LDDEPS += + LIBS += $(LDDEPS) -ldl -lm EXTERNAL_LIBS += - LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) OBJECTS := \ - $(OBJDIR)/src/host/os_getcwd.o \ - $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ $(OBJDIR)/src/host/os_chdir.o \ - $(OBJDIR)/src/host/premake_main.o \ - $(OBJDIR)/src/host/os_uuid.o \ - $(OBJDIR)/src/host/os_isfile.o \ - $(OBJDIR)/src/host/os_ticks.o \ $(OBJDIR)/src/host/os_copyfile.o \ + $(OBJDIR)/src/host/os_getcwd.o \ + $(OBJDIR)/src/host/os_is64bit.o \ + $(OBJDIR)/src/host/os_isdir.o \ + $(OBJDIR)/src/host/os_isfile.o \ + $(OBJDIR)/src/host/os_match.o \ + $(OBJDIR)/src/host/os_mkdir.o \ + $(OBJDIR)/src/host/os_pathsearch.o \ + $(OBJDIR)/src/host/os_rmdir.o \ + $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/os_ticks.o \ + $(OBJDIR)/src/host/os_uuid.o \ + $(OBJDIR)/src/host/path_isabsolute.o \ + $(OBJDIR)/src/host/premake.o \ + $(OBJDIR)/src/host/premake_main.o \ $(OBJDIR)/src/host/scripts.o \ $(OBJDIR)/src/host/string_endswith.o \ $(OBJDIR)/src/host/string_hash.o \ - $(OBJDIR)/src/host/os_pathsearch.o \ - $(OBJDIR)/src/host/os_rmdir.o \ - $(OBJDIR)/src/host/os_match.o \ - $(OBJDIR)/src/host/premake.o \ - $(OBJDIR)/src/host/os_isdir.o \ - $(OBJDIR)/src/host/os_mkdir.o \ - $(OBJDIR)/src/host/path_isabsolute.o \ - $(OBJDIR)/src/host/os_is64bit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ define PREBUILDCMDS endef @@ -243,211 +245,211 @@ $(GCH): $(PCH) | $(OBJDIR) $(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<" endif -$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) +$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) +$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) +$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) +$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) +$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) +$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) +$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) +$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) +$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) +$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) +$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) +$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) +$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) +$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) +$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) +$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) +$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) +$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) +$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" diff --git a/3rdparty/genie/build/gmake.windows/genie.make b/3rdparty/genie/build/gmake.windows/genie.make index 02e5b88916c..87dec731e21 100644 --- a/3rdparty/genie/build/gmake.windows/genie.make +++ b/3rdparty/genie/build/gmake.windows/genie.make @@ -21,7 +21,7 @@ endif ifeq (posix,$(SHELLTYPE)) MKDIR = $(SILENT) mkdir -p "$(1)" COPY = $(SILENT) cp -fR "$(1)" "$(2)" - RM= $(SILENT) rm -f "$(1)" + RM = $(SILENT) rm -f "$(1)" else MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0 COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))" @@ -41,74 +41,75 @@ ifndef RESCOMP endif ifeq ($(config),release) - OBJDIR = obj/Release - TARGETDIR = ../../bin/windows - override TARGET = $(TARGETDIR)/genie.exe - DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE - INCLUDES += -I../../src/host/lua-5.3.0/src + OBJDIR = obj/Release + TARGETDIR = ../../bin/windows + override TARGET = $(TARGETDIR)/genie.exe + DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE + INCLUDES += -I../../src/host/lua-5.3.0/src + INCLUDES += ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L. -s - LDDEPS += - LIBS += $(LDDEPS) -lole32 + LDDEPS += + LIBS += $(LDDEPS) -lole32 EXTERNAL_LIBS += - LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) OBJECTS := \ - $(OBJDIR)/src/host/os_getcwd.o \ - $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ $(OBJDIR)/src/host/os_chdir.o \ - $(OBJDIR)/src/host/premake_main.o \ - $(OBJDIR)/src/host/os_uuid.o \ - $(OBJDIR)/src/host/os_isfile.o \ - $(OBJDIR)/src/host/os_ticks.o \ $(OBJDIR)/src/host/os_copyfile.o \ + $(OBJDIR)/src/host/os_getcwd.o \ + $(OBJDIR)/src/host/os_is64bit.o \ + $(OBJDIR)/src/host/os_isdir.o \ + $(OBJDIR)/src/host/os_isfile.o \ + $(OBJDIR)/src/host/os_match.o \ + $(OBJDIR)/src/host/os_mkdir.o \ + $(OBJDIR)/src/host/os_pathsearch.o \ + $(OBJDIR)/src/host/os_rmdir.o \ + $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/os_ticks.o \ + $(OBJDIR)/src/host/os_uuid.o \ + $(OBJDIR)/src/host/path_isabsolute.o \ + $(OBJDIR)/src/host/premake.o \ + $(OBJDIR)/src/host/premake_main.o \ $(OBJDIR)/src/host/scripts.o \ $(OBJDIR)/src/host/string_endswith.o \ $(OBJDIR)/src/host/string_hash.o \ - $(OBJDIR)/src/host/os_pathsearch.o \ - $(OBJDIR)/src/host/os_rmdir.o \ - $(OBJDIR)/src/host/os_match.o \ - $(OBJDIR)/src/host/premake.o \ - $(OBJDIR)/src/host/os_isdir.o \ - $(OBJDIR)/src/host/os_mkdir.o \ - $(OBJDIR)/src/host/path_isabsolute.o \ - $(OBJDIR)/src/host/os_is64bit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ define PREBUILDCMDS endef @@ -119,74 +120,75 @@ ifeq ($(config),release) endif ifeq ($(config),debug) - OBJDIR = obj/Debug - TARGETDIR = ../../bin/windows - override TARGET = $(TARGETDIR)/genie.exe - DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE - INCLUDES += -I../../src/host/lua-5.3.0/src + OBJDIR = obj/Debug + TARGETDIR = ../../bin/windows + override TARGET = $(TARGETDIR)/genie.exe + DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE + INCLUDES += -I../../src/host/lua-5.3.0/src + INCLUDES += ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L. - LDDEPS += - LIBS += $(LDDEPS) -lole32 + LDDEPS += + LIBS += $(LDDEPS) -lole32 EXTERNAL_LIBS += - LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) OBJECTS := \ - $(OBJDIR)/src/host/os_getcwd.o \ - $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ + $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ $(OBJDIR)/src/host/os_chdir.o \ - $(OBJDIR)/src/host/premake_main.o \ - $(OBJDIR)/src/host/os_uuid.o \ - $(OBJDIR)/src/host/os_isfile.o \ - $(OBJDIR)/src/host/os_ticks.o \ $(OBJDIR)/src/host/os_copyfile.o \ + $(OBJDIR)/src/host/os_getcwd.o \ + $(OBJDIR)/src/host/os_is64bit.o \ + $(OBJDIR)/src/host/os_isdir.o \ + $(OBJDIR)/src/host/os_isfile.o \ + $(OBJDIR)/src/host/os_match.o \ + $(OBJDIR)/src/host/os_mkdir.o \ + $(OBJDIR)/src/host/os_pathsearch.o \ + $(OBJDIR)/src/host/os_rmdir.o \ + $(OBJDIR)/src/host/os_stat.o \ + $(OBJDIR)/src/host/os_ticks.o \ + $(OBJDIR)/src/host/os_uuid.o \ + $(OBJDIR)/src/host/path_isabsolute.o \ + $(OBJDIR)/src/host/premake.o \ + $(OBJDIR)/src/host/premake_main.o \ $(OBJDIR)/src/host/scripts.o \ $(OBJDIR)/src/host/string_endswith.o \ $(OBJDIR)/src/host/string_hash.o \ - $(OBJDIR)/src/host/os_pathsearch.o \ - $(OBJDIR)/src/host/os_rmdir.o \ - $(OBJDIR)/src/host/os_match.o \ - $(OBJDIR)/src/host/premake.o \ - $(OBJDIR)/src/host/os_isdir.o \ - $(OBJDIR)/src/host/os_mkdir.o \ - $(OBJDIR)/src/host/path_isabsolute.o \ - $(OBJDIR)/src/host/os_is64bit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \ - $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \ define PREBUILDCMDS endef @@ -198,8 +200,8 @@ endif OBJDIRS := \ $(OBJDIR) \ - $(OBJDIR)/src/host/lua-5.3.0/src \ $(OBJDIR)/src/host \ + $(OBJDIR)/src/host/lua-5.3.0/src \ RESOURCES := \ @@ -243,211 +245,211 @@ $(GCH): $(PCH) | $(OBJDIR) $(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<" endif -$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) +$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) +$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) +$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) +$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) +$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) +$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) +$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) +$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) +$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) +$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) +$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) +$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) +$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) +$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) +$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) +$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) +$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) +$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) +$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" -$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) +$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) genie.make @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" diff --git a/3rdparty/genie/docs/scripting-reference.md b/3rdparty/genie/docs/scripting-reference.md index e08e1dee4ac..cb1cf00f957 100644 --- a/3rdparty/genie/docs/scripting-reference.md +++ b/3rdparty/genie/docs/scripting-reference.md @@ -72,7 +72,7 @@ * [path.getrelative](#pathgetrelativesrc-dest) * [path.isabsolute](#pathisabsolutepath) * [path.iscfile](#pathiscfilepath) - * [path.iscppfile](#pathiscppfilepath) + * [path.isSourceFile](#pathiscppfilepath) * [path.isresourcefile](#pathisresourcefilepath) * [path.join](#pathjoinleading-trailing) * [path.rebase](#pathrebasepath-oldbase-newbase) @@ -101,6 +101,7 @@ * [targetname](#targetnamename) * [targetprefix](#targetprefixprefix) * [targetsuffix](#targetsuffixsuffix) + * [userincludedirs](#userincludedirspaths) * [uuid](#uuidprojectuuid) * [vpaths](#vpathsgroup--pattern) * Additional Information @@ -547,6 +548,7 @@ _flags_ - List of flag names from list below. Names are case-insensitive and ign * _Symbols_ - Generate debugging information. * _Unicode_ - Enable Unicode strings. If not specified, the default toolset behavior is used. * _Unsafe_ - Enable the use of unsafe code in .NET applications. +* _UseFullPaths_ - Enable absolute paths for `__FILE__`. * _WinMain_ - Use WinMain() as the entry point for Windows applications, rather than main(). **Note:** When not set, options will default to the tool default. @@ -779,12 +781,12 @@ project "MyProject" --- ### language(_lang_) -Sets the programming language used by a project. GENie currently supports C, C++, and C#. Not all languages are supported by all of the generators. For instance, SharpDevelop does not currently support C or C++ development, and Code::Blocks does not support the .NET languages (C#, managed C++). +Sets the programming language used by a project. GENie currently supports C, C++, C# and Vala. Not all languages are supported by all of the generators. For instance, SharpDevelop does not currently support C or C++ development, and Code::Blocks does not support the .NET languages (C#, managed C++). **Scope:** solutions, projects #### Arguments -_lang_ - language identifier string ("C", "C++", or "C#"). Case insensitive. +_lang_ - language identifier string ("C", "C++", "C#" or "Vala"). Case insensitive. #### Examples ```lua @@ -1276,6 +1278,32 @@ Table of values: [Back to top](#table-of-contents) +--- +### userincludedirs({_paths_...}) +Specifies the user include file search paths. Multiple calls are concatenated. + +For XCode, it maps to setting the USER INCLUDE SEARCH PATH. + +For clang/gcc, it maps to setting the include directory using the iquote option. + +On the other build systems, it behaves like [includedirs](#includedirspaths). + +**Scope:** solutions, projects, configurations + +#### Arguments +_paths_ - list of user include file search directories, relative to the currently-executing script file. + +#### Examples +Define two include file search paths +```lua +userincludedirs { "../lua/include", "../zlib" } +``` +You can also use [wildcards](#wildcards) to match multiple directories. +```lua +userincludedirs { "../includes/**" } +``` +[Back to top](#table-of-contents) + --- ### os.uuid() Returns a Universally Unique Identifier @@ -1397,7 +1425,7 @@ _path_ - path to check [Back to top](#table-of-contents) --- -### path.iscppfile(_path_) +### path.isSourceFile(_path_) Determines whether a file is a C++ source code file, based on extension. #### Arguments diff --git a/3rdparty/genie/makefile b/3rdparty/genie/makefile index f154dcd9b8e..e62bacb22da 100644 --- a/3rdparty/genie/makefile +++ b/3rdparty/genie/makefile @@ -31,12 +31,18 @@ SILENT?=@ $(GENIE): $(SILENT) $(MAKE) -C build/gmake.$(OS) -all: $(GENIE) +all: $(SILENT) $(GENIE) clean: $(SILENT) $(MAKE) -C build/gmake.$(OS) clean $(SILENT) -rm -rf bin +projgen: + $(SILENT) $(GENIE) --to=../build/gmake.windows --os=windows gmake + $(SILENT) $(GENIE) --to=../build/gmake.linux --os=linux gmake + $(SILENT) $(GENIE) --to=../build/gmake.darwin --os=macosx --platform=universal32 gmake + $(SILENT) $(GENIE) --to=../build/gmake.freebsd --os=bsd gmake + rebuild: $(SILENT) $(MAKE) -C build/gmake.$(OS) clean all @@ -47,7 +53,7 @@ release-windows release-darwin: $(GENIE) release-linux: $(GENIE) $(SILENT) $(GENIE) release - $(SILENT) $(MAKE) -C build/gmake.darwin clean all CC=x86_64-apple-darwin13-clang + $(SILENT) $(MAKE) -C build/gmake.darwin clean all CC=x86_64-apple-darwin15-clang $(SILENT) $(MAKE) -C build/gmake.linux clean all $(SILENT) $(MAKE) -C build/gmake.windows clean all CC=i686-w64-mingw32-gcc $(SILENT) git checkout src/host/version.h diff --git a/3rdparty/genie/scripts/release.lua b/3rdparty/genie/scripts/release.lua index 15267eb40a2..033f4f647c9 100644 --- a/3rdparty/genie/scripts/release.lua +++ b/3rdparty/genie/scripts/release.lua @@ -36,7 +36,7 @@ function dorelease() print("Generating project files...") - + exec("genie /to=../build/gmake.windows /os=windows gmake") exec("genie /to=../build/gmake.linux /os=linux gmake") exec("genie /to=../build/gmake.darwin /os=macosx /platform=universal32 gmake") diff --git a/3rdparty/genie/src/_manifest.lua b/3rdparty/genie/src/_manifest.lua index 7d5a8e95a23..15bae6090e4 100644 --- a/3rdparty/genie/src/_manifest.lua +++ b/3rdparty/genie/src/_manifest.lua @@ -33,9 +33,11 @@ "tools/msc.lua", "tools/ow.lua", "tools/snc.lua", + "tools/valac.lua", "base/validate.lua", "base/help.lua", "base/premake.lua", + "base/iter.lua", -- CodeBlocks action "actions/codeblocks/_codeblocks.lua", @@ -57,6 +59,7 @@ "actions/make/make_solution.lua", "actions/make/make_cpp.lua", "actions/make/make_csharp.lua", + "actions/make/make_vala.lua", -- Visual Studio actions "actions/vstudio/_vstudio.lua", @@ -87,4 +90,10 @@ "actions/fastbuild/_fastbuild.lua", "actions/fastbuild/fastbuild_project.lua", "actions/fastbuild/fastbuild_solution.lua", + + -- ninja action + "actions/ninja/_ninja.lua", + "actions/ninja/ninja_base.lua", + "actions/ninja/ninja_solution.lua", + "actions/ninja/ninja_cpp.lua", } diff --git a/3rdparty/genie/src/actions/codeblocks/codeblocks_cbp.lua b/3rdparty/genie/src/actions/codeblocks/codeblocks_cbp.lua index 6f31e29e613..84982fd1a85 100644 --- a/3rdparty/genie/src/actions/codeblocks/codeblocks_cbp.lua +++ b/3rdparty/genie/src/actions/codeblocks/codeblocks_cbp.lua @@ -88,6 +88,8 @@ _p(2,'') for _, platform in ipairs(platforms) do for cfg in premake.eachconfig(prj, platform) do + local includedirs = table.join(cfg.userincludedirs, cfg.includedirs) + _p(3,'', premake.esc(cfg.longname)) _p(4,'')\ncodeblocks.files(prj)\n_p(2,'')\n for _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\nif cfg.debugenvs and #cfg.debugenvs > 0 then\npremake.codeblocks.debugenvs(cfg)\nend\nend\nend\n_p(2,'')\n_p(1,'')\n_p('')\n_p('')\nend\n", + "ild>')\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\nlocal includedirs = table.join(cfg.userincludedirs, cfg.includedirs)\n_p(3,'', premake.esc(cfg.longname))\n_p(4,'')\nend\nend\n_p(2,'')\ncodeblocks.files(prj)\n_p(2,'')\n for _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\nif cfg.debugenvs and #cfg.debugenvs > 0 then\npremake.codeblocks.debugenvs(cfg)\nend\nend\nend\n_p(2,'')\n_p(1,'')\n_p('')\n_p('')\nend\n", /* actions/codelite/_codelite.lua */ "premake.codelite = { }\nnewaction {\ntrigger = \"codelite\",\nshortname = \"CodeLite\",\ndescription = \"Generate CodeLite project files\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.workspace\", premake.codelite.workspace)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.project\", premake.codelite.project)\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, \"%%.workspace\")\npremake.clean.file(sln, \"%%_wsp.mk\")\npremake.clean.file(sln, \"%%.tags\")\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, \"%%.project\")\npremake.clean.file(prj, \"%%.mk\")\npremake.clean.file(prj, \"%%.list\")\npremake.clean.file(prj, \"%%.out\")\nend\n}\n", @@ -187,10 +199,10 @@ const char* builtin_scripts[] = { /* actions/codelite/codelite_project.lua */ "local codelite = premake.codelite\nlocal tree = premake.tree\nfunction codelite.files(prj)\nlocal tr = premake.project.buildsourcetree(prj)\ntree.traverse(tr, {\nonbranchenter = function(node, depth)\n_p(depth, '', node.name)\nend,\nonbranchexit = function(node, depth)\n_p(depth, '')\nend,\nonleaf = function(node, depth)\n_p(depth, '', node.cfg.name)\nend,\n}, true, 1)\nend\nfunction premake.codelite.project(prj)\nio.indent = \" \"\n_p('')\n_p('', premake.esc(prj.name))\ncodelite.files(prj)\nlocal types = { \nConsoleApp = \"Executable\", \nWindowedApp = \"Executable\", \nStaticLib = \"Static Library\",\nSharedLib = \"Dynamic Library\",\n}\n_p(' ', types[prj.kind])\nlocal platforms = premake.filterplatforms(prj.solution, premake[_OPTIONS.cc].platforms, \"Native\")\nfor i = #platforms, 1, -1 do\nif premake.platforms[platforms[i]].iscrosscompiler " - "then\ntable.remove(platforms, i)\nend\nend \nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\nlocal name = premake.esc(cfg.longname):gsub(\"|\",\"_\")\nlocal compiler = iif(cfg.language == \"C\", \"gcc\", \"g++\")\n_p(' ', name, compiler, types[cfg.kind])\nlocal fname = premake.esc(cfg.buildtarget.fullpath)\nlocal objdir = premake.esc(cfg.objectsdir)\nlocal runcmd = cfg.buildtarget.name\nlocal rundir = cfg.debugdir or cfg.buildtarget.directory\nlocal runargs = table.concat(cfg.debugargs, \" \")\nlocal pause = iif(cfg.kind == \"WindowedApp\", \"no\", \"yes\")\n_p(' ', fname, objdir, runcmd, runargs, rundir, pause)\nlocal flags = premake.esc(table.join(premake.gcc.getcflags(cfg), premake.gcc.getcxxflags(cfg), cfg" - ".buildoptions))\n_p(' ', table.concat(flags, \";\"))\nfor _,v in ipairs(cfg.includedirs) do\n_p(' ', premake.esc(v))\nend\nfor _,v in ipairs(cfg.defines) do\n_p(' ', premake.esc(v))\nend\n_p(' ')\nflags = premake.esc(table.join(premake.gcc.getldflags(cfg), cfg.linkoptions))\n_p(' ', table.concat(flags, \";\"))\nfor _,v in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\n_p(' ', premake.esc(v))\nend\nfor _,v in ipairs(premake.getlinks(cfg, \"all\", \"basename\")) do\n_p(' ', premake.esc(v))\nend\n_p(' ')\nif premake.findfile(cfg, \".rc\") then\nlocal defines = table.implode(table.join(cfg.defines, cfg.resdefines), \"-D\", \";\", \"\")\nlocal options = table.concat(cfg.resoptions, \";\")\n_p(' '" - ", defines, options)\nfor _,v in ipairs(table.join(cfg.includedirs, cfg.resincludedirs)) do\n_p(' ', premake.esc(v))\nend\n_p(' ')\nelse\n_p(' ')\nend\nif #cfg.prebuildcommands > 0 then\n_p(' ')\nfor _,v in ipairs(cfg.prebuildcommands) do\n_p(' %s', premake.esc(v))\nend\n_p(' ')\nend\nif #cfg.postbuildcommands > 0 then\n_p(' ')\nfor _,v in ipairs(cfg.postbuildcommands) do\n_p(' %s', premake.esc(v))\nend\n_p(' ')\nend\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' None')\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' ')\nend\nend\n_p(' ')\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\n_p(' ', cfg.longname:gsub(\"|\",\"_\"))\nfor _,dep in ipairs(premake.getdependencies(prj)) do\n_p(' ', dep.name)\nend\n_p(' ')\nend\nend\n_p('')\nend\n", + "then\ntable.remove(platforms, i)\nend\nend \nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\nlocal name = premake.esc(cfg.longname):gsub(\"|\",\"_\")\nlocal compiler = iif(cfg.language == \"C\", \"gcc\", \"g++\")\n_p(' ', name, compiler, types[cfg.kind])\nlocal fname = premake.esc(cfg.buildtarget.fullpath)\nlocal objdir = premake.esc(cfg.objectsdir)\nlocal runcmd = cfg.buildtarget.name\nlocal rundir = cfg.debugdir or cfg.buildtarget.directory\nlocal runargs = table.concat(cfg.debugargs, \" \")\nlocal pause = iif(cfg.kind == \"WindowedApp\", \"no\", \"yes\")\nlocal includedirs = table.join(cfg.userincludedirs, cfg.includedirs)\n_p(' ', fname, objdir, runcmd, runargs, rundir, pause)\nlocal flags = premake.esc(ta" + "ble.join(premake.gcc.getcflags(cfg), premake.gcc.getcxxflags(cfg), cfg.buildoptions))\n_p(' ', table.concat(flags, \";\"))\nfor _,v in ipairs(includedirs) do\n_p(' ', premake.esc(v))\nend\nfor _,v in ipairs(cfg.defines) do\n_p(' ', premake.esc(v))\nend\n_p(' ')\nflags = premake.esc(table.join(premake.gcc.getldflags(cfg), cfg.linkoptions))\n_p(' ', table.concat(flags, \";\"))\nfor _,v in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\n_p(' ', premake.esc(v))\nend\nfor _,v in ipairs(premake.getlinks(cfg, \"all\", \"basename\")) do\n_p(' ', premake.esc(v))\nend\n_p(' ')\nif premake.findfile(cfg, \".rc\") then\nlocal defines = table.implode(table.join(cfg.defines, cfg.resdefines), \"-D\", \";\", \"\")\nlocal options = table.concat(cfg.resoptions, \";\"" + ")\n_p(' ', defines, options)\nfor _,v in ipairs(table.join(cfg.includedirs, cfg.resincludedirs)) do\n_p(' ', premake.esc(v))\nend\n_p(' ')\nelse\n_p(' ')\nend\nif #cfg.prebuildcommands > 0 then\n_p(' ')\nfor _,v in ipairs(cfg.prebuildcommands) do\n_p(' %s', premake.esc(v))\nend\n_p(' ')\nend\nif #cfg.postbuildcommands > 0 then\n_p(' ')\nfor _,v in ipairs(cfg.postbuildcommands) do\n_p(' %s', premake.esc(v))\nend\n_p(' ')\nend\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' None')\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' ')\n_p(' ')\nend\nend\n_p(' ')\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\n_p(' ', cfg.longname:gsub(\"|\",\"_\"))\nfor _,dep in ipairs(premake.getdependencies(prj)) do\n_p(' ', dep.name)\nend\n_p(' ')\nend\nend\n_p('')\nend\n", /* actions/cmake/_cmake.lua */ "premake.cmake = { }\nnewaction {\ntrigger = \"cmake\",\nshortname = \"CMake\",\ndescription = \"Generate CMake project files\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"CMakeLists.txt\", premake.cmake.workspace)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%/CMakeLists.txt\", premake.cmake.project)\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, \"CMakeLists.txt\")\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, \"%%/CMakeLists.txt\")\nend\n}\n", @@ -204,27 +216,27 @@ const char* builtin_scripts[] = { /* actions/make/_make.lua */ "_MAKE = { }\npremake.make = { }\nlocal make = premake.make\nfunction _MAKE.esc(value)\nlocal result\nif (type(value) == \"table\") then\nresult = { }\nfor _,v in ipairs(value) do\ntable.insert(result, _MAKE.esc(v))\nend\nreturn result\nelse\nresult = value:gsub(\"\\\\\", \"\\\\\\\\\")\nresult = result:gsub(\" \", \"\\\\ \")\nresult = result:gsub(\"%%(\", \"\\\\%(\")\nresult = result:gsub(\"%%)\", \"\\\\%)\")\nresult = result:gsub(\"$\\\\%((.-)\\\\%)\", \"$%(%1%)\")\nreturn result\nend\nend\nfunction premake.make_copyrule(source, target)\n_p('%s: %s', target, source)\n_p('\\t@echo Copying $(notdir %s)', target)\n_p('\\t-$(call COPY,%s,%s)', source, target)\nend\nfunction premake.make_mkdirrule(var)\n_p('\\t@echo Creating %s', var)\n_p('\\t-$(call MKDIR,%s)', var)\n_p('')\nend\nfunction make.list(value)\nif #value > 0 then\nreturn \" \" .. table.concat(value, \" \")\nelse\nreturn \"\"\nend\nend\nfunction _MAKE.getmakefilename(this, searchprjs)\nlocal count = 0\nfor sln in premake.solution.each() do\nif (sln.loca" - "tion == this.location) then count = count + 1 end\nif (searchprjs) then\nfor _,prj in ipairs(sln.projects) do\nif (prj.location == this.location) then count = count + 1 end\nend\nend\nend\nif (count == 1) then\nreturn \"Makefile\"\nelse\nreturn this.name .. \".make\"\nend\nend\nfunction _MAKE.getnames(tbl)\nlocal result = table.extract(tbl, \"name\")\nfor k,v in pairs(result) do\nresult[k] = _MAKE.esc(v)\nend\nreturn result\nend\nfunction make.settings(cfg, cc)\nif #cfg.makesettings > 0 then\nfor _, value in ipairs(cfg.makesettings) do\n_p(value)\nend\nend\nlocal toolsettings = cc.platforms[cfg.platform].cfgsettings\nif toolsettings then\n_p(toolsettings)\nend\nend\nnewaction {\ntrigger = \"gmake\",\nshortname = \"GNU Make\",\ndescription = \"Generate GNU makefiles for POSIX, MinGW, and Cygwin\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\" },\nvalid_languages = { \"C\", \"C++\", \"C#\" },\nvalid_tools = {\ncc = { \"gcc\", \"ghs\" },\ndotnet = { " - "\"mono\", \"msnet\", \"pnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, _MAKE.getmakefilename(sln, false), premake.make_solution)\nend,\nonproject = function(prj)\nlocal makefile = _MAKE.getmakefilename(prj, true)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, makefile, premake.make_csharp)\nelse\npremake.generate(prj, makefile, premake.make_cpp)\nend\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, _MAKE.getmakefilename(sln, false))\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, _MAKE.getmakefilename(prj, true))\nend\n}\n", + "tion == this.location) then count = count + 1 end\nif (searchprjs) then\nfor _,prj in ipairs(sln.projects) do\nif (prj.location == this.location) then count = count + 1 end\nend\nend\nend\nif (count == 1) then\nreturn \"Makefile\"\nelse\nreturn this.name .. \".make\"\nend\nend\nfunction _MAKE.getnames(tbl)\nlocal result = table.extract(tbl, \"name\")\nfor k,v in pairs(result) do\nresult[k] = _MAKE.esc(v)\nend\nreturn result\nend\nfunction make.settings(cfg, cc)\nif #cfg.makesettings > 0 then\nfor _, value in ipairs(cfg.makesettings) do\n_p(value)\nend\nend\nlocal toolsettings = cc.platforms[cfg.platform].cfgsettings\nif toolsettings then\n_p(toolsettings)\nend\nend\nnewaction {\ntrigger = \"gmake\",\nshortname = \"GNU Make\",\ndescription = \"Generate GNU makefiles for POSIX, MinGW, and Cygwin\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\" },\nvalid_languages = { \"C\", \"C++\", \"C#\", \"Vala\" },\nvalid_tools = {\ncc = { \"gcc\", \"ghs\" },\ndo" + "tnet = { \"mono\", \"msnet\", \"pnet\" },\nvalac = { \"valac\" },\n},\nonsolution = function(sln)\npremake.generate(sln, _MAKE.getmakefilename(sln, false), premake.make_solution)\nend,\nonproject = function(prj)\nlocal makefile = _MAKE.getmakefilename(prj, true)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, makefile, premake.make_csharp)\nelseif premake.iscppproject(prj) then\npremake.generate(prj, makefile, premake.make_cpp)\nelse\npremake.generate(prj, makefile, premake.make_vala)\nend\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, _MAKE.getmakefilename(sln, false))\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, _MAKE.getmakefilename(prj, true))\nend\n}\n", /* actions/make/make_solution.lua */ - "function premake.make_solution(sln)\nlocal cc = premake[_OPTIONS.cc]\nlocal platforms = premake.filterplatforms(sln, cc.platforms, \"Native\")\n_p('# %s solution makefile autogenerated by GENie', premake.action.current().shortname)\n_p('# Type \"make help\" for usage help')\n_p('')\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(sln.configurations[1], platforms[1], true)))\n_p('endif')\n_p('export config')\n_p('')\n_p('PROJECTS := %s', table.concat(_MAKE.esc(table.extract(sln.projects, \"name\")), \" \"))\n_p('')\n_p('.PHONY: all clean help $(PROJECTS)')\n_p('')\n_p('all: $(PROJECTS)')\n_p('')\nfor _, prj in ipairs(sln.projects) do\n_p('%s: %s', _MAKE.esc(prj.name), table.concat(_MAKE.esc(table.extract(premake.getdependencies(prj), \"name\")), \" \"))\nif (not sln.messageskip) or (not table.contains(sln.messageskip, \"SkipBuildingMessage\")) then\n_p('\\t@echo \"==== Building %s ($(config)) ====\"', prj.name)\nend\n_p('\\t@${MAKE} --no-print-directory -C %s -f %s', _MAKE.esc(path.getrel" - "ative(sln.location, prj.location)), _MAKE.esc(_MAKE.getmakefilename(prj, true)))\n_p('')\nend\n_p('clean:')\nfor _ ,prj in ipairs(sln.projects) do\n_p('\\t@${MAKE} --no-print-directory -C %s -f %s clean', _MAKE.esc(path.getrelative(sln.location, prj.location)), _MAKE.esc(_MAKE.getmakefilename(prj, true)))\nend\n_p('')\n_p('help:')\n_p(1,'@echo \"Usage: make [config=name] [target]\"')\n_p(1,'@echo \"\"')\n_p(1,'@echo \"CONFIGURATIONS:\"')\nlocal cfgpairs = { }\nfor _, platform in ipairs(platforms) do\nfor _, cfgname in ipairs(sln.configurations) do\n_p(1,'@echo \" %s\"', premake.getconfigname(cfgname, platform, true))\nend\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"TARGETS:\"')\n_p(1,'@echo \" all (default)\"')\n_p(1,'@echo \" clean\"')\nfor _, prj in ipairs(sln.projects) do\n_p(1,'@echo \" %s\"', prj.name)\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"For more information, see https://github.com/bkaradzic/genie\"')\nend\n", + "function premake.make_solution(sln)\nlocal cc = premake[_OPTIONS.cc]\nlocal platforms = premake.filterplatforms(sln, cc.platforms, \"Native\")\n_p('# %s solution makefile autogenerated by GENie', premake.action.current().shortname)\n_p('# Type \"make help\" for usage help')\n_p('')\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(sln.configurations[1], platforms[1], true)))\n_p('endif')\n_p('export config')\n_p('')\nlocal projects = table.extract(sln.projects, \"name\")\ntable.sort(projects)\n_p('PROJECTS := %s', table.concat(_MAKE.esc(projects), \" \"))\n_p('')\n_p('.PHONY: all clean help $(PROJECTS)')\n_p('')\n_p('all: $(PROJECTS)')\n_p('')\nfor _, prj in ipairs(sln.projects) do\n_p('%s: %s', _MAKE.esc(prj.name), table.concat(_MAKE.esc(table.extract(premake.getdependencies(prj), \"name\")), \" \"))\nif (not sln.messageskip) or (not table.contains(sln.messageskip, \"SkipBuildingMessage\")) then\n_p('\\t@echo \"==== Building %s ($(config)) ====\"', prj.name)\nend\n_p('\\t@${MAKE} --no-pr" + "int-directory -C %s -f %s', _MAKE.esc(path.getrelative(sln.location, prj.location)), _MAKE.esc(_MAKE.getmakefilename(prj, true)))\n_p('')\nend\n_p('clean:')\nfor _ ,prj in ipairs(sln.projects) do\n_p('\\t@${MAKE} --no-print-directory -C %s -f %s clean', _MAKE.esc(path.getrelative(sln.location, prj.location)), _MAKE.esc(_MAKE.getmakefilename(prj, true)))\nend\n_p('')\n_p('help:')\n_p(1,'@echo \"Usage: make [config=name] [target]\"')\n_p(1,'@echo \"\"')\n_p(1,'@echo \"CONFIGURATIONS:\"')\nlocal cfgpairs = { }\nfor _, platform in ipairs(platforms) do\nfor _, cfgname in ipairs(sln.configurations) do\n_p(1,'@echo \" %s\"', premake.getconfigname(cfgname, platform, true))\nend\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"TARGETS:\"')\n_p(1,'@echo \" all (default)\"')\n_p(1,'@echo \" clean\"')\nfor _, prj in ipairs(sln.projects) do\n_p(1,'@echo \" %s\"', prj.name)\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"For more information, see https://github.com/bkaradzic/genie\"')\nend\n", /* actions/make/make_cpp.lua */ - "premake.make.cpp = { }\npremake.make.override = { }\nlocal cpp = premake.make.cpp\nlocal make = premake.make\nfunction premake.make_cpp(prj)\nlocal cc = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\npremake.gmake_cpp_header(prj, cc, platforms)\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\npremake.gmake_cpp_config(prj, cfg, cc)\nend\nend\nlocal objdirs = {}\nlocal additionalobjdirs = {}\nfor _, file in ipairs(prj.files) do\nif path.isSourceFile(file) then\nobjdirs[_MAKE.esc(path.getdirectory(path.trimdots(file)))] = 1\nend\nend\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nadditionalobjdirs[_MAKE.esc(path.getdirectory(path.getrelative(prj.location,buildtask[2])))] = 1\nend\nend\n_p('OBJDIRS := \\\\')\n_p('\\t$(OBJDIR) \\\\')\nfor dir, _ in pairs(objdirs) do\n_p('\\t$(OBJDIR)/%s \\\\', dir)\nend\nfor dir, _ in pairs(additionalobjdirs) do" - "\n_p('\\t%s \\\\', dir)\nend\n_p('')\n_p('RESOURCES := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.isresourcefile(file) then\n_p('\\t$(OBJDIR)/%s.res \\\\', _MAKE.esc(path.getbasename(file)))\nend\nend\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" then\n_p('all: $(OBJDIRS) prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist | $(TARGETDIR)')\nelse\n_p('all: $(OBJDIRS) prebuild prelink $(TARGET) | $(TARGETDIR)')\nend\n_p('\\t@:')\n_p('')\nif (prj.kind == \"StaticLib\" and prj.options.ArchiveSplit) then\n_p('define max_args')\n_p('\\t$(eval _args:=)')\n_p('\\t$(foreach obj,$3,$(eval _args+=$(obj))$(if $(word $2,$(_args)),$1$(_args)$(EOL)$(eval _args:=)))')\n_p('\\t$(if $(_args),$1$(_args))')\n_p('endef')\n_p('')\n_p('define EOL')\n_p('')\n_p('')\n_p('endef')\n_p('')\nend\n_p('$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS)')\nif prj.kind == \"StaticLib\" then\nif pr" - "j.msgarchiving then\n_p('\\t@echo ' .. prj.msgarchiving)\nelse\n_p('\\t@echo Archiving %s', prj.name)\nend\nif (not prj.archivesplit_size) then\nprj.archivesplit_size=200\nend\nif (not prj.options.ArchiveSplit) then\n_p('\\t$(SILENT) $(LINKCMD) $(OBJECTS)' .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\nelse\n_p('\\t$(call RM,$(TARGET))')\n_p('\\t@$(call max_args,$(LINKCMD),'.. prj.archivesplit_size ..',$(OBJECTS))' .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\n_p('\\t$(SILENT) $(LINKCMD_NDX)')\nend\nelse\nif prj.msglinking then\n_p('\\t@echo ' .. prj.msglinking)\nelse\n_p('\\t@echo Linking %s', prj.name)\nend\n_p('\\t$(SILENT) $(LINKCMD)')\nend\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('$(OBJDIRS):')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCreatingMessage\")) then\n_p('\\t@echo Creating $(@)')\nend\n_p('\\t-$" - "(call MKDIR,$@)')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" then\n_p('$(dir $(TARGETDIR))PkgInfo:')\n_p('$(dir $(TARGETDIR))Info.plist:')\n_p('')\nend\n_p('clean:')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleaning %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\ncpp.pchrules(prj)\ncpp.fileRules(prj)\ncpp.dependencyRules(prj)\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal deps = string.format(\"%s \",path.getrelative(prj.locatio" - "n,buildtask[1]))\nfor _, depdata in ipairs(buildtask[3] or {}) do\ndeps = deps .. string.format(\"%s \",path.getrelative(prj.location,depdata))\nend\n_p('%s: %s | $(TARGETDIR) $(OBJDIRS)'\n,path.getrelative(prj.location,buildtask[2])\n, deps\n)\nfor _, cmdline in ipairs(buildtask[4] or {}) do\nlocal cmd = cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", \"$<\")\ncmd = string.gsub(cmd, \"%$%(@%)\", \"$@\")\n_p('\\t$(SILENT) %s',cmd)\nend\n_p('')\nend\nend\n_p('-include $(OBJECTS:%%.o=%%.d)')\n_p('ifneq (,$(PCH))')\n_p(' -include $(OBJDIR)/$(notdir $(PCH)).d')\n_p('endif')\nend\nfunction premake.gmake_cpp_header(prj, cc, platforms)\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], pl" - "atforms[1], true)))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(' RM= $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('CC = %s', cc.cc)\n_p('CXX = %s', cc.cxx)\n_p('AR = %s', cc.ar)\n_p('')\n_p('ifndef RESCOMP')\n_p(' ifdef WINDRES')\n_p(' RESCOMP = $(WINDRES)')\n_p(' else')\n_p(' " - " RESCOMP = windres')\n_p(' endif')\n_p('endif')\n_p('')\nend\nfunction premake.gmake_cpp_config(prj, cfg, cc)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\ncpp.platformtools(cfg, cc)\n_p(' ' .. (table.contains(premake.make.override,\"OBJDIR\") and \"override \" or \"\") .. 'OBJDIR = %s', _MAKE.esc(cfg.objectsdir))\n_p(' ' .. (table.contains(premake.make.override,\"TARGETDIR\") and \"override \" or \"\") .. 'TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))\n_p(' ' .. (table.contains(premake.make.override,\"TARGET\") and \"override \" or \"\") .. 'TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(cc.getdefines(cfg.defines)))\n_p(' INCLUDES +=%s', make.list(cc.getincludedirs(cfg.includedirs)))\ncpp.pchconfig(cfg)\ncpp.flags(cfg, cc)\ncpp.linker(prj, cfg, cc)\n_p(' OBJECTS := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.isSourceFile(file) then\nif not table.icontains(cfg.excludes, file) then\n_p('\\t$(OBJDIR)/%s.o \\\\'\n, _MAK" - "E.esc(path.trimdots(path.removeext(file)))\n)\nend\nend\nend\n_p('')\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\nmake.settings(cfg, cc)\n_p('endif')\n_p('')\nend\nfunction cpp.platformtools(cfg, cc)\nlocal platform = cc.platforms[cfg.platform]\nif platform.cc then\n_p(' CC = %s', platform.cc)\nend\nif platform.cxx then\n_p(' CXX = %s', platform.cxx)\nend\nif platform.ar then\n_p(' AR = %s', platform.ar)\nend\nend\nfunction cpp.flags(cf" - "g, cc)\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\nend\nif #cfg.forcedincludes > 0 then\n_p(' FORCE_INCLUDE += -include %s'\n,_MAKE.esc(table.concat(cfg.forcedincludes, \";\")))\nend\n_p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), \" \"))\n_p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\n_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n_p(' ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))\n_p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\n make.list(table.join(cc.getdefines(cfg.resdefines),\n cc.getincludedi" - "rs(cfg.resincludedirs), cfg.resoptions)))\nend\nfunction cpp.linker(prj, cfg, cc)\n_p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))\n_p(' LDDEPS +=%s', make.list(_MAKE.esc(premake.getlinks(cfg, \"siblings\", \"fullpath\"))))\n_p(' LIBS += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))\n_p(' EXTERNAL_LIBS +=%s', make.list(cc.getlibfiles(cfg)))\nif cfg.kind == \"StaticLib\" then\nif (not prj.options.ArchiveSplit) then\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\nelse\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\n_p(' LINKCMD_NDX= $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, true)))\nend\nelse\nlocal tool = iif(cfg.language == \"C\", \"CC\", \"CXX\")\n_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)\nend\nend\nfunction cpp.pchconfig(cfg)\nif not cfg.pchheader or cfg.flags.NoPC" - "H then\nreturn\nend\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak\nend\nend\n_p(' PCH = %s', _MAKE.esc(pch))\n_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')\nend\nfunction cpp.pchrules(prj)\n_p('ifneq (,$(PCH))')\n_p('$(GCH): $(PCH) | $(OBJDIR)')\nif prj.msgprecompile then\n_p('\\t@echo ' .. prj.msgprecompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nlocal cmd = iif(prj.language == \"C\", \"$(CC) $(ALL_CFLAGS) -x c-header\", \"$(CXX) $(ALL_CXXFLAGS) -x c++-header\")\n_p('\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \"$@\" -c \"$<\"', cmd)\n_p('endif')\n_p('')\nend\nfunction cpp.fileRules(prj)\nfor _, file in ipairs(prj.files or {}) do\nif path.isSourceFile(file) then\n_p('$(OBJDIR)/%s.o: %s $(GCH)'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n, _MAKE.esc(file)\n)\nif (pat" - "h.isobjcfile(file) and prj.msgcompile_objc) then\n_p('\\t@echo ' .. prj.msgcompile_objc)\nelseif prj.msgcompile then\n_p('\\t@echo ' .. prj.msgcompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nif (path.isobjcfile(file)) then\n_p('\\t$(SILENT) $(CXX) $(ALL_OBJCFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"')\nelse\ncpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, \"o\")\nend\nfor _, task in ipairs(prj.postcompiletasks or {}) do\n_p('\\t$(SILENT) %s', task)\n_p('')\nend\n_p('')\nelseif (path.getextension(file) == \".rc\") then\n_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\nif prj.msgresource then\n_p('\\t@echo ' .. prj.msgresource)\nelse\n_p('\\t@echo $(notdir $<)')\nend\n_p('\\t$(SILENT) $(RESCOMP) $< -O coff -o \"$@\" $(ALL_RESFLAGS)')\n_p('')\nend\nend\nend\nfunction cpp.dependencyRules(prj)\nfor _, dependency in ipairs(prj.dependency or {}) do\nfor _, dep in ipairs(dependency or {}) do\nif (dep[3]==nil or dep[3]==false) then\n_p('$(OBJDIR)/%s.o: %s'\n, _MAKE.es" - "c(path.trimdots(path.removeext(path.getrelative(prj.location, dep[1]))))\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nelse\n_p('%s: %s'\n, _MAKE.esc(dep[1])\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nend\n_p('')\nend\nend\nend\nfunction cpp.buildcommand(iscfile, objext)\nlocal flags = iif(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')\n_p('\\t$(SILENT) %s $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"', flags, objext)\nend\n", + "premake.make.cpp = { }\npremake.make.override = { }\nlocal cpp = premake.make.cpp\nlocal make = premake.make\nfunction premake.make_cpp(prj)\nlocal cc = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\npremake.gmake_cpp_header(prj, cc, platforms)\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\npremake.gmake_cpp_config(prj, cfg, cc)\nend\nend\ntable.sort(prj.files)\nlocal objdirs = {}\nlocal additionalobjdirs = {}\nfor _, file in ipairs(prj.files) do\nif path.isSourceFile(file) then\nobjdirs[_MAKE.esc(path.getdirectory(path.trimdots(file)))] = 1\nend\nend\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nadditionalobjdirs[_MAKE.esc(path.getdirectory(path.getrelative(prj.location,buildtask[2])))] = 1\nend\nend\n_p('OBJDIRS := \\\\')\n_p('\\t$(OBJDIR) \\\\')\nfor dir, _ in iter.sortByKeys(objdirs) do\n_p('\\t$(OBJDIR)/%s \\\\', dir)\nend\nfor dir, " + "_ in iter.sortByKeys(additionalobjdirs) do\n_p('\\t%s \\\\', dir)\nend\n_p('')\n_p('RESOURCES := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.isresourcefile(file) then\n_p('\\t$(OBJDIR)/%s.res \\\\', _MAKE.esc(path.getbasename(file)))\nend\nend\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" then\n_p('all: $(OBJDIRS) prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist | $(TARGETDIR)')\nelse\n_p('all: $(OBJDIRS) prebuild prelink $(TARGET) | $(TARGETDIR)')\nend\n_p('\\t@:')\n_p('')\nif (prj.kind == \"StaticLib\" and prj.options.ArchiveSplit) then\n_p('define max_args')\n_p('\\t$(eval _args:=)')\n_p('\\t$(foreach obj,$3,$(eval _args+=$(obj))$(if $(word $2,$(_args)),$1$(_args)$(EOL)$(eval _args:=)))')\n_p('\\t$(if $(_args),$1$(_args))')\n_p('endef')\n_p('')\n_p('define EOL')\n_p('')\n_p('')\n_p('endef')\n_p('')\nend\n_p('$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS)')" + "\nif prj.kind == \"StaticLib\" then\nif prj.msgarchiving then\n_p('\\t@echo ' .. prj.msgarchiving)\nelse\n_p('\\t@echo Archiving %s', prj.name)\nend\nif (not prj.archivesplit_size) then\nprj.archivesplit_size=200\nend\nif (not prj.options.ArchiveSplit) then\n_p('\\t$(SILENT) $(LINKCMD) $(OBJECTS)' .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\nelse\n_p('\\t$(call RM,$(TARGET))')\n_p('\\t@$(call max_args,$(LINKCMD),'.. prj.archivesplit_size ..',$(OBJECTS))' .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\n_p('\\t$(SILENT) $(LINKCMD_NDX)')\nend\nelse\nif prj.msglinking then\n_p('\\t@echo ' .. prj.msglinking)\nelse\n_p('\\t@echo Linking %s', prj.name)\nend\n_p('\\t$(SILENT) $(LINKCMD)')\nend\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('$(OBJDIRS):')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCreatingMessage\")) then\n_p" + "('\\t@echo Creating $(@)')\nend\n_p('\\t-$(call MKDIR,$@)')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" then\n_p('$(dir $(TARGETDIR))PkgInfo:')\n_p('$(dir $(TARGETDIR))Info.plist:')\n_p('')\nend\n_p('clean:')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleaning %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\ncpp.pchrules(prj)\ncpp.fileRules(prj)\ncpp.dependencyRules(prj)\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal deps = string.f" + "ormat(\"%s \",path.getrelative(prj.location,buildtask[1]))\nfor _, depdata in ipairs(buildtask[3] or {}) do\ndeps = deps .. string.format(\"%s \",path.getrelative(prj.location,depdata))\nend\n_p('%s: %s | $(TARGETDIR) $(OBJDIRS)'\n,path.getrelative(prj.location,buildtask[2])\n, deps\n)\nfor _, cmdline in ipairs(buildtask[4] or {}) do\nlocal cmd = cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", \"$<\")\ncmd = string.gsub(cmd, \"%$%(@%)\", \"$@\")\n_p('\\t$(SILENT) %s',cmd)\nend\n_p('')\nend\nend\n_p('-include $(OBJECTS:%%.o=%%.d)')\n_p('ifneq (,$(PCH))')\n_p(' -include $(OBJDIR)/$(notdir $(PCH)).d')\n_p('endif')\nend\nfunction premake.gmake_cpp_header(prj, cc, platforms)\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getcon" + "figname(prj.solution.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(' RM = $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('CC = %s', cc.cc)\n_p('CXX = %s', cc.cxx)\n_p('AR = %s', cc.ar)\n_p('')\n_p('ifndef RESCOMP')\n_p(' ifdef WINDRES')\n_p(' " + " RESCOMP = $(WINDRES)')\n_p(' else')\n_p(' RESCOMP = windres')\n_p(' endif')\n_p('endif')\n_p('')\nend\nfunction premake.gmake_cpp_config(prj, cfg, cc)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\ncpp.platformtools(cfg, cc)\n_p(' ' .. (table.contains(premake.make.override,\"OBJDIR\") and \"override \" or \"\") .. 'OBJDIR = %s', _MAKE.esc(cfg.objectsdir))\n_p(' ' .. (table.contains(premake.make.override,\"TARGETDIR\") and \"override \" or \"\") .. 'TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))\n_p(' ' .. (table.contains(premake.make.override,\"TARGET\") and \"override \" or \"\") .. 'TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(cc.getdefines(cfg.defines)))\n_p(' INCLUDES +=%s', make.list(cc.getincludedirs(cfg.includedirs)))\n_p(' INCLUDES +=%s', make.list(cc.getquoteincludedirs(cfg.userincludedirs)))\ncpp.pchconfig(cfg)\ncpp.flags(cfg, cc)\ncpp.linker(prj, cfg, cc)\ntable.sort(prj.files)\n_p(' " + "OBJECTS := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.isSourceFile(file) then\nif not table.icontains(cfg.excludes, file) then\n_p('\\t$(OBJDIR)/%s.o \\\\'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n)\nend\nend\nend\n_p('')\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\nmake.settings(cfg, cc)\n_p('endif')\n_p('')\nend\nfunction cpp.platformtools(cfg, cc)\nlocal platform = cc.platforms[cfg.platform]\nif platform.cc then\n_p(' CC = %s', pl" + "atform.cc)\nend\nif platform.cxx then\n_p(' CXX = %s', platform.cxx)\nend\nif platform.ar then\n_p(' AR = %s', platform.ar)\nend\nend\nfunction cpp.flags(cfg, cc)\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\nend\nif #cfg.forcedincludes > 0 then\n_p(' FORCE_INCLUDE += -include %s'\n,_MAKE.esc(table.concat(cfg.forcedincludes, \";\")))\nend\n_p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), \" \"))\n_p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\n_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n_p(' ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))" + "\n_p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\n make.list(table.join(cc.getdefines(cfg.resdefines),\n cc.getincludedirs(cfg.resincludedirs), cfg.resoptions)))\nend\nfunction cpp.linker(prj, cfg, cc)\n_p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))\n_p(' LDDEPS +=%s', make.list(_MAKE.esc(premake.getlinks(cfg, \"siblings\", \"fullpath\"))))\n_p(' LIBS += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))\n_p(' EXTERNAL_LIBS +=%s', make.list(cc.getlibfiles(cfg)))\nif cfg.kind == \"StaticLib\" then\nif (not prj.options.ArchiveSplit) then\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\nelse\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\n_p(' LINKCMD_NDX = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, true)))\nend\nelse\nlocal tool = iif(cfg.language == \"C\", \"CC" + "\", \"CXX\")\n_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)\nend\nend\nfunction cpp.pchconfig(cfg)\nif not cfg.pchheader or cfg.flags.NoPCH then\nreturn\nend\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak\nend\nend\n_p(' PCH = %s', _MAKE.esc(pch))\n_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')\nend\nfunction cpp.pchrules(prj)\n_p('ifneq (,$(PCH))')\n_p('$(GCH): $(PCH) | $(OBJDIR)')\nif prj.msgprecompile then\n_p('\\t@echo ' .. prj.msgprecompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nlocal cmd = iif(prj.language == \"C\", \"$(CC) $(ALL_CFLAGS) -x c-header\", \"$(CXX) $(ALL_CXXFLAGS) -x c++-header\")\n_p('\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \"$@\" -c \"$<\"', cmd)\n_p('endif')\n_p('')\nend\nfunction cp" + "p.fileRules(prj)\ntable.sort(prj.files)\nfor _, file in ipairs(prj.files or {}) do\nif path.isSourceFile(file) then\n_p('$(OBJDIR)/%s.o: %s $(GCH) %s'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n, _MAKE.esc(file)\n, _MAKE.getmakefilename(prj, true)\n)\nif (path.isobjcfile(file) and prj.msgcompile_objc) then\n_p('\\t@echo ' .. prj.msgcompile_objc)\nelseif prj.msgcompile then\n_p('\\t@echo ' .. prj.msgcompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nif (path.isobjcfile(file)) then\n_p('\\t$(SILENT) $(CXX) $(ALL_OBJCFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"')\nelse\ncpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, \"o\")\nend\nfor _, task in ipairs(prj.postcompiletasks or {}) do\n_p('\\t$(SILENT) %s', task)\n_p('')\nend\n_p('')\nelseif (path.getextension(file) == \".rc\") then\n_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\nif prj.msgresource then\n_p('\\t@echo ' .. prj.msgresource)\nelse\n_p('\\t@echo $(notdir $<)')\nend\n_p('\\t$(SILENT) $(RESCOMP) $< " + "-O coff -o \"$@\" $(ALL_RESFLAGS)')\n_p('')\nend\nend\nend\nfunction cpp.dependencyRules(prj)\nfor _, dependency in ipairs(prj.dependency or {}) do\nfor _, dep in ipairs(dependency or {}) do\nif (dep[3]==nil or dep[3]==false) then\n_p('$(OBJDIR)/%s.o: %s'\n, _MAKE.esc(path.trimdots(path.removeext(path.getrelative(prj.location, dep[1]))))\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nelse\n_p('%s: %s'\n, _MAKE.esc(dep[1])\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nend\n_p('')\nend\nend\nend\nfunction cpp.buildcommand(iscfile, objext)\nlocal flags = iif(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')\n_p('\\t$(SILENT) %s $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"', flags, objext)\nend\n", /* actions/make/make_csharp.lua */ "local function getresourcefilename(cfg, fname)\nif path.getextension(fname) == \".resx\" then\n local name = cfg.buildtarget.basename .. \".\"\n local dir = path.getdirectory(fname)\n if dir ~= \".\" then \nname = name .. path.translate(dir, \".\") .. \".\"\nend\nreturn \"$(OBJDIR)/\" .. _MAKE.esc(name .. path.getbasename(fname)) .. \".resources\"\nelse\nreturn fname\nend\nend\nfunction premake.make_csharp(prj)\nlocal csc = premake.dotnet\nlocal cfglibs = { }\nlocal cfgpairs = { }\nlocal anycfg\nfor cfg in premake.eachconfig(prj) do\nanycfg = cfg\ncfglibs[cfg] = premake.getlinks(cfg, \"siblings\", \"fullpath\")\ncfgpairs[cfg] = { }\nfor _, fname in ipairs(cfglibs[cfg]) do\nif path.getdirectory(fname) ~= cfg.buildtarget.directory then\ncfgpairs[cfg][\"$(TARGETDIR)/\" .. _MAKE.esc(path.getname(fname))] = _MAKE.esc(fname)\nend\nend\nend\nlocal sources = {}\nlocal embedded = { }\nlocal copypairs = { }\nfor fcfg in premake.project.eachfile(prj) do\nlocal action = csc.getbuildaction(fcfg)\nif action == \"Co" @@ -236,6 +248,12 @@ const char* builtin_scripts[] = { "\n_p('%s: %s', getresourcefilename(prj, fname), _MAKE.esc(fname))\n_p('\\t$(SILENT) $(RESGEN) $^ $@')\nend\n_p('')\nend\nend\nfunction premake.gmake_cs_config(cfg, csc, cfglibs)\n_p('ifneq (,$(findstring %s,$(config)))', _MAKE.esc(cfg.name:lower()))\n_p(' TARGETDIR := %s', _MAKE.esc(cfg.buildtarget.directory))\n_p(' OBJDIR := %s', _MAKE.esc(cfg.objectsdir))\n_p(' DEPENDS := %s', table.concat(_MAKE.esc(premake.getlinks(cfg, \"dependencies\", \"fullpath\")), \" \"))\n_p(' REFERENCES := %s', table.implode(_MAKE.esc(cfglibs[cfg]), \"/r:\", \"\", \" \"))\n_p(' FLAGS += %s %s', table.implode(cfg.defines, \"/d:\", \"\", \" \"), table.concat(table.join(csc.getflags(cfg), cfg.buildoptions), \" \"))\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p" "('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p('endif')\n_p('')\nend\n", + /* actions/make/make_vala.lua */ + "local make = premake.make\nfunction premake.make_vala(prj)\nlocal valac = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, valac.platforms, \"Native\")\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(' RM = $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || e" + "xit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('VALAC = %s', valac.valac)\n_p('CC = %s', valac.cc)\n_p('')\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\npremake.gmake_valac_config(prj, cfg, valac)\nend\nend\n_p('SOURCES := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.isSourceFile(file) then\nif not table.icontains(prj.excludes, file) then\n_p('\\t%s \\\\', _MAKE.esc(file))\nend\nend\nend\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\n_p('$(TARGET): $(SOURCES) | $(TARGETDIR)')\n_p('\\t$(SILENT) $(VALAC) -o $(TARGET) --cc=$(CC) $(FLAGS) $(SOURCES)')\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('clean:')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleanin" + "g %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\nend\nfunction premake.gmake_valac_config(prj, cfg, valac)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\n_p(' TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))\n_p(' TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(valac.getdefines(cfg.defines)))\n_p(' PKGS +=%s', make.list(valac.getlinks(cfg.links)))\n_p(' FLAGS += $(DEFINES) $(PKGS)%s', make.list(table.join(valac.getvalaflags(cfg), valac.getbuildoptions(cfg.buildoptions), valac.getbuildoptions(cfg.buildoptions_c))))\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands," + " \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p('endif')\n_p('')\nend\n", + /* actions/vstudio/_vstudio.lua */ "premake.vstudio = { }\nlocal toolsets = {\nvs2010 = \"v100\",\nvs2012 = \"v110\",\nvs2013 = \"v120\",\nvs2015 = \"v140\",\nvs15 = \"v140\",\n}\npremake.vstudio.toolset = toolsets[_ACTION] or \"unknown?\"\npremake.vstudio.splashpath = ''\nlocal vstudio = premake.vstudio\nvstudio.platforms = {\nany = \"Any CPU\",\nmixed = \"Mixed Platforms\",\nNative = \"Win32\",\nx86 = \"x86\",\nx32 = \"Win32\",\nx64 = \"x64\",\nPS3 = \"PS3\",\nXbox360 = \"Xbox 360\",\nARM = \"ARM\",\nOrbis= \"Orbis\",\nDurango = \"Durango\",\n}\nfunction vstudio.arch(prj)\nif (prj.language == \"C#\") then\nreturn \"Any CPU\"\nelse\nreturn \"Win32\"\nend\nend\nfunction vstudio.iswinrt()\nreturn vstudio.storeapp ~= nil and vstudio.storeapp ~= ''\nend\nfunction vstudio.buildconfigs(sln)\nlocal cfgs = { }\nlocal platforms = premake.filterplatforms(sln, vstudio.platforms, \"Native\")\nlocal hascpp = premake.hascppproject(sln)\nlocal hasdotnet = premake.hasdotnetproject(sln)\nif hasdotnet and (_ACTION > \"vs2008\" or " "hascpp) then\ntable.insert(platforms, 1, \"mixed\")\nend\nif hasdotnet and (_ACTION < \"vs2010\" or not hascpp) then\ntable.insert(platforms, 1, \"any\")\nend\nif _ACTION > \"vs2008\" then\nlocal platforms2010 = { }\nfor _, platform in ipairs(platforms) do\nif vstudio.platforms[platform] == \"Win32\" then\nif hascpp then\ntable.insert(platforms2010, platform)\nend\nif hasdotnet then\ntable.insert(platforms2010, \"x86\")\nend\nelse\ntable.insert(platforms2010, platform)\nend\nend\nplatforms = platforms2010\nend\nfor _, buildcfg in ipairs(sln.configurations) do\nfor _, platform in ipairs(platforms) do\nlocal entry = { }\nentry.src_buildcfg = buildcfg\nentry.src_platform = platform\nif platform ~= \"PS3\" or _ACTION > \"vs2008\" then\nentry.buildcfg = buildcfg\nentry.platform = vstudio.platforms[platform]\nelse\nentry.buildcfg = platform .. \" \" .. buildcfg\nentry.platform = \"Win32\"\nend\nentry.name = entry.buildcfg .. \"|\" .. entry.platform\nentry.isreal = (platform ~= \"any\" and platform ~= \"mixed\")\ntab" @@ -249,24 +267,24 @@ const char* builtin_scripts[] = { "d\n_p(3,'ConfigurationType=\"%s\"', cfgtype)\nif (cfg.flags.MFC) then\n_p(3, 'UseOfMFC=\"%d\"', iif(cfg.flags.StaticRuntime, 1, 2))\nend\nif (cfg.flags.ATL or cfg.flags.StaticATL) then\n_p(3, 'UseOfATL=\"%d\"', iif(cfg.flags.StaticATL, 1, 2))\nend\n_p(3,'CharacterSet=\"%s\"', iif(cfg.flags.Unicode, 1, 2))\nif cfg.flags.Managed then\n_p(3,'ManagedExtensions=\"1\"')\nend\n_p(3,'>')\nend\nfunction vc200x.Files(prj)\nlocal tr = premake.project.buildsourcetree(prj)\ntree.traverse(tr, {\nonbranchenter = function(node, depth)\n_p(depth, '')\nend,\nonbranchexit = function(node, depth)\n_p(depth, '')\nend,\nonleaf = function(node, depth)\nlocal fname = node.cfg.name\n_p(depth, '')\ndepth = depth + 1\nlocal excluded = table.icontains(prj.excludes, fname)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nif cfginfo.i" "sreal then\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nlocal usePCH = (not prj.flags.NoPCH and prj.pchsource == node.cfg.name)\nlocal isSourceCode = path.isSourceFile(fname)\nlocal needsCompileAs = (path.iscfile(fname) ~= premake.project.iscproject(prj))\nif usePCH or isSourceCode then\n_p(depth, '')\n_p(depth, '\\t')\n_p(depth, '')\nend\nend\nend\ndepth = depth - 1\n_p(depth, '')\nend,\n}, false, 2)\nend\nfunction vc200x.Platforms(prj)\nlocal used = { }\n_p(1,'')\nfor _, cfg in ipairs(prj.solution.vstudio_configs) do\nif cfg.isreal and not table.contains(used, cfg.platform) then\ntable.insert(used, cfg.platform)\n_p(2,'')\nend\nend\n_p(1,'')\nend\nfunction vc200x.Symbols(cfg)\nif (not cfg.flags.Symbols) then\nreturn 0\nelse\nif cfg.flags.NoEditAndContinue or\n vc200x.optimization(cfg) ~= 0 or\n cfg.flags.Managed or\n cfg.platform == \"x64\" then\nreturn 3\nelse\nreturn 4\nend\nend\nend\nfun" - "ction vc200x.VCCLCompilerTool(cfg)\n_p(3,' 0 then\n_p(4,'AdditionalOptions=\"%s /MP\"', table.concat(premake.esc(cfg.buildoptions), \" \"))\nend\n_p(4,'Optimization=\"%s\"', vc200x.optimization(cfg))\nif cfg.flags.NoFramePointer then\n_p(4,'OmitFramePointers=\"%s\"', bool(true))\nend\nif #cfg.includedirs > 0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"', premake.esc(path.translate(table.concat(cfg.includedirs, \";\"), '\\\\')))\nend\nif #cfg.defines > 0 then\n_p(4,'PreprocessorDefinitions=\"%s\"', premake.esc(table.concat(cfg.defines, \";\")))\nend\nif premake.config.isdebugbuild(cfg) and cfg.flags.EnableMinimalRebuild and not cfg.flags.Managed then\n_p(4,'MinimalRebuild=\"%s\"', bool(true))\nend\nif cfg.flags.NoExceptions then\n_p(4,'ExceptionHandling=\"0\"')\nelseif cfg.flags.SEH then\n_p(4,'Exceptio" - "nHandling=\"2\"')\nend\nif vc200x.optimization(cfg) == 0 and not cfg.flags.Managed then\n_p(4,'BasicRuntimeChecks=\"3\"')\nend\nif vc200x.optimization(cfg) ~= 0 then\n_p(4,'StringPooling=\"%s\"', bool(true))\nend\nlocal runtime\nif premake.config.isdebugbuild(cfg) then\nruntime = iif(cfg.flags.StaticRuntime, 1, 3)\nelse\nruntime = iif(cfg.flags.StaticRuntime, 0, 2)\nend\n_p(4,'RuntimeLibrary=\"%s\"', runtime)\n_p(4,'EnableFunctionLevelLinking=\"%s\"', bool(true))\nif cfg.platform ~= \"Xbox360\" and cfg.platform ~= \"x64\" and cfg.platform ~= \"Durango\" then\nif cfg.flags.EnableSSE then\n_p(4,'EnableEnhancedInstructionSet=\"1\"')\nelseif cfg.flags.EnableSSE2 then\n_p(4,'EnableEnhancedInstructionSet=\"2\"')\nend\nend\nif cfg.flags.FloatFast then\n_p(4,'FloatingPointModel=\"2\"')\nelseif cfg.flags.FloatStrict then\n_p(4,'FloatingPointModel=\"1\"')\nend\nif cfg.flags.NoRTTI and not cfg.flags.Managed then\n_p(4,'RuntimeTypeInfo=\"%s\"', bool(false))\nend\nif cfg.flags.FastCall then\n_p(4,'CallingConvention=\"1\"')" - "\nelseif cfg.flags.StdCall then\n_p(4,'CallingConvention=\"2\"')\nend\nif cfg.flags.NativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"', bool(true))\nelseif cfg.flags.NoNativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"', bool(false))\nend\nif not cfg.flags.NoPCH and cfg.pchheader then\n_p(4,'UsePrecompiledHeader=\"2\"')\n_p(4,'PrecompiledHeaderThrough=\"%s\"', cfg.pchheader)\nelse\n_p(4,'UsePrecompiledHeader=\"%s\"', iif(cfg.flags.NoPCH, 0, 2))\nend\nif cfg.flags.ExtraWarnings then\n_p(4,'WarningLevel=\"%s\"', 4)\nelseif cfg.flags.MinimumWarnings then\n_p(4,'WarningLevel=\"%s\"', 1)\nelse\n_p(4,'WarningLevel=\"%s\"', 3)\nend\nif cfg.flags.FatalWarnings then\n_p(4,'WarnAsError=\"%s\"', bool(true))\nend\nif _ACTION < \"vs2008\" and not cfg.flags.Managed then\n_p(4,'Detect64BitPortabilityProblems=\"%s\"', bool(not cfg.flags.No64BitChecks))\nend\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"', path.getbasename(cfg.buildtarget.name))\n_p(4,'DebugInformationFormat=\"%s\"', vc200x.Symbols(cfg))\n" - "if cfg.language == \"C\" then\n_p(4, 'CompileAs=\"1\"')\nend\n_p(3,'/>')\nend\nfunction vc200x.VCLinkerTool(cfg)\n_p(3,' 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.linkoptions), \" \"))\nend\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\n_p(4,'LinkIncremental=\"%s\"',\niif(premake.config.isincrementallink(cfg) , 2, 1))\n_p(4,'AdditionalLibraryDirectories=\"%s\"', table.concat(premake.esc(path.translate(cfg.libdirs, '\\\\')) , \";\"))\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\n_p(4,'ModuleDefinitionFile=\"%s\"', deffile)\nend\nif cfg.flags.NoManifest then\n_p(4,'GenerateMan" - "ifest=\"%s\"', bool(false))\nend\n_p(4,'GenerateDebugInformation=\"%s\"', bool(vc200x.Symbols(cfg) ~= 0))\nif vc200x.Symbols(cfg) ~= 0 then\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"', path.getbasename(cfg.buildtarget.name))\nend\n_p(4,'SubSystem=\"%s\"', iif(cfg.kind == \"ConsoleApp\", 1, 2))\nif vc200x.optimization(cfg) ~= 0 then\n_p(4,'OptimizeReferences=\"2\"')\n_p(4,'EnableCOMDATFolding=\"2\"')\nend\nif (cfg.kind == \"ConsoleApp\" or cfg.kind == \"WindowedApp\") and not cfg.flags.WinMain then\n_p(4,'EntryPointSymbol=\"mainCRTStartup\"')\nend\nif cfg.kind == \"SharedLib\" then\nlocal implibname = cfg.linktarget.fullpath\n_p(4,'ImportLibrary=\"%s\"', iif(cfg.flags.NoImportLib, cfg.objectsdir .. \"\\\\\" .. path.getname(implibname), implibname))\nend\n_p(4,'TargetMachine=\"%d\"', iif(cfg.platform == \"x64\", 17, 1))\nelse\n_p(4,'Name=\"VCLibrarianTool\"')\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'O" - "utputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\nif #cfg.libdirs > 0 then\n_p(4,'AdditionalLibraryDirectories=\"%s\"', premake.esc(path.translate(table.concat(cfg.libdirs , \";\"))))\nend\nlocal addlOptions = {}\nif cfg.platform == \"x32\" then\ntable.insert(addlOptions, \"/MACHINE:X86\")\nelseif cfg.platform == \"x64\" then\ntable.insert(addlOptions, \"/MACHINE:X64\")\nend\naddlOptions = table.join(addlOptions, cfg.linkoptions)\nif #addlOptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(addlOptions), \" \"))\nend\nend\n_p(3,'/>')\nend\nfunction vc200x.VCCLCompilerTool_PS3(cfg)\n_p(3,' 0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"', premake.esc(path.translate(table.concat(cfg.includedirs, \";\"), '\\\\')))\nend\nif #cfg.defines > 0 then\n_p(4,'PreprocessorDefinitions=\"%s\"', table.concat(premake.esc(cfg.defines), \";\"))\nend\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"', path.getbasename(cfg.buildtarget.name))\n_p(4,'DebugInformationFormat=\"0\"')\n_p(4,'CompileAs=\"0\"')\n_p(3,'/>')\nend\nfunction vc200x.VCLinkerTool_PS3(cfg)\n_p(3,' 0 then\n_p(4,'AdditionalOptions=\"%s\"', premake.esc(table.concat(buildoptions, \" \")))\nend\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \")" - ")\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\n_p(4,'LinkIncremental=\"0\"')\n_p(4,'AdditionalLibraryDirectories=\"%s\"', table.concat(premake.esc(path.translate(cfg.libdirs, '\\\\')) , \";\"))\n_p(4,'GenerateManifest=\"%s\"', bool(false))\n_p(4,'ProgramDatabaseFile=\"\"')\n_p(4,'RandomizedBaseAddress=\"1\"')\n_p(4,'DataExecutionPrevention=\"0\"')\nelse\n_p(4,'Name=\"VCLibrarianTool\"')\nlocal buildoptions = table.join(premake.snc.getldflags(cfg), cfg.linkoptions)\nif #buildoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', premake.esc(table.concat(buildoptions, \" \")))\nend\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\nif #cfg.libdirs > 0 then\n_p(4,'AdditionalLibraryDirectories=\"%s\"', premake.esc(path.translate(table.concat(cfg.libdirs , \";\"))))\nend\nend\n_p(3,'/>')\nend\nfunction vc200x.VCResourceCompilerTool(cfg)\n_p(3,' 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.resoptions), \" \"))\nend\nif #cfg.defines > 0 or #cfg.resdefines > 0 then\n_p(4,'PreprocessorDefinitions=\"%s\"', table.concat(premake.esc(table.join(cfg.defines, cfg.resdefines)), \";\"))\nend\nif #cfg.includedirs > 0 or #cfg.resincludedirs > 0 then\nlocal dirs = table.join(cfg.includedirs, cfg.resincludedirs)\n_p(4,'AdditionalIncludeDirectories=\"%s\"', premake.esc(path.translate(table.concat(dirs, \";\"), '\\\\')))\nend\n_p(3,'/>')\nend\nfunction vc200x.VCManifestTool(cfg)\nlocal manifests = { }\nfor _, fname in ipairs(cfg.files) do\nif path.getextension(fname) == \".manifest\" then\ntable.insert(manifests, fname)\nend\nend\n_p(3,' 0 then\n_p(4,'AdditionalManifestFiles=\"%s\"', premake.esc(table.concat(manifests, \";\")))\nend\n_p(3,'/>')\nend\nfunction vc200x.VCMIDLTool(cfg)\n_p(3,'')\nend\nfunction vc200x.buildstepsblock(name, steps)\n_p(3,' 0 then\n_p(4,'CommandLine=\"%s\"', premake.esc(table.implode(steps, \"\", \"\", \"\\r\\n\")))\nend\n_p(3,'/>')\nend\nlocal blockmap =\n{\nVCCLCompilerTool = vc200x.VCCLCompilerTool,\nVCCLCompilerTool_PS3 = vc200x.VCCLCompilerTool_PS3,\nVCLinkerTool = vc200x.VCLinkerTool,\nVCLinkerTool_PS3 = vc200x.VCLinkerTool_PS3,\nVCManifestTool = vc200x.VCManifestTool,\nVCMIDLTool = vc200x.VCMIDLTool,\nVCResourceCompilerTool = vc200x.VCResourceCompilerTool,\n}\nlocal function getsections(version, platform)\nif platform == \"Xbox360\" then\nreturn {\n\"VCPreBuildEventTool\",\n\"VCCustomBuildTool\",\n\"VCXMLDataGeneratorTool\",\n\"VCWebServiceProxyGeneratorTool\",\n\"VCMIDLTool\",\n\"VCCLCompilerTool\",\n\"VCManagedResourceCompilerTool\",\n\"VCResourceCompilerTool\",\n\"VCPreLinkEventTool\",\n\"V" - "CLinkerTool\",\n\"VCALinkTool\",\n\"VCX360ImageTool\",\n\"VCBscMakeTool\",\n\"VCX360DeploymentTool\",\n\"VCPostBuildEventTool\",\n\"DebuggerTool\",\n}\nend\nif platform == \"PS3\" then\nreturn {\n\"VCPreBuildEventTool\",\n\"VCCustomBuildTool\",\n\"VCXMLDataGeneratorTool\",\n\"VCWebServiceProxyGeneratorTool\",\n\"VCMIDLTool\",\n\"VCCLCompilerTool_PS3\",\n\"VCManagedResourceCompilerTool\",\n\"VCResourceCompilerTool\",\n\"VCPreLinkEventTool\",\n\"VCLinkerTool_PS3\",\n\"VCALinkTool\",\n\"VCManifestTool\",\n\"VCXDCMakeTool\",\n\"VCBscMakeTool\",\n\"VCFxCopTool\",\n\"VCAppVerifierTool\",\n\"VCWebDeploymentTool\",\n\"VCPostBuildEventTool\"\n}\nend\nreturn {\n\"VCPreBuildEventTool\",\n\"VCCustomBuildTool\",\n\"VCXMLDataGeneratorTool\",\n\"VCWebServiceProxyGeneratorTool\",\n\"VCMIDLTool\",\n\"VCCLCompilerTool\",\n\"VCManagedResourceCompilerTool\",\n\"VCResourceCompilerTool\",\n\"VCPreLinkEventTool\",\n\"VCLinkerTool\",\n\"VCALinkTool\",\n\"VCManifestTool\",\n\"VCXDCMakeTool\",\n\"VCBscMakeTool\",\n\"VCFxCopTool\",\n\"V" - "CAppVerifierTool\",\n\"VCWebDeploymentTool\",\n\"VCPostBuildEventTool\"\n}\nend\nfunction vc200x.generate(prj)\nvc200x.header('VisualStudioProject')\n_p(1,'Name=\"%s\"', premake.esc(prj.name))\n_p(1,'ProjectGUID=\"{%s}\"', prj.uuid)\n_p(1,'RootNamespace=\"%s\"', prj.name)\n_p(1,'Keyword=\"%s\"', iif(prj.flags.Managed, \"ManagedCProj\", \"Win32Proj\"))\n_p(1,'>')\nvc200x.Platforms(prj)\n_p(1,'')\n_p(1,'')\n_p(1,'')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nif cfginfo.isreal then\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc200x.Configuration(cfginfo.name, cfg)\nfor _, block in ipairs(getsections(_ACTION, cfginfo.src_platform)) do\nif blockmap[block] then\nblockmap[block](cfg)\nelseif block == \"VCPreBuildEventTool\" then\nvc200x.buildstepsblock(\"VCPreBuildEventTool\", cfg.prebuildcommands)\nelseif block == \"VCPreLinkEventTool\" then\nvc200x.buildstepsblock(\"VCPreLinkEventTool\", cfg.prelinkcommands)\nelseif block =" - "= \"VCPostBuildEventTool\" then\nvc200x.buildstepsblock(\"VCPostBuildEventTool\", cfg.postbuildcommands)\nelseif block == \"VCX360DeploymentTool\" then\n_p(3,' 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.deploymentoptions), \" \"))\nend\n_p(3,'/>')\nelseif block == \"VCX360ImageTool\" then\n_p(3,' 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.imageoptions), \" \"))\nend\nif cfg.imagepath ~= nil then\n_p(4,'OutputFileName=\"%s\"', premake.esc(path.translate(cfg.imagepath)))\nend\n_p(3,'/>')\nelseif block == \"DebuggerTool\" then\n_p(3,'')\nelse\n_p(3,'')\nend\nend\n_p(2,'')\nend\nend\n_p(1,'')\n_p(1,'')\n_p(1,'')\n_p(1,'')\nvc200x.Files(prj)\n_p(1,'')\n_p" - "(1,'')\n_p(1,'')\n_p('')\nend\n", + "ction vc200x.VCCLCompilerTool(cfg)\n_p(3,' 0 then\n_p(4,'AdditionalOptions=\"%s /MP\"', table.concat(premake.esc(cfg.buildoptions), \" \"))\nend\n_p(4,'Optimization=\"%s\"', vc200x.optimization(cfg))\nif cfg.flags.NoFramePointer then\n_p(4,'OmitFramePointers=\"%s\"', bool(true))\nend\nlocal includedirs = table.join(cfg.userincludedirs, cfg.includedirs)\nif #includedirs > 0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"', premake.esc(path.translate(table.concat(includedirs, \";\"), '\\\\')))\nend\nif #cfg.defines > 0 then\n_p(4,'PreprocessorDefinitions=\"%s\"', premake.esc(table.concat(cfg.defines, \";\")))\nend\nif premake.config.isdebugbuild(cfg) and cfg.flags.EnableMinimalRebuild and not cfg.flags.Managed then\n_p(4,'MinimalRebuild=\"%s\"', bool(true))\nend\nif cfg.flags.NoExceptions then\n_p(4,'Except" + "ionHandling=\"0\"')\nelseif cfg.flags.SEH then\n_p(4,'ExceptionHandling=\"2\"')\nend\nif vc200x.optimization(cfg) == 0 and not cfg.flags.Managed then\n_p(4,'BasicRuntimeChecks=\"3\"')\nend\nif vc200x.optimization(cfg) ~= 0 then\n_p(4,'StringPooling=\"%s\"', bool(true))\nend\nlocal runtime\nif premake.config.isdebugbuild(cfg) then\nruntime = iif(cfg.flags.StaticRuntime, 1, 3)\nelse\nruntime = iif(cfg.flags.StaticRuntime, 0, 2)\nend\n_p(4,'RuntimeLibrary=\"%s\"', runtime)\n_p(4,'EnableFunctionLevelLinking=\"%s\"', bool(true))\nif cfg.platform ~= \"Xbox360\" and cfg.platform ~= \"x64\" and cfg.platform ~= \"Durango\" then\nif cfg.flags.EnableSSE then\n_p(4,'EnableEnhancedInstructionSet=\"1\"')\nelseif cfg.flags.EnableSSE2 then\n_p(4,'EnableEnhancedInstructionSet=\"2\"')\nend\nend\nif cfg.flags.FloatFast then\n_p(4,'FloatingPointModel=\"2\"')\nelseif cfg.flags.FloatStrict then\n_p(4,'FloatingPointModel=\"1\"')\nend\nif cfg.flags.NoRTTI and not cfg.flags.Managed then\n_p(4,'RuntimeTypeInfo=\"%s\"', bool(false))\nen" + "d\nif cfg.flags.FastCall then\n_p(4,'CallingConvention=\"1\"')\nelseif cfg.flags.StdCall then\n_p(4,'CallingConvention=\"2\"')\nend\nif cfg.flags.NativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"', bool(true))\nelseif cfg.flags.NoNativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"', bool(false))\nend\nif not cfg.flags.NoPCH and cfg.pchheader then\n_p(4,'UsePrecompiledHeader=\"2\"')\n_p(4,'PrecompiledHeaderThrough=\"%s\"', cfg.pchheader)\nelse\n_p(4,'UsePrecompiledHeader=\"%s\"', iif(cfg.flags.NoPCH, 0, 2))\nend\nif cfg.flags.ExtraWarnings then\n_p(4,'WarningLevel=\"%s\"', 4)\nelseif cfg.flags.MinimumWarnings then\n_p(4,'WarningLevel=\"%s\"', 1)\nelse\n_p(4,'WarningLevel=\"%s\"', 3)\nend\nif cfg.flags.FatalWarnings then\n_p(4,'WarnAsError=\"%s\"', bool(true))\nend\nif _ACTION < \"vs2008\" and not cfg.flags.Managed then\n_p(4,'Detect64BitPortabilityProblems=\"%s\"', bool(not cfg.flags.No64BitChecks))\nend\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"', path.getbasename(cfg.buildtarget.name))" + "\n_p(4,'DebugInformationFormat=\"%s\"', vc200x.Symbols(cfg))\nif cfg.language == \"C\" then\n_p(4, 'CompileAs=\"1\"')\nend\n_p(3,'/>')\nend\nfunction vc200x.VCLinkerTool(cfg)\n_p(3,' 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.linkoptions), \" \"))\nend\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\n_p(4,'LinkIncremental=\"%s\"',\niif(premake.config.isincrementallink(cfg) , 2, 1))\n_p(4,'AdditionalLibraryDirectories=\"%s\"', table.concat(premake.esc(path.translate(cfg.libdirs, '\\\\')) , \";\"))\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\n_p(4,'ModuleDefinitionFile=\"%s\"', " + "deffile)\nend\nif cfg.flags.NoManifest then\n_p(4,'GenerateManifest=\"%s\"', bool(false))\nend\n_p(4,'GenerateDebugInformation=\"%s\"', bool(vc200x.Symbols(cfg) ~= 0))\nif vc200x.Symbols(cfg) ~= 0 then\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"', path.getbasename(cfg.buildtarget.name))\nend\n_p(4,'SubSystem=\"%s\"', iif(cfg.kind == \"ConsoleApp\", 1, 2))\nif vc200x.optimization(cfg) ~= 0 then\n_p(4,'OptimizeReferences=\"2\"')\n_p(4,'EnableCOMDATFolding=\"2\"')\nend\nif (cfg.kind == \"ConsoleApp\" or cfg.kind == \"WindowedApp\") and not cfg.flags.WinMain then\n_p(4,'EntryPointSymbol=\"mainCRTStartup\"')\nend\nif cfg.kind == \"SharedLib\" then\nlocal implibname = cfg.linktarget.fullpath\n_p(4,'ImportLibrary=\"%s\"', iif(cfg.flags.NoImportLib, cfg.objectsdir .. \"\\\\\" .. path.getname(implibname), implibname))\nend\n_p(4,'TargetMachine=\"%d\"', iif(cfg.platform == \"x64\", 17, 1))\nelse\n_p(4,'Name=\"VCLibrarianTool\"')\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(prema" + "ke.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\nif #cfg.libdirs > 0 then\n_p(4,'AdditionalLibraryDirectories=\"%s\"', premake.esc(path.translate(table.concat(cfg.libdirs , \";\"))))\nend\nlocal addlOptions = {}\nif cfg.platform == \"x32\" then\ntable.insert(addlOptions, \"/MACHINE:X86\")\nelseif cfg.platform == \"x64\" then\ntable.insert(addlOptions, \"/MACHINE:X64\")\nend\naddlOptions = table.join(addlOptions, cfg.linkoptions)\nif #addlOptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(addlOptions), \" \"))\nend\nend\n_p(3,'/>')\nend\nfunction vc200x.VCCLCompilerTool_PS3(cfg)\n_p(3,' 0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"', premake.esc(path.translate(table.concat(includedirs, \";\"), '\\\\')))\nend\nif #cfg.defines > 0 then\n_p(4,'PreprocessorDefinitions=\"%s\"', table.concat(premake.esc(cfg.defines), \";\"))\nend\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"', path.getbasename(cfg.buildtarget.name))\n_p(4,'DebugInformationFormat=\"0\"')\n_p(4,'CompileAs=\"0\"')\n_p(3,'/>')\nend\nfunction vc200x.VCLinkerTool_PS3(cfg)\n_p(3,' 0 then\n_p(4,'AdditionalOptions=\"%s\"', premake.esc(table.concat(buildoptions, \" \")))\nend\nif " + "#cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\n_p(4,'LinkIncremental=\"0\"')\n_p(4,'AdditionalLibraryDirectories=\"%s\"', table.concat(premake.esc(path.translate(cfg.libdirs, '\\\\')) , \";\"))\n_p(4,'GenerateManifest=\"%s\"', bool(false))\n_p(4,'ProgramDatabaseFile=\"\"')\n_p(4,'RandomizedBaseAddress=\"1\"')\n_p(4,'DataExecutionPrevention=\"0\"')\nelse\n_p(4,'Name=\"VCLibrarianTool\"')\nlocal buildoptions = table.join(premake.snc.getldflags(cfg), cfg.linkoptions)\nif #buildoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', premake.esc(table.concat(buildoptions, \" \")))\nend\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\nif #cfg.libdirs > 0 then\n_p(4,'AdditionalLibraryDirectories=\"%s\"', premake.esc(path.translate(" + "table.concat(cfg.libdirs , \";\"))))\nend\nend\n_p(3,'/>')\nend\nfunction vc200x.VCResourceCompilerTool(cfg)\n_p(3,' 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.resoptions), \" \"))\nend\nif #cfg.defines > 0 or #cfg.resdefines > 0 then\n_p(4,'PreprocessorDefinitions=\"%s\"', table.concat(premake.esc(table.join(cfg.defines, cfg.resdefines)), \";\"))\nend\nlocal includedirs = table.join(cfg.userincludedir, cfg.includedirs, cfg.resincludedirs)\nif #includedirs > 0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"', premake.esc(path.translate(table.concat(includedirs, \";\"), '\\\\')))\nend\n_p(3,'/>')\nend\nfunction vc200x.VCManifestTool(cfg)\nlocal manifests = { }\nfor _, fname in ipairs(cfg.files) do\nif path.getextension(fname) == \".manifest\" then\ntable.insert(manifests, fname)\nend\nend\n_p(3,' 0 then\n_p(4,'AdditionalManifestFiles=\"%s\"', premake.esc(table" + ".concat(manifests, \";\")))\nend\n_p(3,'/>')\nend\nfunction vc200x.VCMIDLTool(cfg)\n_p(3,'')\nend\nfunction vc200x.buildstepsblock(name, steps)\n_p(3,' 0 then\n_p(4,'CommandLine=\"%s\"', premake.esc(table.implode(steps, \"\", \"\", \"\\r\\n\")))\nend\n_p(3,'/>')\nend\nlocal blockmap =\n{\nVCCLCompilerTool = vc200x.VCCLCompilerTool,\nVCCLCompilerTool_PS3 = vc200x.VCCLCompilerTool_PS3,\nVCLinkerTool = vc200x.VCLinkerTool,\nVCLinkerTool_PS3 = vc200x.VCLinkerTool_PS3,\nVCManifestTool = vc200x.VCManifestTool,\nVCMIDLTool = vc200x.VCMIDLTool,\nVCResourceCompilerTool = vc200x.VCResourceCompilerTool,\n}\nlocal function getsections(version, platform)\nif platform == \"Xbox360\" then\nreturn {\n\"VCPreBuildEventTool\",\n\"VCCustomBuildTool\",\n\"VCXMLDataGeneratorTool\",\n\"VCWebServiceProxyGeneratorTool\",\n\"VCMID" + "LTool\",\n\"VCCLCompilerTool\",\n\"VCManagedResourceCompilerTool\",\n\"VCResourceCompilerTool\",\n\"VCPreLinkEventTool\",\n\"VCLinkerTool\",\n\"VCALinkTool\",\n\"VCX360ImageTool\",\n\"VCBscMakeTool\",\n\"VCX360DeploymentTool\",\n\"VCPostBuildEventTool\",\n\"DebuggerTool\",\n}\nend\nif platform == \"PS3\" then\nreturn {\n\"VCPreBuildEventTool\",\n\"VCCustomBuildTool\",\n\"VCXMLDataGeneratorTool\",\n\"VCWebServiceProxyGeneratorTool\",\n\"VCMIDLTool\",\n\"VCCLCompilerTool_PS3\",\n\"VCManagedResourceCompilerTool\",\n\"VCResourceCompilerTool\",\n\"VCPreLinkEventTool\",\n\"VCLinkerTool_PS3\",\n\"VCALinkTool\",\n\"VCManifestTool\",\n\"VCXDCMakeTool\",\n\"VCBscMakeTool\",\n\"VCFxCopTool\",\n\"VCAppVerifierTool\",\n\"VCWebDeploymentTool\",\n\"VCPostBuildEventTool\"\n}\nend\nreturn {\n\"VCPreBuildEventTool\",\n\"VCCustomBuildTool\",\n\"VCXMLDataGeneratorTool\",\n\"VCWebServiceProxyGeneratorTool\",\n\"VCMIDLTool\",\n\"VCCLCompilerTool\",\n\"VCManagedResourceCompilerTool\",\n\"VCResourceCompilerTool\",\n\"VCPreLinkEventTo" + "ol\",\n\"VCLinkerTool\",\n\"VCALinkTool\",\n\"VCManifestTool\",\n\"VCXDCMakeTool\",\n\"VCBscMakeTool\",\n\"VCFxCopTool\",\n\"VCAppVerifierTool\",\n\"VCWebDeploymentTool\",\n\"VCPostBuildEventTool\"\n}\nend\nfunction vc200x.generate(prj)\nvc200x.header('VisualStudioProject')\n_p(1,'Name=\"%s\"', premake.esc(prj.name))\n_p(1,'ProjectGUID=\"{%s}\"', prj.uuid)\n_p(1,'RootNamespace=\"%s\"', prj.name)\n_p(1,'Keyword=\"%s\"', iif(prj.flags.Managed, \"ManagedCProj\", \"Win32Proj\"))\n_p(1,'>')\nvc200x.Platforms(prj)\n_p(1,'')\n_p(1,'')\n_p(1,'')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nif cfginfo.isreal then\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc200x.Configuration(cfginfo.name, cfg)\nfor _, block in ipairs(getsections(_ACTION, cfginfo.src_platform)) do\nif blockmap[block] then\nblockmap[block](cfg)\nelseif block == \"VCPreBuildEventTool\" then\nvc200x.buildstepsblock(\"VCPreBuildEventTool\", cfg.prebuildcommands)\nel" + "seif block == \"VCPreLinkEventTool\" then\nvc200x.buildstepsblock(\"VCPreLinkEventTool\", cfg.prelinkcommands)\nelseif block == \"VCPostBuildEventTool\" then\nvc200x.buildstepsblock(\"VCPostBuildEventTool\", cfg.postbuildcommands)\nelseif block == \"VCX360DeploymentTool\" then\n_p(3,' 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.deploymentoptions), \" \"))\nend\n_p(3,'/>')\nelseif block == \"VCX360ImageTool\" then\n_p(3,' 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.imageoptions), \" \"))\nend\nif cfg.imagepath ~= nil then\n_p(4,'OutputFileName=\"%s\"', premake.esc(path.translate(cfg.imagepath)))\nend\n_p(3,'/>')\nelseif block == \"DebuggerTool\" then\n_p(3,'')\nelse\n_p(3,'')\nend\nend\n_p(2,'')\nend\nend\n_p" + "(1,'')\n_p(1,'')\n_p(1,'')\n_p(1,'')\nvc200x.Files(prj)\n_p(1,'')\n_p(1,'')\n_p(1,'')\n_p('')\nend\n", /* actions/vstudio/vs200x_vcproj_user.lua */ - "local vc200x = premake.vstudio.vc200x\nfunction vc200x.generate_user(prj)\nvc200x.header('VisualStudioUserFile')\n_p(1,'ShowAllFiles=\"false\"')\n_p(1,'>')\n_p(1,'')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nif cfginfo.isreal then\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(2,'')\nvc200x.debugdir(cfg)\n_p(2,'')\nend\nend\n_p(1,'')\n_p('')\nend\nfunction vc200x.environmentargs(cfg)\nif cfg.environmentargs and #cfg.environmentargs > 0 then\n_p(4,'Environment=\"%s\"', string.gsub(table.concat(cfg.environmentargs, \" \"),'\"','"'))\nif cfg.flags.EnvironmentArgsDontMerge then\n_p(4,'EnvironmentMerge=\"false\"')\nend\nend\nend\nfunction vc200x.debugdir(cfg)\n_p(3,' 0 then\n_p(4,'CommandArguments=\"%s\"', table.concat(cfg.debugargs, \" \"))\nend\nvc200x.environmentargs(cfg)\n_p(3,'/>')\nend\n", + "local vc200x = premake.vstudio.vc200x\nfunction vc200x.generate_user(prj)\nvc200x.header('VisualStudioUserFile')\n_p(1,'ShowAllFiles=\"false\"')\n_p(1,'>')\n_p(1,'')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nif cfginfo.isreal then\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(2,'')\nvc200x.debugdir(cfg)\n_p(2,'')\nend\nend\n_p(1,'')\n_p('')\nend\nfunction vc200x.environmentargs(cfg)\nif cfg.environmentargs and #cfg.environmentargs > 0 then\n_p(4,'Environment=\"%s\"', string.gsub(table.concat(cfg.environmentargs, \" \"),'\"','"'))\nif cfg.flags.EnvironmentArgsDontMerge then\n_p(4,'EnvironmentMerge=\"false\"')\nend\nend\nend\nfunction vc200x.debugdir(cfg)\n_p(3,' 0 then\n_" + "p(4,'CommandArguments=\"%s\"', table.concat(cfg.debugargs, \" \"))\nend\nvc200x.environmentargs(cfg)\n_p(3,'/>')\nend\n", /* actions/vstudio/vs2005_solution.lua */ "premake.vstudio.sln2005 = { }\nlocal vstudio = premake.vstudio\nlocal sln2005 = premake.vstudio.sln2005\nfunction sln2005.generate(sln)\nio.eol = '\\r\\n'\nsln.vstudio_configs = premake.vstudio.buildconfigs(sln)\n_p('\\239\\187\\191')\nsln2005.reorderProjects(sln)\nsln2005.header(sln)\nfor grp in premake.solution.eachgroup(sln) do\nsln2005.group(grp)\nend\nfor prj in premake.solution.eachproject(sln) do\nsln2005.project(prj)\nend\n_p('Global')\nsln2005.platforms(sln)\nsln2005.project_platforms(sln)\nsln2005.properties(sln)\nsln2005.project_groups(sln)\n_p('EndGlobal')\nend\nfunction sln2005.reorderProjects(sln)\nif sln.startproject then\nfor i, prj in ipairs(sln.projects) do\nif sln.startproject == prj.name then\nlocal cur = prj.group\nwhile cur ~= nil do\nfor j, group in ipairs(sln.groups) do\nif group == cur then\ntable.remove(sln.groups, j)\nbreak\nend\nend\ntable.insert(sln.groups, 1, cur)\ncur = cur.parent\nend\ntable.remove(sln.projects, i)\ntable.insert(sln.projects, 1, prj)\nbreak\nend\nend\nend\nend\n" @@ -290,40 +308,42 @@ const char* builtin_scripts[] = { "premake.vstudio.vc2010 = { }\nlocal vc2010 = premake.vstudio.vc2010\nlocal vstudio = premake.vstudio\nlocal function vs2010_config(prj)\n_p(1,'')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\n_p(2,'', premake.esc(cfginfo.name))\n_p(3,'%s',cfginfo.buildcfg)\n_p(3,'%s',cfginfo.platform)\n_p(2,'')\nend\n_p(1,'')\nend\nlocal function vs2010_globals(prj)\nlocal action = premake.action.current()\n_p(1,'')\n_p(2, '{%s}',prj.uuid)\n_p(2, '%s',prj.name)\nif vstudio.storeapp ~= \"durango\" then\nlocal windowsTargetPlatformVersion = prj.windowstargetplatformversion or action.vstudio.windowsTargetPlatformVersion\nif windowsTargetPlatformVersion ~= nil then\n_p(2,'%s',windowsTargetPlatformVersion" ")\nif windowsTargetPlatformVersion and string.startswith(windowsTargetPlatformVersion, \"10.\") then\n_p(2,'%s', prj.windowstargetplatformminversion or \"10.0.10240.0\")\nend\nend\nend\nif prj.flags and prj.flags.Managed then\n_p(2, 'v4.0')\n_p(2, 'ManagedCProj')\nelseif vstudio.iswinrt() then\n_p(2, 'en-US')\nif vstudio.storeapp == \"durango\" then\n_p(2, 'Win32Proj')\n_p(2, 'title')\n_p(2, '14.0')\n_p(2, 'Native')\nelse\n_p(2, 'true')\n_p(2, '12.0')\nif vstudio.toolset == \"v120_wp81\" then\n_p(2, 'Windows Phone')\nelse\n_p(2, 'Win" "dows Store')\nend\n_p(2, '%s', vstudio.storeapp)\nend\nelse\n_p(2, 'Win32Proj')\nend\n_p(1,'')\nend\nfunction vc2010.config_type(config)\nlocal t =\n{\nSharedLib = \"DynamicLibrary\",\nStaticLib = \"StaticLibrary\",\nConsoleApp = \"Application\",\nWindowedApp = \"Application\"\n}\nreturn t[config.kind]\nend\nlocal function if_config_and_platform()\nreturn 'Condition=\"\\'$(Configuration)|$(Platform)\\'==\\'%s\\'\"'\nend\nlocal function optimisation(cfg)\nlocal result = \"Disabled\"\nfor _, value in ipairs(cfg.flags) do\nif (value == \"Optimize\") then\nresult = \"Full\"\nelseif (value == \"OptimizeSize\") then\nresult = \"MinSpace\"\nelseif (value == \"OptimizeSpeed\") then\nresult = \"MaxSpeed\"\nend\nend\nreturn result\nend\nfunction vc2010.configurationPropertyGroup(cfg, cfginfo)\n_p(1,''\n, premake.esc(cfginfo.name))\n_p(2,'%s',vc2010.config_type(cfg))\n_p(2,'%s', iif(optimisation(cfg) == \"Disabled\",\"true\",\"false\"))\n_p(2,'%s', premake.vstudio.toolset)\nif cfg.flags.MFC then\n_p(2,'%s', iif(cfg.flags.StaticRuntime, \"Static\", \"Dynamic\"))\nend\nif cfg.flags.ATL or cfg.flags.StaticATL then\n_p(2,'%s', iif(cfg.flags.StaticATL, \"Static\", \"Dynamic\"))\nend\nif cfg.flags.Managed then\n_p(2,'true')\nend\n_p(1,'')\nend\nlocal function import_props(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(1,''\n,premake.esc(cfginfo.name))\n_p(2,'')\n_p(1,'')\nend\nend\nlocal function add_trailing_backslash(dir)\nif dir:len() > 0 and dir:sub(-1) ~= \"\\\\\" then\nreturn dir..\"\\\\\"\nend\nreturn dir\nend\nfunction vc2010.outputProperties(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nlocal target = cfg.buildtarget\nlocal outdir = add_trailing_backslash(target.directory)\nlocal intdir = add_trailing_backslash(cfg.objectsdir)\n_p(1,'', premake.esc(cfginfo.name))\n_p(2,'%s', premake.esc(outdir))\nif cfg.platform == \"Xbox360\" then\n_p(2,'$(OutDir)%s', premake.esc(target.name))\nend\n_p(2,'%s', premake.esc(intdir))\n_p(2,'%s', premake.esc(path.getbasename(target.name)))\n_p(2,'%s', premake.esc(path.getextension(target.name)))\nif cfg.kind == \"Sha" - "redLib\" then\nlocal ignore = (cfg.flags.NoImportLib ~= nil)\n_p(2,'%s', tostring(ignore))\nend\nif cfg.platform == \"Durango\" then\n_p(2, '$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)')\n_p(2, '$(Console_SdkLibPath)')\n_p(2, '$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)')\n_p(2, '$(Console_SdkIncludeRoot)')\n_p(2, '$(Console_SdkRoot)bin;$(VCInstallDir)bin\\\\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\\\\Tools\\\\bin;$(VSInstallDir)Common7\\\\tools;$(VSInstallDir)Common7\\\\ide;$(ProgramFiles)\\\\HTML Help Workshop;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);')\n_p(2, '%s', prj.name)\n_p(2, '*.pdb;*.ilk;*.exp;*.lib;*.winmd;*.appxrecipe;*.pri;*.idb')\n_p(2, 'true<" - "/IsolateConfigurationsOnDeploy>')\nend\nif cfg.kind ~= \"StaticLib\" then\n_p(2,'%s', tostring(premake.config.isincrementallink(cfg)))\nend\nif cfg.flags.NoManifest then\n_p(2,'false')\nend\n_p(1,'')\nend\nend\nlocal function runtime(cfg)\nlocal runtime\nlocal flags = cfg.flags\nif premake.config.isdebugbuild(cfg) then\nruntime = iif(flags.StaticRuntime and not flags.Managed, \"MultiThreadedDebug\", \"MultiThreadedDebugDLL\")\nelse\nruntime = iif(flags.StaticRuntime and not flags.Managed, \"MultiThreaded\", \"MultiThreadedDLL\")\nend\nreturn runtime\nend\nlocal function precompiled_header(cfg)\n if not cfg.flags.NoPCH and cfg.pchheader then\n_p(3,'Use')\n_p(3,'%s', cfg.pchheader)\nelse\n_p(3,'')\nend\nend\nlocal function preprocessor(indent,cfg)\nif #cfg.defines > 0 then\n_p(indent,'%s;%%(PreprocessorDefinitions)'\n,premake.esc(table.concat(cfg.defines, \";\")))\nelse\n_p(indent,'')\nend\nend\nlocal function include_dirs(indent,cfg)\nif #cfg.includedirs > 0 then\n_p(indent,'%s;%%(AdditionalIncludeDirectories)'\n,premake.esc(path.translate(table.concat(cfg.includedirs, \";\"), '\\\\')))\nend\nend\nlocal function resource_compile(cfg)\n_p(2,'')\npreprocessor(3,cfg)\ninclude_dirs(3,cfg)\n_p(2,'')\nend\nlocal function exceptions(cfg)\nif cfg.flags.NoExceptions then\n_p(3, 'false')\nelseif cfg.flags.SEH then\n_p(3, 'Async')\nend\nend\nlocal function rtti(cfg)\nif cfg.flags.NoRTTI and not cfg.flags.Managed then\n_p(3,'false')\nend\nend\nlocal function calling_convention(cfg)\nif cfg.flags.FastCall then" - "\n_p(3,'FastCall')\nelseif cfg.flags.StdCall then\n_p(3,'StdCall')\nend\nend\nlocal function wchar_t_builtin(cfg)\nif cfg.flags.NativeWChar then\n_p(3,'true')\nelseif cfg.flags.NoNativeWChar then\n_p(3,'false')\nend\nend\nlocal function sse(cfg)\nif cfg.flags.EnableSSE then\n_p(3, 'StreamingSIMDExtensions')\nelseif cfg.flags.EnableSSE2 then\n_p(3, 'StreamingSIMDExtensions2')\nelseif cfg.flags.EnableAVX then\n_p(3, 'AdvancedVectorExtensions')\nelseif cfg.flags.EnableAVX2 then\n_p(3, 'AdvancedVectorExtensions2')\nend\nend\nlocal function floating_point(cfg)\n if cfg.flags.FloatFast th" - "en\n_p(3,'Fast')\nelseif cfg.flags.FloatStrict and not cfg.flags.Managed then\n_p(3,'Strict')\nend\nend\nlocal function debug_info(cfg)\nlocal debug_info = ''\nif cfg.flags.Symbols then\nif (action.vstudio.supports64bitEditContinue == false and cfg.platform == \"x64\")\nor cfg.flags.Managed\nor premake.config.isoptimizedbuild(cfg.flags)\nor cfg.flags.NoEditAndContinue\nthen\ndebug_info = \"ProgramDatabase\"\nelse\ndebug_info = \"EditAndContinue\"\nend\nend\n_p(3,'%s',debug_info)\nend\nlocal function minimal_build(cfg)\nif premake.config.isdebugbuild(cfg) and cfg.flags.EnableMinimalRebuild then\n_p(3,'true')\nelse\n_p(3,'false')\nend\nend\nlocal function compile_language(cfg)\nif cfg.options.ForceCPP then\n_p(3,'CompileAsCpp')\nelse\nif cfg.language == \"C\" then\n_p(3,'CompileAsC')\nend\nend\nend\nlocal function forcedinclude_files(indent,cfg)\nif #cfg.forcedincludes > 0 then\n_p(indent,'%s'\n,premake.esc(path.translate(table.concat(cfg.forcedincludes, \";\"), '\\\\')))\nend\nend\nlocal function vs10_clcompile(cfg)\n_p(2,'')\n_p(3,'%s %s%%(AdditionalOptions)'\n, table.concat(premake.esc(cfg.buildoptions), \" \")\n, iif(cfg.flags.UnsignedChar, \"/J \", \" \")\n)\n_p(3,'%s',optimisation(cfg))\ninclude_dirs(3, cfg)\npreprocessor(3, cfg)\nminimal_build(cfg)\nif not premake.config.isoptimizedbuild(cfg.flags) then\nif not cfg.flags.Managed then\n_p(3,'EnableFastChecks')\nend\nif cfg.flags.ExtraWarnings then\nend\nelse\n_p(3,'true')\nend\nif cfg.platform == \"Durango\" or cfg.flags.NoWinRT then\n_p(3, 'false')\nend\nif cfg.platform ~= \"Durango\" then\n_p(3,'%s', runtime(cfg))\nend\nif cfg.flags.NoBufferSecurityCheck then\n_p(3,'false')\nend\n_p(3,'true')\nif not cfg.flags.NoMultiProcessorCompilation and not cfg.flags.EnableMinimalRebuild then\n_p(3,'true')\nelse\n_p(3,'false')\nend\nprecompiled_header(cfg)\nif cfg.flags.ExtraWarnings then\n_p(3,'Level4')\nelseif cfg.flags.MinimumWarnings then\n_p(3,'Level1')\nelse\n_p(3,'Level3')\nend\nif cfg.flags.FatalWarnings then\n_p(3,'true')\nend\nexceptions(cfg)\nrtti(cfg)\ncalling_convention(cfg)\nwchar_t_builtin(cfg)\nsse(cfg)\nfloating_point(cfg)\ndebug_info(cfg)\nif cfg.flags.Symbols then\n_p(3,'$(OutDir)%s.pdb'\n, pa" - "th.getbasename(cfg.buildtarget.name))\nend\nif cfg.flags.NoFramePointer then\n_p(3,'true')\nend\ncompile_language(cfg)\nforcedinclude_files(3,cfg);\n_p(2,'')\nend\nlocal function event_hooks(cfg)\nif #cfg.postbuildcommands> 0 then\n _p(2,'')\n_p(3,'%s',premake.esc(table.implode(cfg.postbuildcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'')\nend\nif #cfg.prebuildcommands> 0 then\n _p(2,'')\n_p(3,'%s',premake.esc(table.implode(cfg.prebuildcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'')\nend\nif #cfg.prelinkcommands> 0 then\n _p(2,'')\n_p(3,'%s',premake.esc(table.implode(cfg.prelinkcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'')\nend\nend\nlocal function additional_options(indent,cfg)\nif #cfg.linkoptions > 0 then\n_p(indent,'%s %%(AdditionalOptions)',\ntable.concat(premake.es" - "c(cfg.linkoptions), \" \"))\nend\nend\nlocal function link_target_machine(index,cfg)\nlocal platforms = {x32 = 'MachineX86', x64 = 'MachineX64'}\nif platforms[cfg.platform] then\n_p(index,'%s', platforms[cfg.platform])\nend\nend\nlocal function item_def_lib(cfg)\n -- The Xbox360 project files are stored in another place in the project file.\nif cfg.kind == 'StaticLib' and cfg.platform ~= \"Xbox360\" then\n_p(1,'')\n_p(2,'$(OutDir)%s',cfg.buildtarget.name)\nadditional_options(2,cfg)\nlink_target_machine(2,cfg)\n_p(1,'')\nend\nend\nlocal function import_lib(cfg)\nif cfg.kind == \"SharedLib\" then\nlocal implibname = cfg.linktarget.fullpath\n_p(3,'%s',iif(cfg.flags.NoImportLib, cfg.objectsdir .. \"\\\\\" .. path.getname(implibname), implibname))\nend\nend\nfunction vc2010.link(cfg)\n_p(2,'')\n_p(3,'%s', iif(cfg.kind == \"ConsoleApp\", \"Console\", \"Windows\"))\n_p(3,'%s', tostring(cfg.flags.Symbols ~= nil))\nif premake.config.isoptimizedbuild(cfg.flags) then\n_p(3,'true')\n_p(3,'true')\nend\nif cfg.kind ~= 'StaticLib' then\nvc2010.additionalDependencies(cfg)\n_p(3,'$(OutDir)%s', cfg.buildtarget.name)\nif #cfg.libdirs > 0 then\n_p(3,'%s;%%(AdditionalLibraryDirectories)'\n, premake.esc(path.translate(table.concat(cfg.libdirs, ';'), '\\\\'))\n)\nend\nif vc2010.config_type(cfg) == 'Application' and not cfg.flags.WinMain and not cfg.flags.Managed then\nif cfg.flags.Unicode then\n_p(3,'wmainCRTStartup')\nelse\n_p(3,'mainCRTStartup')\nend\nend\nimport_lib(cfg)\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\n_p(3,'%s', deffile)\nend\nlink_t" - "arget_machine(3,cfg)\nadditional_options(3,cfg)\n if cfg.flags.NoWinMD and vstudio.iswinrt() and prj.kind == \"WindowedApp\" then\n_p(3,'false' )\n end\nend\n_p(2,'')\nend\nfunction vc2010.additionalDependencies(cfg)\nlocal links = premake.getlinks(cfg, \"system\", \"fullpath\")\nif #links > 0 then\n_p(3,'%s;%s'\n, table.concat(links, \";\")\n, iif(cfg.platform == \"Durango\"\n, '$(XboxExtensionsDependencies)'\n, '%(AdditionalDependencies)'\n)\n)\nend\nend\nlocal function item_definitions(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(1,''\n,premake.esc(cfginfo.name))\nvs10_clcompile(cfg)\nresource_compile(cfg)\nitem_def_lib(cfg)\nvc2010.link(cfg)\nevent_hooks(cfg)\n_p(1,'')\nend\nend\nfunction vc2010.getfileg" - "roup(prj, group)\nlocal sortedfiles = prj.vc2010sortedfiles\nif not sortedfiles then\nsortedfiles = {\nClCompile = {},\nClInclude = {},\nNone = {},\nResourceCompile = {},\nAppxManifest = {},\nImage = {},\nDeploymentContent = {}\n}\nlocal foundAppxManifest = false\nfor file in premake.project.eachfile(prj) do\nif path.isSourceFileVS(file.name) then\ntable.insert(sortedfiles.ClCompile, file)\nelseif path.iscppheader(file.name) then\nif not table.icontains(prj.removefiles, file) then\ntable.insert(sortedfiles.ClInclude, file)\nend\nelseif path.isresourcefile(file.name) then\ntable.insert(sortedfiles.ResourceCompile, file)\nelseif path.isappxmanifest(file.name) then\nfoundAppxManifest = true\ntable.insert(sortedfiles.AppxManifest, file)\nelseif file.flags and table.icontains(file.flags, \"DeploymentContent\") then\ntable.insert(sortedfiles.DeploymentContent, file)\nelse\ntable.insert(sortedfiles.None, file)\nend\nend\nif vstudio.iswinrt() and prj.kind == \"WindowedApp\" and not foundAppxManifest then\nvstudio.need" - "AppxManifest = true\nlocal fcfg = {}\nfcfg.name = prj.name .. \"/Package.appxmanifest\"\nfcfg.vpath = premake.project.getvpath(prj, fcfg.name)\ntable.insert(sortedfiles.AppxManifest, fcfg)\nlocal logo = {}\nlogo.name = prj.name .. \"/Logo.png\"\nlogo.vpath = logo.name\ntable.insert(sortedfiles.Image, logo)\nlocal smallLogo = {}\nsmallLogo.name = prj.name .. \"/SmallLogo.png\"\nsmallLogo.vpath = smallLogo.name\ntable.insert(sortedfiles.Image, smallLogo)\nlocal storeLogo = {}\nstoreLogo.name = prj.name .. \"/StoreLogo.png\"\nstoreLogo.vpath = storeLogo.name\ntable.insert(sortedfiles.Image, storeLogo)\nlocal splashScreen = {}\nsplashScreen.name = prj.name .. \"/SplashScreen.png\"\nsplashScreen.vpath = splashScreen.name\ntable.insert(sortedfiles.Image, splashScreen)\nend\nprj.vc2010sortedfiles = sortedfiles\nend\nreturn sortedfiles[group]\nend\nfunction vc2010.files(prj)\nvc2010.simplefilesgroup(prj, \"ClInclude\")\nvc2010.compilerfilesgroup(prj)\nvc2010.simplefilesgroup(prj, \"None\")\nvc2010.customtaskgroup(" - "prj)\nvc2010.simplefilesgroup(prj, \"ResourceCompile\")\nvc2010.simplefilesgroup(prj, \"AppxManifest\")\nvc2010.deploymentcontentgroup(prj, \"Image\")\nvc2010.deploymentcontentgroup(prj, \"DeploymentContent\", \"None\")\nend\nfunction vc2010.customtaskgroup(prj)\nlocal files = { }\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal fcfg = { }\nfcfg.name = path.getrelative(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nif #files > 0 then\n_p(1,'')\nlocal groupedBuildTasks = {}\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nif (groupedBuildTasks[buildtask[1]] == nil) then\ngroupedBuildTasks[buildtask[1]] = {}\nend\ntable.insert(groupedBuildTasks[buildtask[1]], buildtask)\nend\nend\nfor name, custombuildtask in pairs(groupedBuildTasks or {}) do\n_p(2,'', path.translate(pa" - "th.getrelative(prj.location,name), \"\\\\\"))\n_p(3,'Text')\nlocal cmd = \"\"\nlocal outputs = \"\"\nfor _, buildtask in ipairs(custombuildtask or {}) do\nfor _, cmdline in ipairs(buildtask[4] or {}) do\ncmd = cmd .. cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[1])))\ncmd = string.gsub(cmd, \"%$%(@%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[2])))\ncmd = cmd .. \"\\r\\n\"\nend\noutputs = outputs .. path.getrelative(prj.location,buildtask[2]) .. \";\"\nend\n_p(3,'%s',cmd)\n_p(3,'%s%%(Outputs)',outputs)\n_p(3,'Designer')\n_p(3,'')\n_p(2,'')\nend\n_p(1,'')\nend\nend\nfunction vc2010.simplefilesgroup(prj, section, sub" - "type)\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1,'')\nfor _, file in ipairs(files) do\nif subtype then\n_p(2,'<%s Include=\\\"%s\\\">', section, path.translate(file.name, \"\\\\\"))\n_p(3,'%s', subtype)\n_p(2,'', section)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', section, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'')\nend\nend\nfunction vc2010.deploymentcontentgroup(prj, section, filetype)\nif filetype == nil then\nfiletype = section\nend\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1,'')\nfor _, file in ipairs(files) do\n_p(2,'<%s Include=\\\"%s\\\">', filetype, path.translate(file.name, \"\\\\\"))\n_p(3,'true')\n_p(3,'%s', path.translate(file.vpath, \"\\\\\"))\n_p(2,'', filetype)\nend\n_p(1,'')\nend\nend\nfunction vc2010.compilerfilesgroup(prj)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.g" - "etfilegroup(prj, \"ClCompile\")\nif #files > 0 then\nlocal config_mappings = {}\nfor _, cfginfo in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nif cfg.pchheader and cfg.pchsource and not cfg.flags.NoPCH then\nconfig_mappings[cfginfo] = path.translate(cfg.pchsource, \"\\\\\")\nend\nend\n_p(1,'')\nfor _, file in ipairs(files) do\nlocal translatedpath = path.translate(file.name, \"\\\\\")\n_p(2, '', translatedpath)\n_p(3, '$(IntDir)%s\\\\'\n, premake.esc(path.translate(path.trimdots(path.getdirectory(file.name))))\n)\nif path.iscxfile(file.name) then\n_p(3, 'true')\n_p(3, 'true')\n_p(3, 'NotUsing')\nend\nif vstudio.iswinrt() and string.len(file.name) > 2 and string.sub(file.name, -2) == \".c\" then\n_p(3,'FALSE')\nend\nfor _, cfginfo in ipairs(conf" - "igs) do\nif config_mappings[cfginfo] and translatedpath == config_mappings[cfginfo] then\n_p(3,'Create', premake.esc(cfginfo.name))\nconfig_mappings[cfginfo] = nil --only one source file per pch\nend\nend\nlocal nopch = table.icontains(prj.nopch, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif nopch or table.icontains(cfg.nopch, file.name) then\n_p(3,'NotUsing', premake.esc(vsconfig.name))\nend\nend\nlocal excluded = table.icontains(prj.excludes, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif excluded or table.icontains(cfg.excludes, file.name) then\n_p(3, 'true'\n, premake.esc(vsconfig.name)\n)\nend\nend\n_p(2,'')\nend\n_p(1,'')\nend\nend\nfunction vc2010.header(targets)\nio.eol = \"\\r\\n\"\n_p('')\nlocal t = \"\"\nif targets then\nt = ' DefaultTargets=\"' .. targets .. '\"'\nend\n_p('', t, action.vstudio.toolsVersion)\nend\nfunction premake.vs2010_vcxproj(prj)\nio.indent = \" \"\nvc2010.header(\"Build\")\nvs2010_config(prj)\nvs2010_globals(prj)\n_p(1,'')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc2010.configurationPropertyGroup(cfg, cfginfo)\nend\n_p(1,'')\n_p(1,'')\n_p(1,'')\nimport_props(prj)\n_p(1,'')\nvc2010.outputProperties(prj)\nitem_defin" - "itions(prj)\nvc2010.files(prj)\nvc2010.projectReferences(prj)\n_p(1,'')\n_p(1,'')\n_p(1,'')\n_p('')\nend\nfunction vc2010.projectReferences(prj)\nlocal deps = premake.getdependencies(prj)\nif #deps > 0 then\n_p(1,'')\nfor _, dep in ipairs(deps) do\nlocal deppath = path.getrelative(prj.location, vstudio.projectfile(dep))\n_p(2,'', path.translate(deppath, \"\\\\\"))\n_p(3,'{%s}', dep.uuid)\nif vstudio.iswinrt() then\n_p(3,'false')\nend\n_p(2,'')\nend\n_p(1,'')\nend\nend\nfunction vc2010.debugdir(cfg)\nif cfg.debugdir and not vstudio.iswinrt() then\n_p(' %s', path.translate(cfg.debugdir, '\\\\'))\n_p(' WindowsLocalDebugger')\nend\nif cfg.deb" - "ugabsolutedir and not vstudio.iswinrt() then\n_p(' %s', path.translate(cfg.debugabsolutedir, '\\\\'))\n_p(' WindowsLocalDebugger')\nend\nif cfg.debugargs then\n_p(' %s', table.concat(cfg.debugargs, \" \"))\nend\nend\nfunction vc2010.debugenvs(cfg)\nif cfg.debugenvs and #cfg.debugenvs > 0 then\n_p(2,'%s%s',table.concat(cfg.debugenvs, \"\\n\")\n,iif(cfg.flags.DebugEnvsInherit,'\\n$(LocalDebuggerEnvironment)','')\n)\nif cfg.flags.DebugEnvsDontMerge then\n_p(2,'false')\nend\nend\nend\nfunction premake.vs2010_vcxproj_user(prj)\nio.indent = \" \"\nvc2010.header()\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(' ', premake.esc(cfginfo.name))\nvc2010.debugdir(cfg)\nvc2010.debugenvs(cfg)\n_p(' ')\nend\n_p('')\nend\nlocal png1x1data = {\n0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, -- .PNG........IHDR\n0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, 0xdb, 0x56, -- .............%.V\n0xca, 0x00, 0x00, 0x00, 0x03, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xa7, 0x7a, 0x3d, 0xda, -- .....PLTE....z=.\n0x00, 0x00, 0x00, 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, -- ....tRNS.@..f...\n0x0a, 0x49, 0x44, 0x41, 0x54, 0x08, 0xd7, 0x63, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0xe2, -- .IDAT..c`.......\n0x21, 0xbc, 0x33, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, -- !.3....IEND.B`.\n}\nfunction png1x1(obj, filename)\nfilename = premake.project.getfilename(obj, filename)\nlocal f, err = io.open(filename, \"wb\")\nif f then\nfor _, byte" - " in ipairs(png1x1data) do\nf:write(string.char(byte))\nend\nf:close()\nend\nend\nfunction premake.vs2010_appxmanifest(prj)\nio.indent = \" \"\nio.eol = \"\\r\\n\"\n_p('')\nif vstudio.toolset == \"v120_wp81\" then\n_p('')\nelseif vstudio.storeapp == \"8.1\" then\n_p('')\nelseif vstudio.storeapp == \"durango\" then\n_p('')\nelse\n_p('')\nend\n_p(1,'')\nif vstudio.toolset == \"v120_wp81\" or vstudio.storeapp == \"8.2\" then\n_p(1,'')\nend\n_p(1, '')\n_p(2, '' .. prj.name .. '')\n_p(2, 'PublisherDisplayName')\n_p(2, '' .. prj.name .. '\\\\StoreLogo.png')\npng1x1(prj, \"%%/StoreLogo.png\")\n_p(2, '' .. prj.name .. '')\n_p(1,'')\nif vstudio.storeapp == \"8.2\" then\n_p(1, '')\n_p(2, '')\n_p(1, '')\nelseif vstudio.storeapp == \"durango\" then" - "\n_p(1, '')\n_p(2, '6.2')\n_p(2, '6.2')\n_p(1, '')\nelse\n_p(1, '')\n_p(2, '6.3.0')\n_p(2, '6.3.0')\n_p(1, '')\nend\n_p(1,'')\n_p(2,'')\n_p(1,'')\n_p(1,'')\n_p(2,'')\nif vstudio.storeapp == \"durango\" then\n_p(3, '')\n_p(5, '')\npng1x1(prj, \"%%/SplashScreen.png\")\n_p(3, '')\n_p(3, '')\n_p(4, '')\n_p(4, '')\n_p(4, '')\n_p(3, '')\nelse\n_p(3, '')\n_p(4, '')\nend\n_p(2,'')\n_p(1,'')\n_p('')\nend\n", + "tionType>%s',vc2010.config_type(cfg))\n_p(2,'%s', iif(optimisation(cfg) == \"Disabled\",\"true\",\"false\"))\n_p(2,'%s', premake.vstudio.toolset)\nif cfg.flags.MFC then\n_p(2,'%s', iif(cfg.flags.StaticRuntime, \"Static\", \"Dynamic\"))\nend\nif cfg.flags.ATL or cfg.flags.StaticATL then\n_p(2,'%s', iif(cfg.flags.StaticATL, \"Static\", \"Dynamic\"))\nend\nif cfg.flags.Unicode then\n_p(2,'Unicode')\nend\nif cfg.flags.Managed then\n_p(2,'true')\nend\n_p(1,'')\nend\nlocal function import_props(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(1,''\n,premake.esc(cfginfo.name))\n_p(2,'')\n_p(1,'')\nend\nend\nlocal function add_trailing_backslash(dir)\nif dir:len() > 0 and dir:sub(-1) ~= \"\\\\\" then\nreturn dir..\"\\\\\"\nend\nreturn dir\nend\nfunction vc2010.outputProperties(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nlocal target = cfg.buildtarget\nlocal outdir = add_trailing_backslash(target.directory)\nlocal intdir = add_trailing_backslash(cfg.objectsdir)\n_p(1,'', premake.esc(cfginfo.name))\n_p(2,'%s', premake.esc(outdir))\nif cfg.platform == \"Xbox360\" then\n_p(2,'$(OutDir)%s', premake.esc(target.name))\nend\n_p(2,'%s', premake.esc(intdir))\n_p(2,'%s', premake.esc(path.getbasename(target.name)))\n_p(2,'%s', premake.esc(path.getextension(target.name)))\nif cfg.kind == \"SharedLib\" then\nlocal ignore = (cfg.flags.NoImportLib ~= nil)\n_p(2,'%s', tostring(ignore))\nend\nif cfg.platform == \"Durango\" then\n_p(2, '$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)')\n_p(2, '$(Console_SdkLibPath)')\n_p(2, '$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)')\n_p(2, '$(Console_SdkIncludeRoot)')\n_p(2, '$(Console_SdkRoot)bin;$(VCInstallDir)bin\\\\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\\\\Tools\\\\bin;$(VSInstallDir)Common7\\\\tools;$(VSInstallDir)Common7\\\\ide;$(ProgramFiles)\\\\HTML Help Workshop;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);')\n_p(2, '%s', prj.name)\n_p(2, '*.pdb;*.ilk;*.exp;*.lib;*.winmd;*.appxrecipe;*.pr" + "i;*.idb')\n_p(2, 'true')\nend\nif cfg.kind ~= \"StaticLib\" then\n_p(2,'%s', tostring(premake.config.isincrementallink(cfg)))\nend\nif cfg.flags.NoManifest then\n_p(2,'false')\nend\n_p(1,'')\nend\nend\nlocal function runtime(cfg)\nlocal runtime\nlocal flags = cfg.flags\nif premake.config.isdebugbuild(cfg) then\nruntime = iif(flags.StaticRuntime and not flags.Managed, \"MultiThreadedDebug\", \"MultiThreadedDebugDLL\")\nelse\nruntime = iif(flags.StaticRuntime and not flags.Managed, \"MultiThreaded\", \"MultiThreadedDLL\")\nend\nreturn runtime\nend\nlocal function precompiled_header(cfg)\n if not cfg.flags.NoPCH and cfg.pchheader then\n_p(3,'Use')\n_p(3,'%s', cfg.pchheader)\nelse\n_p(3,'')\nend\nend\nlocal functio" + "n preprocessor(indent,cfg)\nif #cfg.defines > 0 then\n_p(indent,'%s;%%(PreprocessorDefinitions)'\n,premake.esc(table.concat(cfg.defines, \";\")))\nelse\n_p(indent,'')\nend\nend\nlocal function include_dirs(indent,cfg)\nlocal includedirs = table.join(cfg.userincludedirs, cfg.includedirs)\nif #includedirs> 0 then\n_p(indent,'%s;%%(AdditionalIncludeDirectories)'\n,premake.esc(path.translate(table.concat(includedirs, \";\"), '\\\\')))\nend\nend\nlocal function resource_compile(cfg)\n_p(2,'')\npreprocessor(3,cfg)\ninclude_dirs(3,cfg)\n_p(2,'')\nend\nlocal function exceptions(cfg)\nif cfg.flags.NoExceptions then\n_p(3, 'false')\nelseif cfg.flags.SEH then\n_p(3, 'Async')\nend\nend\nlocal function rtti(cfg)\nif cfg.flags.NoRTTI and not cfg.flags.M" + "anaged then\n_p(3,'false')\nend\nend\nlocal function calling_convention(cfg)\nif cfg.flags.FastCall then\n_p(3,'FastCall')\nelseif cfg.flags.StdCall then\n_p(3,'StdCall')\nend\nend\nlocal function wchar_t_builtin(cfg)\nif cfg.flags.NativeWChar then\n_p(3,'true')\nelseif cfg.flags.NoNativeWChar then\n_p(3,'false')\nend\nend\nlocal function sse(cfg)\nif cfg.flags.EnableSSE then\n_p(3, 'StreamingSIMDExtensions')\nelseif cfg.flags.EnableSSE2 then\n_p(3, 'StreamingSIMDExtensions2')\nelseif cfg.flags.EnableAVX then\n_p(3, 'AdvancedVectorExtensions')\nelseif cfg.flags.EnableAVX2 then\n_p(3, 'AdvancedVectorExtensions2')\nend\nend\nlocal function floating_point(cfg)\n if cfg.flags.FloatFast then\n_p(3,'Fast')\nelseif cfg.flags.FloatStrict and not cfg.flags.Managed then\n_p(3,'Strict')\nend\nend\nlocal function debug_info(cfg)\nlocal debug_info = ''\nif cfg.flags.Symbols then\nif (action.vstudio.supports64bitEditContinue == false and cfg.platform == \"x64\")\nor cfg.flags.Managed\nor premake.config.isoptimizedbuild(cfg.flags)\nor cfg.flags.NoEditAndContinue\nthen\ndebug_info = \"ProgramDatabase\"\nelse\ndebug_info = \"EditAndContinue\"\nend\nend\n_p(3,'%s',debug_info)\nend\nlocal function minimal_build(cfg)\nif premake.config.isdebugbuild(cfg) and cfg.flags.EnableMinimalRebuild then\n_p(3,'true')\nelse\n_p(3,'false')\nend\nend\nlocal function compile_language(cfg)\nif c" + "fg.options.ForceCPP then\n_p(3,'CompileAsCpp')\nelse\nif cfg.language == \"C\" then\n_p(3,'CompileAsC')\nend\nend\nend\nlocal function forcedinclude_files(indent,cfg)\nif #cfg.forcedincludes > 0 then\n_p(indent,'%s'\n,premake.esc(path.translate(table.concat(cfg.forcedincludes, \";\"), '\\\\')))\nend\nend\nlocal function vs10_clcompile(cfg)\n_p(2,'')\n_p(3,'%s %s%%(AdditionalOptions)'\n, table.concat(premake.esc(cfg.buildoptions), \" \")\n, iif(cfg.flags.UnsignedChar, \"/J \", \" \")\n)\n_p(3,'%s',optimisation(cfg))\ninclude_dirs(3, cfg)\npreprocessor(3, cfg)\nminimal_build(cfg)\nif not premake.config.isoptimizedbuild(cfg.flags) then\nif not cfg.flags.Managed then\n_p(3,'EnableFastChecks')\nend\nif cfg.flags.ExtraWarnings then\nend\nelse\n_p(3,'true')\nend\nif cfg.platform == " + "\"Durango\" or cfg.flags.NoWinRT then\n_p(3, 'false')\nend\nif cfg.platform ~= \"Durango\" then\n_p(3,'%s', runtime(cfg))\nend\nif cfg.flags.NoBufferSecurityCheck then\n_p(3,'false')\nend\n_p(3,'true')\nif not cfg.flags.NoMultiProcessorCompilation and not cfg.flags.EnableMinimalRebuild then\n_p(3,'true')\nelse\n_p(3,'false')\nend\nprecompiled_header(cfg)\nif cfg.flags.ExtraWarnings then\n_p(3,'Level4')\nelseif cfg.flags.MinimumWarnings then\n_p(3,'Level1')\nelse\n_p(3,'Level3')\nend\nif cfg.flags.FatalWarnings then\n_p(3,'true')\nend\nexceptions(cfg)\nrtti(cfg)\ncalling_convention(cfg)\nwchar_t_builtin(cfg)\nsse(cfg)\nfloat" + "ing_point(cfg)\ndebug_info(cfg)\nif cfg.flags.Symbols then\n_p(3,'$(OutDir)%s.pdb'\n, path.getbasename(cfg.buildtarget.name))\nend\nif cfg.flags.NoFramePointer then\n_p(3,'true')\nend\nif cfg.flags.UseFullPaths then\n_p(3, 'true')\nend\ncompile_language(cfg)\nforcedinclude_files(3,cfg);\n_p(2,'')\nend\nlocal function event_hooks(cfg)\nif #cfg.postbuildcommands> 0 then\n _p(2,'')\n_p(3,'%s',premake.esc(table.implode(cfg.postbuildcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'')\nend\nif #cfg.prebuildcommands> 0 then\n _p(2,'')\n_p(3,'%s',premake.esc(table.implode(cfg.prebuildcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'')\nend\nif #cfg.prelinkcommands> 0 then\n _p(2,'')\n_p(3,'%s',premake.esc(table.implode(cfg.prelinkcommands, \"\", \"\", \"\\r\\n" + "\")))\n_p(2,'')\nend\nend\nlocal function additional_options(indent,cfg)\nif #cfg.linkoptions > 0 then\n_p(indent,'%s %%(AdditionalOptions)',\ntable.concat(premake.esc(cfg.linkoptions), \" \"))\nend\nend\nlocal function link_target_machine(index,cfg)\nlocal platforms = {x32 = 'MachineX86', x64 = 'MachineX64'}\nif platforms[cfg.platform] then\n_p(index,'%s', platforms[cfg.platform])\nend\nend\nlocal function item_def_lib(cfg)\n -- The Xbox360 project files are stored in another place in the project file.\nif cfg.kind == 'StaticLib' and cfg.platform ~= \"Xbox360\" then\n_p(1,'')\n_p(2,'$(OutDir)%s',cfg.buildtarget.name)\nadditional_options(2,cfg)\nlink_target_machine(2,cfg)\n_p(1,'')\nend\nend\nlocal function import_lib(cfg)\nif cfg.kind == \"SharedLib\" then\nlocal implibname = cfg.linktarget.fullpath\n_p(3,'%s',iif(cfg.flags.NoImportLib, cfg.objectsdir .." + " \"\\\\\" .. path.getname(implibname), implibname))\nend\nend\nlocal function hasmasmfiles(prj)\nlocal files = vc2010.getfilegroup(prj, \"MASM\")\nreturn #files > 0\nend\nlocal function vs10_masm(prj, cfg)\nif hasmasmfiles(prj) then\n_p(2, '')\nlocal includedirs = table.join(cfg.userincludedirs, cfg.includedirs)\nif #includedirs > 0 then\n_p(3, '%s;%%(IncludePaths)'\n, premake.esc(path.translate(table.concat(includedirs, \";\"), '\\\\'))\n)\nend\nlocal defines = table.join(cfg.defines)\ntable.insertflat(defines, iif(premake.config.isdebugbuild(cfg), \"_DEBUG\", {}))\ntable.insert(defines, iif(cfg.platform == \"x64\", \"_WIN64\", \"_WIN32\"))\ntable.insert(defines, iif(prj.kind == \"SharedLib\", \"_EXPORT=EXPORT\", \"_EXPORT=\"))\n_p(3, '%s;%%(PreprocessorDefinitions)'\n, premake.esc(table.concat(defines, \";\"))\n)\nif cfg.flags.FatalWarnings then\n_p(3,'true')\nend\nif cfg.flags" + ".MinimumWarnings then\n_p(3,'0')\nelse\n_p(3,'3')\nend\n_p(2, '')\nend\nend\nfunction vc2010.link(cfg)\n_p(2,'')\n_p(3,'%s', iif(cfg.kind == \"ConsoleApp\", \"Console\", \"Windows\"))\n_p(3,'%s', tostring(cfg.flags.Symbols ~= nil))\nif premake.config.isoptimizedbuild(cfg.flags) then\n_p(3,'true')\n_p(3,'true')\nend\nif cfg.kind ~= 'StaticLib' then\nvc2010.additionalDependencies(3,cfg)\n_p(3,'$(OutDir)%s', cfg.buildtarget.name)\nif #cfg.libdirs > 0 then\n_p(3,'%s;%%(AdditionalLibraryDirectories)'\n, premake.esc(path.translate(table.concat(cfg.libdirs, ';'), '\\\\'))\n)\nend\nif vc2010.config_type(cfg) == 'Application' and not cfg.flags.WinMain and not cfg.flags.Managed then\nif cfg.flags.Unicode then" + "\n_p(3,'wmainCRTStartup')\nelse\n_p(3,'mainCRTStartup')\nend\nend\nimport_lib(cfg)\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\n_p(3,'%s', deffile)\nend\nlink_target_machine(3,cfg)\nadditional_options(3,cfg)\n if cfg.flags.NoWinMD and vstudio.iswinrt() and prj.kind == \"WindowedApp\" then\n_p(3,'false' )\n end\nend\n_p(2,'')\nend\nfunction vc2010.additionalDependencies(tab,cfg)\nlocal links = premake.getlinks(cfg, \"system\", \"fullpath\")\nif #links > 0 then\n_p(tab,'%s;%s'\n, table.concat(links, \";\")\n, iif(cfg.platform == \"Durango\"\n, '$(XboxExtensionsDependencies)'\n, '%(AdditionalDependencies)'\n)\n)\nend\nend\nlocal function item_definitions(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(" + "prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(1,''\n,premake.esc(cfginfo.name))\nvs10_clcompile(cfg)\nresource_compile(cfg)\nitem_def_lib(cfg)\nvc2010.link(cfg)\nevent_hooks(cfg)\nvs10_masm(prj, cfg)\n_p(1,'')\nend\nend\nfunction vc2010.getfilegroup(prj, group)\nlocal sortedfiles = prj.vc2010sortedfiles\nif not sortedfiles then\nsortedfiles = {\nClCompile = {},\nClInclude = {},\nMASM = {},\nNone = {},\nResourceCompile = {},\nAppxManifest = {},\nImage = {},\nDeploymentContent = {}\n}\nlocal foundAppxManifest = false\nfor file in premake.project.eachfile(prj) do\nif path.isSourceFileVS(file.name) then\ntable.insert(sortedfiles.ClCompile, file)\nelseif path.iscppheader(file.name) then\nif not table.icontains(prj.removefiles, file) then\ntable.insert(sortedfiles.ClInclude, file)\nend\nelseif path.isresourcefile(file.name) then\ntable.insert(sortedfiles.ResourceCompile, file)\nelseif path.isappxmanifest(file.name) then\nfoundAppxMani" + "fest = true\ntable.insert(sortedfiles.AppxManifest, file)\nelseif path.isasmfile(file.name) then\ntable.insert(sortedfiles.MASM, file)\nelseif file.flags and table.icontains(file.flags, \"DeploymentContent\") then\ntable.insert(sortedfiles.DeploymentContent, file)\nelse\ntable.insert(sortedfiles.None, file)\nend\nend\nif vstudio.iswinrt() and prj.kind == \"WindowedApp\" and not foundAppxManifest then\nvstudio.needAppxManifest = true\nlocal fcfg = {}\nfcfg.name = prj.name .. \"/Package.appxmanifest\"\nfcfg.vpath = premake.project.getvpath(prj, fcfg.name)\ntable.insert(sortedfiles.AppxManifest, fcfg)\nlocal logo = {}\nlogo.name = prj.name .. \"/Logo.png\"\nlogo.vpath = logo.name\ntable.insert(sortedfiles.Image, logo)\nlocal smallLogo = {}\nsmallLogo.name = prj.name .. \"/SmallLogo.png\"\nsmallLogo.vpath = smallLogo.name\ntable.insert(sortedfiles.Image, smallLogo)\nlocal storeLogo = {}\nstoreLogo.name = prj.name .. \"/StoreLogo.png\"\nstoreLogo.vpath = storeLogo.name\ntable.insert(sortedfiles.Image, storeLogo)" + "\nlocal splashScreen = {}\nsplashScreen.name = prj.name .. \"/SplashScreen.png\"\nsplashScreen.vpath = splashScreen.name\ntable.insert(sortedfiles.Image, splashScreen)\nend\nprj.vc2010sortedfiles = sortedfiles\nend\nreturn sortedfiles[group]\nend\nfunction vc2010.files(prj)\nvc2010.simplefilesgroup(prj, \"ClInclude\")\nvc2010.compilerfilesgroup(prj)\nvc2010.simplefilesgroup(prj, \"None\")\nvc2010.customtaskgroup(prj)\nvc2010.simplefilesgroup(prj, \"ResourceCompile\")\nvc2010.simplefilesgroup(prj, \"AppxManifest\")\nvc2010.deploymentcontentgroup(prj, \"Image\")\nvc2010.deploymentcontentgroup(prj, \"DeploymentContent\", \"None\")\nend\nfunction vc2010.customtaskgroup(prj)\nlocal files = { }\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal fcfg = { }\nfcfg.name = path.getrelative(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nif #files > 0 then\n_p(1,'')\nlocal groupedB" + "uildTasks = {}\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nif (groupedBuildTasks[buildtask[1]] == nil) then\ngroupedBuildTasks[buildtask[1]] = {}\nend\ntable.insert(groupedBuildTasks[buildtask[1]], buildtask)\nend\nend\nfor name, custombuildtask in pairs(groupedBuildTasks or {}) do\n_p(2,'', path.translate(path.getrelative(prj.location,name), \"\\\\\"))\n_p(3,'Text')\nlocal cmd = \"\"\nlocal outputs = \"\"\nfor _, buildtask in ipairs(custombuildtask or {}) do\nfor _, cmdline in ipairs(buildtask[4] or {}) do\ncmd = cmd .. cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[1])))\ncmd = string.gsub(cmd, \"%$%(@%)\", string.format(\"%s \",pa" + "th.getrelative(prj.location,buildtask[2])))\ncmd = cmd .. \"\\r\\n\"\nend\noutputs = outputs .. path.getrelative(prj.location,buildtask[2]) .. \";\"\nend\n_p(3,'%s',cmd)\n_p(3,'%s%%(Outputs)',outputs)\n_p(3,'Designer')\n_p(3,'')\n_p(2,'')\nend\n_p(1,'')\nend\nend\nfunction vc2010.simplefilesgroup(prj, section, subtype)\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1,'')\nfor _, file in ipairs(files) do\nif subtype then\n_p(2,'<%s Include=\\\"%s\\\">', section, path.translate(file.name, \"\\\\\"))\n_p(3,'%s', subtype)\n_p(2,'', section)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', section, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'')\nend\nend\nfunction vc2010.deploymentcontentgroup(prj, section, filetype)\nif filetype == nil then\nfiletype = section\nend\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1" + ",'')\nfor _, file in ipairs(files) do\n_p(2,'<%s Include=\\\"%s\\\">', filetype, path.translate(file.name, \"\\\\\"))\n_p(3,'true')\n_p(3,'%s', path.translate(file.vpath, \"\\\\\"))\n_p(2,'', filetype)\nend\n_p(1,'')\nend\nend\nfunction vc2010.compilerfilesgroup(prj)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.getfilegroup(prj, \"ClCompile\")\nif #files > 0 then\nlocal config_mappings = {}\nfor _, cfginfo in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nif cfg.pchheader and cfg.pchsource and not cfg.flags.NoPCH then\nconfig_mappings[cfginfo] = path.translate(cfg.pchsource, \"\\\\\")\nend\nend\n_p(1,'')\nfor _, file in ipairs(files) do\nlocal translatedpath = path.translate(file.name, \"\\\\\")\n_p(2, '', translatedpath)\n_p(3, '$(IntDir)%s\\\\'\n, premake.esc(path.translate(path.tr" + "imdots(path.getdirectory(file.name))))\n)\nif path.iscxfile(file.name) then\n_p(3, 'true')\n_p(3, 'true')\n_p(3, 'NotUsing')\nend\nif vstudio.iswinrt() and string.len(file.name) > 2 and string.sub(file.name, -2) == \".c\" then\n_p(3,'FALSE')\nend\nfor _, cfginfo in ipairs(configs) do\nif config_mappings[cfginfo] and translatedpath == config_mappings[cfginfo] then\n_p(3,'Create', premake.esc(cfginfo.name))\nconfig_mappings[cfginfo] = nil --only one source file per pch\nend\nend\nlocal nopch = table.icontains(prj.nopch, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif nopch or table.icontains(cfg.nopch, file.name) then\n_p(3,'NotUsing', premake." + "esc(vsconfig.name))\nend\nend\nlocal excluded = table.icontains(prj.excludes, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif excluded or table.icontains(cfg.excludes, file.name) then\n_p(3, 'true'\n, premake.esc(vsconfig.name)\n)\nend\nend\n_p(2,'')\nend\n_p(1,'')\nend\nend\nfunction vc2010.masmfiles(prj)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.getfilegroup(prj, \"MASM\")\nif #files > 0 then\n_p(1, '')\nfor _, file in ipairs(files) do\nlocal translatedpath = path.translate(file.name, \"\\\\\")\n_p(2, '', translatedpath)\nlocal excluded = table.icontains(prj.excludes, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif excluded or table.icontains(cfg.excludes, file.name) then\n_p(3, '" + "true'\n, premake.esc(vsconfig.name)\n)\nend\nend\n_p(2, '')\nend\n_p(1, '')\nend\nend\nfunction vc2010.header(targets)\nio.eol = \"\\r\\n\"\n_p('')\nlocal t = \"\"\nif targets then\nt = ' DefaultTargets=\"' .. targets .. '\"'\nend\n_p('', t, action.vstudio.toolsVersion)\nend\nfunction premake.vs2010_vcxproj(prj)\nlocal usemasm = hasmasmfiles(prj)\nio.indent = \" \"\nvc2010.header(\"Build\")\nvs2010_config(prj)\nvs2010_globals(prj)\n_p(1,'')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc2010.configurationPropertyGroup(cfg, cfginfo)\nend\n_p(1,'')\n_p(1,'')\nif usemasm then\n_p(2, '')\nend\n_p(1,'')\nimport_props(prj)\n_p(1,'')\nvc2010.outputProperties(prj)\nitem_definitions(prj)\nvc2010.files(prj)\nvc2010.projectReferences(prj)\nvc2010.masmfiles(prj)\n_p(1,'')\n_p(1,'')\nif usemasm then\n_p(2, '')\nend\n_p(1,'')\n_p('')\nend\nfunction vc2010.projectReferences(prj)\nlocal deps = premake.getdependencies(prj)\nif #deps > 0 then\n_p(1,'')\nfor _, dep in ipairs(deps) do\nlocal deppath = path.getrelative(prj.location, vstudio.projectfile(dep))\n_p(2,'', path.translate(deppath, \"\\\\\"))\n_p(3,'{%s}', dep.uuid)\nif vstudio.iswinrt() then\n_" + "p(3,'false')\nend\n_p(2,'')\nend\n_p(1,'')\nend\nend\nfunction vc2010.debugdir(cfg)\nif cfg.debugdir and not vstudio.iswinrt() then\n_p(' %s', path.translate(cfg.debugdir, '\\\\'))\n_p(' WindowsLocalDebugger')\nend\nif cfg.debugargs then\n_p(' %s', table.concat(cfg.debugargs, \" \"))\nend\nend\nfunction vc2010.debugenvs(cfg)\nif cfg.debugenvs and #cfg.debugenvs > 0 then\n_p(2,'%s%s',table.concat(cfg.debugenvs, \"\\n\")\n,iif(cfg.flags.DebugEnvsInherit,'\\n$(LocalDebuggerEnvironment)','')\n)\nif cfg.flags.DebugEnvsDontMerge then\n_p(2,'false')\nend\nend\nend\nfunction premake.vs2010_vcxproj_user(prj)\nio.indent = \" \"\nvc2010.header()\nfor _, cfginfo" + " in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(' ', premake.esc(cfginfo.name))\nvc2010.debugdir(cfg)\nvc2010.debugenvs(cfg)\n_p(' ')\nend\n_p('')\nend\nlocal png1x1data = {\n0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, -- .PNG........IHDR\n0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, 0xdb, 0x56, -- .............%.V\n0xca, 0x00, 0x00, 0x00, 0x03, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xa7, 0x7a, 0x3d, 0xda, -- .....PLTE....z=.\n0x00, 0x00, 0x00, 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, -- ....tRNS.@..f...\n0x0a, 0x49, 0x44, 0x41, 0x54, 0x08, 0xd7, 0x63, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0xe2, -- .IDAT..c`.......\n0x21, 0xbc, 0x33, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, -- !.3....IEN" + "D.B`.\n}\nfunction png1x1(obj, filename)\nfilename = premake.project.getfilename(obj, filename)\nlocal f, err = io.open(filename, \"wb\")\nif f then\nfor _, byte in ipairs(png1x1data) do\nf:write(string.char(byte))\nend\nf:close()\nend\nend\nfunction premake.vs2010_appxmanifest(prj)\nio.indent = \" \"\nio.eol = \"\\r\\n\"\n_p('')\nif vstudio.toolset == \"v120_wp81\" then\n_p('')\nelseif vstudio.storeapp == \"8.1\" then\n_p('')\nelseif vstudio.storeapp == \"durango\" then\n_p('')\nelse\n_p('')\nend\n_p(1,'')\nif vstudio.toolset == \"v120_wp81\" or vstudio.storeapp == \"8.2\" then\n_p(1,'')\nend\n_p(1, '')\n_p(2, '' .. prj.name .. '')\n_p(2, 'PublisherDisplayName')\n_p(2, '' .. prj.name .. '\\\\StoreLogo.png')\npng1x1(prj, \"%%/StoreLogo.png\")\n_p(2, '' .. prj.name .. '')\n_p(1,'')\nif vstudio.storeapp == \"8.2\" then\n_p(1, '')\n_p(2, '')\n_p(1, '')\nelseif vstudio.storeapp == \"durango\" then\n_p(1, '')\n_p(2, '6.2')\n_p(2, '6.2')\n_p(1, '')\nelse\n_p(1, '')\n_p(2, '6.3.0')\n_p(2, '6.3.0')\n_p(1, '')\nend\n_p(1,'')\n_p(2,'')\n_p(1,'')\n_p(1,'')\n_p(2,'')\nif vstudio.storeapp == \"durango\" then\n_p(3, '')\n_p(5, '')\npng1x1(prj, \"%%/SplashScreen.png\")\n_p(3, '')\n_p(3, '')\n_p(4, '')\n_p(4, '')\n_p(4, '')\n_p(3, '')\nelse\n_p(3, '')\n_p(4, '')\nend\n_p(2,'')\n_p(1,'')\n_p('')\nend\n", /* actions/vstudio/vs2010_vcxproj_filters.lua */ "local vc2010 = premake.vstudio.vc2010\nlocal project = premake.project\nfunction vc2010.filteridgroup(prj)\nlocal filters = { }\nlocal filterfound = false\nfor file in project.eachfile(prj) do\nlocal folders = string.explode(file.vpath, \"/\", true)\nlocal path = \"\"\nfor i = 1, #folders - 1 do\nif not filterfound then\nfilterfound = true\n_p(1,'')\nend\npath = path .. folders[i]\nif not filters[path] then\nfilters[path] = true\n_p(2, '', path)\n_p(3, '{%s}', os.uuid(path))\n_p(2, '')\nend\npath = path .. \"\\\\\"\nend\nend\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal folders = string.explode(path.trimdots(path.getrelative(prj.location,buildtask[1])), \"/\", true)\nlocal path = \"\"\nfor i = 1, #folders - 1 do\nif not filterfound then\nfilterfound = true\n_p(1,'')\nend\npath = path .. folders[i]\nif not filters[path] then\nfilters[path] = tr" "ue\n_p(2, '', path)\n_p(3, '{%s}', os.uuid(path))\n_p(2, '')\nend\npath = path .. \"\\\\\"\nend\nend\nend\nif filterfound then\n_p(1,'')\nend\nend\nfunction vc2010.filefiltergroup(prj, section, kind)\nlocal files = vc2010.getfilegroup(prj, section) or {}\nif kind == nill then\nkind = section\nend\nif (section == \"CustomBuild\") then\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal fcfg = { }\nfcfg.name = path.getrelative(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nend\nif #files > 0 then\n_p(1,'')\nfor _, file in ipairs(files) do\nlocal filter\nif file.name ~= file.vpath then\nfilter = path.getdirectory(file.vpath)\nelse\nfilter = path.getdirectory(file.name)\nend\nif filter ~= \".\" then\n_p(2,'<%s Include=\\\"%s\\\">', kind, path.translate(file.name, \"\\\\\"))\n_p(3,'%s', path.translate(filter, \"\\\\\"))\n_p(2,'', kind)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', kind, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'')\nend\nend\nfunction vc2010.generate_filters(prj)\nio.indent = \" \"\nvc2010.header()\nvc2010.filteridgroup(prj)\nvc2010.filefiltergroup(prj, \"None\")\nvc2010.filefiltergroup(prj, \"ClInclude\")\nvc2010.filefiltergroup(prj, \"ClCompile\")\nvc2010.filefiltergroup(prj, \"ResourceCompile\")\nvc2010.filefiltergroup(prj, \"CustomBuild\")\nvc2010.filefiltergroup(prj, \"AppxManifest\")\nvc2010.filefiltergroup(prj, \"Image\")\nvc2010.filefiltergroup(prj, \"DeploymentContent\", \"None\")\n_p('')\nend\n", + "ter>', path.translate(filter, \"\\\\\"))\n_p(2,'', kind)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', kind, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'')\nend\nend\nfunction vc2010.generate_filters(prj)\nio.indent = \" \"\nvc2010.header()\nvc2010.filteridgroup(prj)\nvc2010.filefiltergroup(prj, \"None\")\nvc2010.filefiltergroup(prj, \"ClInclude\")\nvc2010.filefiltergroup(prj, \"ClCompile\")\nvc2010.filefiltergroup(prj, \"ResourceCompile\")\nvc2010.filefiltergroup(prj, \"CustomBuild\")\nvc2010.filefiltergroup(prj, \"AppxManifest\")\nvc2010.filefiltergroup(prj, \"Image\")\nvc2010.filefiltergroup(prj, \"DeploymentContent\", \"None\")\nvc2010.filefiltergroup(prj, \"MASM\")\n_p('')\nend\n", /* actions/vstudio/vs2012.lua */ "premake.vstudio.vc2012 = {}\nlocal vc2012 = premake.vstudio.vc2012\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2012\",\nshortname = \"Visual Studio 2012\",\ndescription = \"Generate Microsoft Visual Studio 2012 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\" },\nvalid_languages = { \"C\", \"C++\", \"C#\"},\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nend" @@ -347,35 +367,35 @@ const char* builtin_scripts[] = { "nction(prj)\npremake.clean.directory(prj, \"%%.xcodeproj\")\npremake.clean.directory(prj, \"%%.xcworkspace\")\nend,\noncheckproject = function(prj)\nlocal last\nfor cfg in premake.eachconfig(prj) do\nif last and last ~= cfg.kind then\nerror(\"Project '\" .. prj.name .. \"' uses more than one target kind; not supported by Xcode\", 0)\nend\nlast = cfg.kind\nend\nend,\n}\n", /* actions/xcode/xcode_common.lua */ - "premake.xcode.parameters = { }\nlocal xcode = premake.xcode\nlocal tree = premake.tree\nfunction xcode.getbuildcategory(node)\nlocal categories = {\n[\".a\"] = \"Frameworks\",\n[\".c\"] = \"Sources\",\n[\".cc\"] = \"Sources\",\n[\".cpp\"] = \"Sources\",\n[\".cxx\"] = \"Sources\",\n[\".dylib\"] = \"Frameworks\",\n[\".framework\"] = \"Frameworks\",\n[\".m\"] = \"Sources\",\n[\".mm\"] = \"Sources\",\n[\".strings\"] = \"Resources\",\n[\".nib\"] = \"Resources\",\n[\".xib\"] = \"Resources\",\n[\".icns\"] = \"Resources\",\n[\".bmp\"] = \"Resources\",\n[\".wav\"] = \"Resources\",\n}\nreturn categories[path.getextension(node.name)]\nend\nfunction xcode.getconfigname(cfg)\nlocal name = cfg.name\nif #cfg.project.solution.xcode.platforms > 1 then\nname = name .. \" \" .. premake.action.current().valid_platforms[cfg.platform]\nend\nreturn name\nend\nfunction xcode.getfiletype(node)\nlocal types = {\n[\".c\"] = \"sourcecode.c.c\",\n[\".cc\"] = \"sourcecode.cpp.cpp\",\n[\".cpp\"] = \"sourcecode.cpp.cpp" - "\",\n[\".css\"] = \"text.css\",\n[\".cxx\"] = \"sourcecode.cpp.cpp\",\n[\".framework\"] = \"wrapper.framework\",\n[\".gif\"] = \"image.gif\",\n[\".h\"] = \"sourcecode.c.h\",\n[\".html\"] = \"text.html\",\n[\".lua\"] = \"sourcecode.lua\",\n[\".m\"] = \"sourcecode.c.objc\",\n[\".mm\"] = \"sourcecode.cpp.objcpp\",\n[\".nib\"] = \"wrapper.nib\",\n[\".pch\"] = \"sourcecode.c.h\",\n[\".plist\"] = \"text.plist.xml\",\n[\".strings\"] = \"text.plist.strings\",\n[\".xib\"] = \"file.xib\",\n[\".icns\"] = \"image.icns\",\n[\".bmp\"] = \"image.bmp\",\n[\".wav\"] = \"audio.wav\",\n}\nreturn types[path.getextension(node.path)] or \"text\"\nend\nfunction xcode.getfiletypeForced(node)\nlocal types = {\n[\".c\"] = \"sourcecode.cpp.cpp\",\n[\".cc\"] = \"sourcecode.cpp.cpp\",\n[\".cpp\"] = \"sourcecode.cpp.cpp\",\n[\".css\"] = \"text.css\",\n[\".cxx\"] = \"sourcecode.cpp.cpp\",\n[\".framework\"] = \"wrappe" - "r.framework\",\n[\".gif\"] = \"image.gif\",\n[\".h\"] = \"sourcecode.cpp.h\",\n[\".html\"] = \"text.html\",\n[\".lua\"] = \"sourcecode.lua\",\n[\".m\"] = \"sourcecode.cpp.objcpp\",\n[\".mm\"] = \"sourcecode.cpp.objcpp\",\n[\".nib\"] = \"wrapper.nib\",\n[\".pch\"] = \"sourcecode.cpp.h\",\n[\".plist\"] = \"text.plist.xml\",\n[\".strings\"] = \"text.plist.strings\",\n[\".xib\"] = \"file.xib\",\n[\".icns\"] = \"image.icns\",\n[\".bmp\"] = \"image.bmp\",\n[\".wav\"] = \"audio.wav\",\n}\nreturn types[path.getextension(node.path)] or \"text\"\nend\nfunction xcode.getproducttype(node)\nlocal types = {\nConsoleApp = \"com.apple.product-type.tool\",\nWindowedApp = \"com.apple.product-type.application\",\nStaticLib = \"com.apple.product-type.library.static\",\nSharedLib = \"com.apple.product-type.library.dynamic\",\n}\nreturn types[node.cfg.kind]\nend\nfunction xcode.gettargettype(node)\nlocal types = {\nConsoleApp = \"\\\"compiled.mac" - "h-o.executable\\\"\",\nWindowedApp = \"wrapper.application\",\nStaticLib = \"archive.ar\",\nSharedLib = \"\\\"compiled.mach-o.dylib\\\"\",\n}\nreturn types[node.cfg.kind]\nend\nfunction xcode.getxcodeprojname(prj)\nlocal fname = premake.project.getfilename(prj, \"%%.xcodeproj\")\nreturn fname\nend\nfunction xcode.isframework(fname)\nreturn (path.getextension(fname) == \".framework\")\nend\nfunction xcode.newid()\nreturn string.format(\"%04X%04X%04X%04X%04X%04X\",\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767))\nend\nfunction xcode.preparesolution(sln)\nsln.xcode = { }\nsln.xcode.platforms = premake.filterplatforms(sln, premake.action.current().valid_platforms, \"Universal\")\nfor prj in premake.solution.eachproject(sln) do\nlocal cfg = premake.getconfig(prj, prj.configurations[1], sln.xcode.platforms[1])\nlocal node = premake.tree.new(path.getname(cfg.buildtarget.bundlepath))\nnode.cfg = cfg\nnode.id = premake.x" - "code.newid(node, \"product\")\nnode.targetid = premake.xcode.newid(node, \"target\")\nprj.xcode = {}\nprj.xcode.projectnode = node\nend\nend\nfunction xcode.printlist(list, tag)\nif #list > 0 then\n_p(4,'%s = (', tag)\nfor _, item in ipairs(list) do\nlocal escaped_item = item:gsub(\"\\\"\", \"\\\\\\\"\")\n_p(5, '\"%s\",', escaped_item)\nend\n_p(4,');')\nend\nend\nfunction xcode.Header()\n_p('// !$*UTF8*$!')\n_p('{')\n_p(1,'archiveVersion = 1;')\n_p(1,'classes = {')\n_p(1,'};')\n_p(1,'objectVersion = 45;')\n_p(1,'objects = {')\n_p('')\nend\nfunction xcode.PBXBuildFile(tr)\n_p('/* Begin PBXBuildFile section */')\ntree.traverse(tr, {\nonnode = function(node)\nif node.buildid then\n_p(2,'%s /* %s in %s */ = {isa = PBXBuildFile; fileRef = %s /* %s */; };', \nnode.buildid, node.name, xcode.getbuildcategory(node), node.id, node.name)\nend\nend\n})\n_p('/* End PBXBuildFile section */')\n_p('')\nend\nfunction xcode.PBXContainerItemProxy(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXContainerItemProxy section " - "*/')\nfor _, node in ipairs(tr.projects.children) do\n_p(2,'%s /* PBXContainerItemProxy */ = {', node.productproxyid)\n_p(3,'isa = PBXContainerItemProxy;')\n_p(3,'containerPortal = %s /* %s */;', node.id, path.getname(node.path))\n_p(3,'proxyType = 2;')\n_p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.id)\n_p(3,'remoteInfo = \"%s\";', node.project.xcode.projectnode.name)\n_p(2,'};')\n_p(2,'%s /* PBXContainerItemProxy */ = {', node.targetproxyid)\n_p(3,'isa = PBXContainerItemProxy;')\n_p(3,'containerPortal = %s /* %s */;', node.id, path.getname(node.path))\n_p(3,'proxyType = 1;')\n_p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.targetid)\n_p(3,'remoteInfo = \"%s\";', node.project.xcode.projectnode.name)\n_p(2,'};')\nend\n_p('/* End PBXContainerItemProxy section */')\n_p('')\nend\nend\nfunction xcode.PBXFileReference(tr,prj)\n_p('/* Begin PBXFileReference section */')\ntree.traverse(tr, {\nonleaf = function(node)\nif not node.path then\nreturn\nend\nif node.kind == \"product\"" - " then\n_p(2,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; includeInIndex = 0; name = \"%s\"; path = \"%s\"; sourceTree = BUILT_PRODUCTS_DIR; };',\nnode.id, node.name, xcode.gettargettype(node), node.name, path.getname(node.cfg.buildtarget.bundlepath))\nelseif node.parent.parent == tr.projects then\nlocal relpath = path.getrelative(tr.project.location, node.parent.project.location)\n_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = \"wrapper.pb-project\"; name = \"%s\"; path = \"%s\"; sourceTree = SOURCE_ROOT; };',\nnode.parent.id, node.parent.name, node.parent.name, path.join(relpath, node.parent.name))\nelse\nlocal pth, src\nif xcode.isframework(node.path) then\nlocal nodePath = node.path\nlocal _, matchEnd, variable = string.find(nodePath, \"^%$%((.+)%)/\")\nif variable then\nnodePath = string.sub(nodePath, matchEnd + 1)\nend\nif string.find(nodePath,'/') then\nif string.find(nodePath,'^%.')then\nerror('relative paths are not currently supported for frameworks')\nend\npth = n" - "odePath\nelse\npth = \"/System/Library/Frameworks/\" .. nodePath\nend\nif variable then\nsrc = variable\nif string.find(pth, '^/') then\npth = string.sub(pth, 2)\nend\nelse\nsrc = \"\"\nend\nelse\nsrc = \"\"\nif node.parent.isvpath then\npth = node.cfg.name\nelse\npth = tree.getlocalpath(node)\nend\nend\nif (not prj.options.ForceCPP) then\n_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name = \"%s\"; path = \"%s\"; sourceTree = \"%s\"; };',\nnode.id, node.name, xcode.getfiletype(node), node.name, pth, src)\nelse\n_p(2,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; name = \"%s\"; path = \"%s\"; sourceTree = \"%s\"; };',\nnode.id, node.name, xcode.getfiletypeForced(node), node.name, pth, src)\nend\nend\nend\n})\n_p('/* End PBXFileReference section */')\n_p('')\nend\nfunction xcode.PBXFrameworksBuildPhase(tr)\n_p('/* Begin PBXFrameworksBuildPhase section */')\n_p(2,'%s /* Frameworks */ = {', tr.products.children[1].fxstageid)\n_p(3,'isa = PBXFrameworksBuildPh" - "ase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr.frameworks, {\nonleaf = function(node)\n_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)\nend\n})\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\n_p('/* End PBXFrameworksBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXGroup(tr)\n_p('/* Begin PBXGroup section */')\ntree.traverse(tr, {\nonnode = function(node)\nif (node.path and #node.children == 0) or node.kind == \"vgroup\" then\nreturn\nend\nif node.parent == tr.projects then\n_p(2,'%s /* Products */ = {', node.productgroupid)\nelse\n_p(2,'%s /* %s */ = {', node.id, node.name)\nend\n_p(3,'isa = PBXGroup;')\n_p(3,'children = (')\nfor _, childnode in ipairs(node.children) do\n_p(4,'%s /* %s */,', childnode.id, childnode.name)\nend\n_p(3,');')\nif node.parent == tr.projects then\n_p(3,'name = Products;')\nelse\n_p" - "(3,'name = \"%s\";', node.name)\nif node.path and not node.isvpath then\nlocal p = node.path\nif node.parent.path then\np = path.getrelative(node.parent.path, node.path)\nend\n_p(3,'path = \"%s\";', p)\nend\nend\n_p(3,'sourceTree = \"\";')\n_p(2,'};')\nend\n}, true)\n_p('/* End PBXGroup section */')\n_p('')\nend\nfunction xcode.PBXNativeTarget(tr)\n_p('/* Begin PBXNativeTarget section */')\nfor _, node in ipairs(tr.products.children) do\nlocal name = tr.project.name\nlocal function hasBuildCommands(which)\nif #tr.project[which] > 0 then\nreturn true\nend\nfor _, cfg in ipairs(tr.configs) do\nif #cfg[which] > 0 then\nreturn true\nend\nend\nend\n_p(2,'%s /* %s */ = {', node.targetid, name)\n_p(3,'isa = PBXNativeTarget;')\n_p(3,'buildConfigurationList = %s /* Build configuration list for PBXNativeTarget \"%s\" */;', node.cfgsection, name)\n_p(3,'buildPhases = (')\nif hasBuildCommands('prebuildcommands') then\n_p(4,'9607AE1010C857E500CD1376 /* Prebuild */,')\nend\n_p(4,'%s /* Resources */,', node.resstageid" - ")\n_p(4,'%s /* Sources */,', node.sourcesid)\nif hasBuildCommands('prelinkcommands') then\n_p(4,'9607AE3510C85E7E00CD1376 /* Prelink */,')\nend\n_p(4,'%s /* Frameworks */,', node.fxstageid)\nif hasBuildCommands('postbuildcommands') then\n_p(4,'9607AE3710C85E8F00CD1376 /* Postbuild */,')\nend\n_p(3,');')\n_p(3,'buildRules = (')\n_p(3,');')\n_p(3,'dependencies = (')\nfor _, node in ipairs(tr.projects.children) do\n_p(4,'%s /* PBXTargetDependency */,', node.targetdependid)\nend\n_p(3,');')\n_p(3,'name = \"%s\";', name)\nlocal p\nif node.cfg.kind == \"ConsoleApp\" then\np = \"$(HOME)/bin\"\nelseif node.cfg.kind == \"WindowedApp\" then\np = \"$(HOME)/Applications\"\nend\nif p then\n_p(3,'productInstallPath = \"%s\";', p)\nend\n_p(3,'productName = \"%s\";', name)\n_p(3,'productReference = %s /* %s */;', node.id, node.name)\n_p(3,'productType = \"%s\";', xcode.getproducttype(node))\n_p(2,'};')\nend\n_p('/* End PBXNativeTarget section */')\n_p('')\nend\nfunction xcode.PBXProject(tr)\n_p('/* Begin PBXProject section */" - "')\n_p(2,'08FB7793FE84155DC02AAC07 /* Project object */ = {')\n_p(3,'isa = PBXProject;')\n_p(3,'buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject \"%s\" */;', tr.name)\n_p(3,'compatibilityVersion = \"Xcode 3.2\";')\n_p(3,'hasScannedForEncodings = 1;')\n_p(3,'mainGroup = %s /* %s */;', tr.id, tr.name)\n_p(3,'projectDirPath = \"\";')\nif #tr.projects.children > 0 then\n_p(3,'projectReferences = (')\nfor _, node in ipairs(tr.projects.children) do\n_p(4,'{')\n_p(5,'ProductGroup = %s /* Products */;', node.productgroupid)\n_p(5,'ProjectRef = %s /* %s */;', node.id, path.getname(node.path))\n_p(4,'},')\nend\n_p(3,');')\nend\n_p(3,'projectRoot = \"\";')\n_p(3,'targets = (')\nfor _, node in ipairs(tr.products.children) do\n_p(4,'%s /* %s */,', node.targetid, node.name)\nend\n_p(3,');')\n_p(2,'};')\n_p('/* End PBXProject section */')\n_p('')\nend\nfunction xcode.PBXReferenceProxy(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXReferenceProxy section */')\ntree.traverse" - "(tr.projects, {\nonleaf = function(node)\n_p(2,'%s /* %s */ = {', node.id, node.name)\n_p(3,'isa = PBXReferenceProxy;')\n_p(3,'fileType = %s;', xcode.gettargettype(node))\n_p(3,'path = \"%s\";', node.path)\n_p(3,'remoteRef = %s /* PBXContainerItemProxy */;', node.parent.productproxyid)\n_p(3,'sourceTree = BUILT_PRODUCTS_DIR;')\n_p(2,'};')\nend\n})\n_p('/* End PBXReferenceProxy section */')\n_p('')\nend\nend\nfunction xcode.PBXResourcesBuildPhase(tr)\n_p('/* Begin PBXResourcesBuildPhase section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Resources */ = {', target.resstageid)\n_p(3,'isa = PBXResourcesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr, {\nonnode = function(node)\nif xcode.getbuildcategory(node) == \"Resources\" then\n_p(4,'%s /* %s in Resources */,', node.buildid, node.name)\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\nend\n_p('/* End PBXResourcesBuildPhase section */')\n_p('')\nend\nfunction" - " xcode.PBXShellScriptBuildPhase(tr)\nlocal wrapperWritten = false\nlocal function doblock(id, name, which)\nlocal prjcmds = tr.project[which]\nlocal commands = table.join(prjcmds, {})\nfor _, cfg in ipairs(tr.configs) do\nlocal cfgcmds = cfg[which]\nif #cfgcmds > #prjcmds then\ntable.insert(commands, 'if [ \"${CONFIGURATION}\" = \"' .. xcode.getconfigname(cfg) .. '\" ]; then')\nfor i = #prjcmds + 1, #cfgcmds do\ntable.insert(commands, cfgcmds[i])\nend\ntable.insert(commands, 'fi')\nend\nend\nif #commands > 0 then\nif not wrapperWritten then\n_p('/* Begin PBXShellScriptBuildPhase section */')\nwrapperWritten = true\nend\n_p(2,'%s /* %s */ = {', id, name)\n_p(3,'isa = PBXShellScriptBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\n_p(3,');')\n_p(3,'inputPaths = (');\n_p(3,');');\n_p(3,'name = %s;', name);\n_p(3,'outputPaths = (');\n_p(3,');');\n_p(3,'runOnlyForDeploymentPostprocessing = 0;');\n_p(3,'shellPath = /bin/sh;');\n_p(3,'shellScript = \"%s\";', table.concat(commands, \"\\\\n\"):gs" - "ub('\"', '\\\\\"'))\n_p(2,'};')\nend\nend\ndoblock(\"9607AE1010C857E500CD1376\", \"Prebuild\", \"prebuildcommands\")\ndoblock(\"9607AE3510C85E7E00CD1376\", \"Prelink\", \"prelinkcommands\")\ndoblock(\"9607AE3710C85E8F00CD1376\", \"Postbuild\", \"postbuildcommands\")\nif wrapperWritten then\n_p('/* End PBXShellScriptBuildPhase section */')\nend\nend\nfunction xcode.PBXSourcesBuildPhase(tr,prj)\n_p('/* Begin PBXSourcesBuildPhase section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Sources */ = {', target.sourcesid)\n_p(3,'isa = PBXSourcesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr, {\nonleaf = function(node)\nif xcode.getbuildcategory(node) == \"Sources\" then\n if not table.icontains(prj.excludes, node.cfg.name) then -- if not excluded\n_p(4,'%s /* %s in Sources */,', node.buildid, node.name)\n end\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\nend\n_p('/* End PBXSourcesBui" - "ldPhase section */')\n_p('')\nend\nfunction xcode.PBXVariantGroup(tr)\n_p('/* Begin PBXVariantGroup section */')\ntree.traverse(tr, {\nonbranch = function(node)\nif node.kind == \"vgroup\" then\n_p(2,'%s /* %s */ = {', node.id, node.name)\n_p(3,'isa = PBXVariantGroup;')\n_p(3,'children = (')\nfor _, lang in ipairs(node.children) do\n_p(4,'%s /* %s */,', lang.id, lang.name)\nend\n_p(3,');')\n_p(3,'name = %s;', node.name)\n_p(3,'sourceTree = \"\";')\n_p(2,'};')\nend\nend\n})\n_p('/* End PBXVariantGroup section */')\n_p('')\nend\nfunction xcode.PBXTargetDependency(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXTargetDependency section */')\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(2,'%s /* PBXTargetDependency */ = {', node.parent.targetdependid)\n_p(3,'isa = PBXTargetDependency;')\n_p(3,'name = \"%s\";', node.name)\n_p(3,'targetProxy = %s /* PBXContainerItemProxy */;', node.parent.targetproxyid)\n_p(2,'};')\nend\n})\n_p('/* End PBXTargetDependency section */')\n_p('')\nend\nend\nf" - "unction xcode.XCBuildConfiguration_Target(tr, target, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\n_p(2,'%s /* %s */ = {', cfg.xcode.targetid, cfgname)\n_p(3,'isa = XCBuildConfiguration;')\n_p(3,'buildSettings = {')\n_p(4,'ALWAYS_SEARCH_USER_PATHS = NO;')\nif not cfg.flags.Symbols then\n_p(4,'DEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";')\nend\nif cfg.kind ~= \"StaticLib\" and cfg.buildtarget.prefix ~= \"\" then\n_p(4,'EXECUTABLE_PREFIX = %s;', cfg.buildtarget.prefix)\nend\nif cfg.targetextension then\nlocal ext = cfg.targetextension\next = iif(ext:startswith(\".\"), ext:sub(2), ext)\n_p(4,'EXECUTABLE_EXTENSION = %s;', ext)\nend\nlocal outdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif outdir ~= \".\" then\n_p(4,'CONFIGURATION_BUILD_DIR = %s;', outdir)\nend\n_p(4,'GCC_DYNAMIC_NO_PIC = NO;')\n_p(4,'GCC_MODEL_TUNING = G5;')\nif tr.infoplist then\n_p(4,'INFOPLIST_FILE = \"%s\";', tr.infoplist.cfg.name)\nend\ninstallpaths = {\nConsoleApp = '/usr/local/bin',\nWindowedApp = '\"$(HOME)/Applications\"'," - "\nSharedLib = '/usr/local/lib',\nStaticLib = '/usr/local/lib',\n}\n_p(4,'INSTALL_PATH = %s;', installpaths[cfg.kind])\nlocal infoplist_file = nil\nfor _, v in ipairs(cfg.files) do\nif (string.find (string.lower (v), 'info.plist') ~= nil) then\ninfoplist_file = string.format('$(SRCROOT)/%s', v)\nend\nend\nif infoplist_file ~= nil then\n_p(4,'INFOPLIST_FILE = \"%s\";', infoplist_file)\nend\n_p(4,'PRODUCT_NAME = \"%s\";', cfg.buildtarget.basename)\n_p(3,'};')\n_p(3,'name = \"%s\";', cfgname)\n_p(2,'};')\nend\nfunction xcode.XCBuildConfiguration_Project(tr, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\n_p(2,'%s /* %s */ = {', cfg.xcode.projectid, cfgname)\n_p(3,'isa = XCBuildConfiguration;')\n_p(3,'buildSettings = {')\nlocal archs = {\nNative = \"$(NATIVE_ARCH_ACTUAL)\",\nx32 = \"i386\",\nx64 = \"x86_64\",\nUniversal32 = \"$(ARCHS_STANDARD_32_BIT)\",\nUniversal64 = \"$(ARCHS_STANDARD_64_BIT)\",\nUniversal = \"$(ARCHS_STANDARD_32_64_BIT)\",\n}\n_p(4,'ARCHS = \"%s\";', archs[cfg.platform])\n_p(4,'SDKROOT = " - "\"%s\";', xcode.toolset)\nlocal targetdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif targetdir ~= \".\" then\n_p(4,'CONFIGURATION_BUILD_DIR = \"$(SYMROOT)\";');\nend\n_p(4,'CONFIGURATION_TEMP_DIR = \"$(OBJROOT)\";')\nif cfg.flags.Symbols then\n_p(4,'COPY_PHASE_STRIP = NO;')\nend\n_p(4,'GCC_C_LANGUAGE_STANDARD = gnu99;')\nif cfg.flags.NoExceptions then\n_p(4,'GCC_ENABLE_CPP_EXCEPTIONS = NO;')\nend\nif cfg.flags.NoRTTI then\n_p(4,'GCC_ENABLE_CPP_RTTI = NO;')\nend\nif _ACTION ~= \"xcode4\" and cfg.flags.Symbols and not cfg.flags.NoEditAndContinue then\n_p(4,'GCC_ENABLE_FIX_AND_CONTINUE = YES;')\nend\nif cfg.flags.NoExceptions then\n_p(4,'GCC_ENABLE_OBJC_EXCEPTIONS = NO;')\nend\nif cfg.flags.Optimize or cfg.flags.OptimizeSize then\n_p(4,'GCC_OPTIMIZATION_LEVEL = s;')\nelseif cfg.flags.OptimizeSpeed then\n_p(4,'GCC_OPTIMIZATION_LEVEL = 3;')\nelse\n_p(4,'GCC_OPTIMIZATION_LEVEL = 0;')\nend\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(4,'GCC_PRECOMPILE_PREFIX_HEADER = YES;')\n_p(4,'GCC_PREFIX_HEADER = " - "\"%s\";', cfg.pchheader)\nend\nxcode.printlist(cfg.defines, 'GCC_PREPROCESSOR_DEFINITIONS')\n_p(4,'GCC_SYMBOLS_PRIVATE_EXTERN = NO;')\nif cfg.flags.FatalWarnings then\n_p(4,'GCC_TREAT_WARNINGS_AS_ERRORS = YES;')\nend\n_p(4,'GCC_WARN_ABOUT_RETURN_TYPE = YES;')\n_p(4,'GCC_WARN_UNUSED_VARIABLE = YES;')\nxcode.printlist(cfg.includedirs, 'HEADER_SEARCH_PATHS')\nxcode.printlist(cfg.libdirs, 'LIBRARY_SEARCH_PATHS')\n_p(4,'OBJROOT = \"%s\";', cfg.objectsdir)\n_p(4,'ONLY_ACTIVE_ARCH = %s;',iif(premake.config.isdebugbuild(cfg),'YES','NO'))\nlocal checks = {\n[\"-ffast-math\"] = cfg.flags.FloatFast,\n[\"-ffloat-store\"] = cfg.flags.FloatStrict,\n[\"-fomit-frame-pointer\"] = cfg.flags.NoFramePointer,\n}\nlocal flags = { }\nfor flag, check in pairs(checks) do\nif check then\ntable.insert(flags, flag)\nend\nend\nfor _, val in ipairs(premake.xcode.parameters) do\n_p(4, val ..';')\nend\nxcode.printlist(table.join(flags, cfg.buildoptions, cfg.buildoptions_c), 'OTHER_CFLAGS')\nxcode.printlist(table.join(flags, c" - "fg.buildoptions, cfg.buildoptions_cpp), 'OTHER_CPLUSPLUSFLAGS')\nflags = { }\nfor _, lib in ipairs(premake.getlinks(cfg, \"system\")) do\nif not xcode.isframework(lib) then\ntable.insert(flags, \"-l\" .. lib)\nend\nend\nflags = table.join(flags, cfg.linkoptions)\nxcode.printlist(flags, 'OTHER_LDFLAGS')\nif cfg.flags.StaticRuntime then\n_p(4,'STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;')\nend\nif targetdir ~= \".\" then\n_p(4,'SYMROOT = \"%s\";', targetdir)\nend\nif cfg.flags.ExtraWarnings then\n_p(4,'WARNING_CFLAGS = \"-Wall\";')\nend\n_p(3,'};')\n_p(3,'name = \"%s\";', cfgname)\n_p(2,'};')\nend\nfunction xcode.XCBuildConfiguration(tr)\n_p('/* Begin XCBuildConfiguration section */')\nfor _, target in ipairs(tr.products.children) do\nfor _, cfg in ipairs(tr.configs) do\nxcode.XCBuildConfiguration_Target(tr, target, cfg)\nend\nend\nfor _, cfg in ipairs(tr.configs) do\nxcode.XCBuildConfiguration_Project(tr, cfg)\nend\n_p('/* End XCBuildConfiguration section */')\n_p('')\nend\nfunction xcode.XCBuildConfigurationLi" - "st(tr)\nlocal sln = tr.project.solution\n_p('/* Begin XCConfigurationList section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Build configuration list for PBXNativeTarget \"%s\" */ = {', target.cfgsection, target.name)\n_p(3,'isa = XCConfigurationList;')\n_p(3,'buildConfigurations = (')\nfor _, cfg in ipairs(tr.configs) do\n_p(4,'%s /* %s */,', cfg.xcode.targetid, xcode.getconfigname(cfg))\nend\n_p(3,');')\n_p(3,'defaultConfigurationIsVisible = 0;')\n_p(3,'defaultConfigurationName = \"%s\";', xcode.getconfigname(tr.configs[1]))\n_p(2,'};')\nend\n_p(2,'1DEB928908733DD80010E9CD /* Build configuration list for PBXProject \"%s\" */ = {', tr.name)\n_p(3,'isa = XCConfigurationList;')\n_p(3,'buildConfigurations = (')\nfor _, cfg in ipairs(tr.configs) do\n_p(4,'%s /* %s */,', cfg.xcode.projectid, xcode.getconfigname(cfg))\nend\n_p(3,');')\n_p(3,'defaultConfigurationIsVisible = 0;')\n_p(3,'defaultConfigurationName = \"%s\";', xcode.getconfigname(tr.configs[1]))\n_p(2,'};')\n_p('/* End XCConfigur" - "ationList section */')\n_p('')\nend\nfunction xcode.Footer()\n_p(1,'};')\n_p('\\trootObject = 08FB7793FE84155DC02AAC07 /* Project object */;')\n_p('}')\nend\n", + "premake.xcode.parameters = { }\nlocal xcode = premake.xcode\nlocal tree = premake.tree\nfunction xcode.getbuildcategory(node)\nlocal categories = {\n[\".a\"] = \"Frameworks\",\n[\".c\"] = \"Sources\",\n[\".cc\"] = \"Sources\",\n[\".cpp\"] = \"Sources\",\n[\".cxx\"] = \"Sources\",\n[\".dylib\"] = \"Frameworks\",\n[\".framework\"] = \"Frameworks\",\n[\".tbd\"] = \"Frameworks\",\n[\".m\"] = \"Sources\",\n[\".mm\"] = \"Sources\",\n[\".strings\"] = \"Resources\",\n[\".nib\"] = \"Resources\",\n[\".xib\"] = \"Resources\",\n[\".icns\"] = \"Resources\",\n[\".bmp\"] = \"Resources\",\n[\".wav\"] = \"Resources\",\n[\".xcassets\"] = \"Resources\",\n[\".xcdatamodeld\"] = \"Sources\",\n}\nreturn categories[path.getextension(node.name)]\nend\nfunction xcode.getconfigname(cfg)\nlocal name = cfg.name\nif #cfg.project.solution.xcode.platforms > 1 then\nname = name .. \" \" .. premake.action.current().valid_platforms[cfg.platform]\nend\nreturn name\nend\nfunction xcode.getfiletype(node)\nlocal types = {\n[\".c\"] = \"so" + "urcecode.c.c\",\n[\".cc\"] = \"sourcecode.cpp.cpp\",\n[\".cpp\"] = \"sourcecode.cpp.cpp\",\n[\".css\"] = \"text.css\",\n[\".cxx\"] = \"sourcecode.cpp.cpp\",\n[\".entitlements\"] = \"text.xml\",\n[\".framework\"] = \"wrapper.framework\",\n[\".tbd\"] = \"sourcecode.text-based-dylib-definition\",\n[\".gif\"] = \"image.gif\",\n[\".h\"] = \"sourcecode.c.h\",\n[\".html\"] = \"text.html\",\n[\".lua\"] = \"sourcecode.lua\",\n[\".m\"] = \"sourcecode.c.objc\",\n[\".mm\"] = \"sourcecode.cpp.objcpp\",\n[\".nib\"] = \"wrapper.nib\",\n[\".pch\"] = \"sourcecode.c.h\",\n[\".plist\"] = \"text.plist.xml\",\n[\".strings\"] = \"text.plist.strings\",\n[\".xib\"] = \"file.xib\",\n[\".icns\"] = \"image.icns\",\n[\".bmp\"] = \"image.bmp\",\n[\".wav\"] = \"audio.wav\",\n[\".xcassets\"] = \"folder.assetcatalog\",\n[\".xcdatamodeld\"] = \"wrapper.xcdatamodeld\",\n}\nreturn types[path.getextension(node.path)] or \"text\"\nend" + "\nfunction xcode.getfiletypeForced(node)\nlocal types = {\n[\".c\"] = \"sourcecode.cpp.cpp\",\n[\".cc\"] = \"sourcecode.cpp.cpp\",\n[\".cpp\"] = \"sourcecode.cpp.cpp\",\n[\".css\"] = \"text.css\",\n[\".cxx\"] = \"sourcecode.cpp.cpp\",\n[\".entitlements\"] = \"text.xml\",\n[\".framework\"] = \"wrapper.framework\",\n[\".tbd\"] = \"wrapper.framework\",\n[\".gif\"] = \"image.gif\",\n[\".h\"] = \"sourcecode.cpp.h\",\n[\".html\"] = \"text.html\",\n[\".lua\"] = \"sourcecode.lua\",\n[\".m\"] = \"sourcecode.cpp.objcpp\",\n[\".mm\"] = \"sourcecode.cpp.objcpp\",\n[\".nib\"] = \"wrapper.nib\",\n[\".pch\"] = \"sourcecode.cpp.h\",\n[\".plist\"] = \"text.plist.xml\",\n[\".strings\"] = \"text.plist.strings\",\n[\".xib\"] = \"file.xib\",\n[\".icns\"] = \"image.icns\",\n[\".bmp\"] = \"image.bmp\",\n[\".wav\"] = \"audio.wav\",\n[\".xcassets\"] = \"folder.assetcatalog\",\n[\".xcdatamodeld\"] = \"wrapper.xcdatam" + "odeld\",\n}\nreturn types[path.getextension(node.path)] or \"text\"\nend\nfunction xcode.getproducttype(node)\nlocal types = {\nConsoleApp = \"com.apple.product-type.tool\",\nWindowedApp = \"com.apple.product-type.application\",\nStaticLib = \"com.apple.product-type.library.static\",\nSharedLib = \"com.apple.product-type.library.dynamic\",\n}\nreturn types[node.cfg.kind]\nend\nfunction xcode.gettargettype(node)\nlocal types = {\nConsoleApp = \"\\\"compiled.mach-o.executable\\\"\",\nWindowedApp = \"wrapper.application\",\nStaticLib = \"archive.ar\",\nSharedLib = \"\\\"compiled.mach-o.dylib\\\"\",\n}\nreturn types[node.cfg.kind]\nend\nfunction xcode.getxcodeprojname(prj)\nlocal fname = premake.project.getfilename(prj, \"%%.xcodeproj\")\nreturn fname\nend\nfunction xcode.isframework(fname)\nreturn (path.getextension(fname) == \".framework\" or path.getextension(fname) == \".tbd\")\nend\nfunction xcode.newid()\nreturn string.format(\"%04X%04X%04X%04X%04X%04X\",\nmath.random(0, 32767),\nmath.random(0, 327" + "67),\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767))\nend\nfunction xcode.preparesolution(sln)\nsln.xcode = { }\nsln.xcode.platforms = premake.filterplatforms(sln, premake.action.current().valid_platforms, \"Universal\")\nfor prj in premake.solution.eachproject(sln) do\nlocal cfg = premake.getconfig(prj, prj.configurations[1], sln.xcode.platforms[1])\nlocal node = premake.tree.new(path.getname(cfg.buildtarget.bundlepath))\nnode.cfg = cfg\nnode.id = premake.xcode.newid(node, \"product\")\nnode.targetid = premake.xcode.newid(node, \"target\")\nprj.xcode = {}\nprj.xcode.projectnode = node\nend\nend\nfunction xcode.printlist(list, tag)\nif #list > 0 then\n_p(4,'%s = (', tag)\nfor _, item in ipairs(list) do\nlocal escaped_item = item:gsub(\"\\\"\", \"\\\\\\\"\")\n_p(5, '\"%s\",', escaped_item)\nend\n_p(4,');')\nend\nend\nfunction xcode.Header()\n_p('// !$*UTF8*$!')\n_p('{')\n_p(1,'archiveVersion = 1;')\n_p(1,'classes = {')\n_p(1,'};')\n_p(1,'objectVersion = 45;')\n_p(" + "1,'objects = {')\n_p('')\nend\nfunction xcode.PBXBuildFile(tr)\n_p('/* Begin PBXBuildFile section */')\ntree.traverse(tr, {\nonnode = function(node)\nif node.buildid then\n_p(2,'%s /* %s in %s */ = {isa = PBXBuildFile; fileRef = %s /* %s */; };', \nnode.buildid, node.name, xcode.getbuildcategory(node), node.id, node.name)\nend\nend\n})\n_p('/* End PBXBuildFile section */')\n_p('')\nend\nfunction xcode.PBXContainerItemProxy(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXContainerItemProxy section */')\nfor _, node in ipairs(tr.projects.children) do\n_p(2,'%s /* PBXContainerItemProxy */ = {', node.productproxyid)\n_p(3,'isa = PBXContainerItemProxy;')\n_p(3,'containerPortal = %s /* %s */;', node.id, path.getname(node.path))\n_p(3,'proxyType = 2;')\n_p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.id)\n_p(3,'remoteInfo = \"%s\";', node.project.xcode.projectnode.name)\n_p(2,'};')\n_p(2,'%s /* PBXContainerItemProxy */ = {', node.targetproxyid)\n_p(3,'isa = PBXContainerItemProxy;')\n_p(3,'co" + "ntainerPortal = %s /* %s */;', node.id, path.getname(node.path))\n_p(3,'proxyType = 1;')\n_p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.targetid)\n_p(3,'remoteInfo = \"%s\";', node.project.xcode.projectnode.name)\n_p(2,'};')\nend\n_p('/* End PBXContainerItemProxy section */')\n_p('')\nend\nend\nfunction xcode.PBXFileReference(tr,prj)\n_p('/* Begin PBXFileReference section */')\ntree.traverse(tr, {\nonleaf = function(node)\nif not node.path then\nreturn\nend\nif node.kind == \"product\" then\n_p(2,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; includeInIndex = 0; name = \"%s\"; path = \"%s\"; sourceTree = BUILT_PRODUCTS_DIR; };',\nnode.id, node.name, xcode.gettargettype(node), node.name, path.getname(node.cfg.buildtarget.bundlepath))\nelseif node.parent.parent == tr.projects then\nlocal relpath = path.getrelative(tr.project.location, node.parent.project.location)\n_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = \"wrapper.pb-project\"; name = \"%s\"; path = \"" + "%s\"; sourceTree = SOURCE_ROOT; };',\nnode.parent.id, node.parent.name, node.parent.name, path.join(relpath, node.parent.name))\nelse\nlocal pth, src\nif xcode.isframework(node.path) then\nlocal nodePath = node.path\nlocal _, matchEnd, variable = string.find(nodePath, \"^%$%((.+)%)/\")\nif variable then\nnodePath = string.sub(nodePath, matchEnd + 1)\nend\nif string.find(nodePath,'/') then\nif string.find(nodePath,'^%.')then\nerror('relative paths are not currently supported for frameworks')\nend\npth = nodePath\nelseif path.getextension(nodePath)=='.tbd' then\npth = \"/usr/lib/\" .. nodePath\nelse\npth = \"/System/Library/Frameworks/\" .. nodePath\nend\nif variable then\nsrc = variable\nif string.find(pth, '^/') then\npth = string.sub(pth, 2)\nend\nelse\nsrc = \"\"\nend\nelse\nsrc = \"\"\nif node.parent.isvpath then\npth = node.cfg.name\nelse\npth = tree.getlocalpath(node)\nend\nend\nif (not prj.options.ForceCPP) then\n_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name " + "= \"%s\"; path = \"%s\"; sourceTree = \"%s\"; };',\nnode.id, node.name, xcode.getfiletype(node), node.name, pth, src)\nelse\n_p(2,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; name = \"%s\"; path = \"%s\"; sourceTree = \"%s\"; };',\nnode.id, node.name, xcode.getfiletypeForced(node), node.name, pth, src)\nend\nend\nend\n})\n_p('/* End PBXFileReference section */')\n_p('')\nend\nfunction xcode.PBXFrameworksBuildPhase(tr)\n_p('/* Begin PBXFrameworksBuildPhase section */')\n_p(2,'%s /* Frameworks */ = {', tr.products.children[1].fxstageid)\n_p(3,'isa = PBXFrameworksBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr.frameworks, {\nonleaf = function(node)\n_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)\nend\n})\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\n_p('/* End PBXFrameworksBuildPhase section" + " */')\n_p('')\nend\nfunction xcode.PBXGroup(tr)\n_p('/* Begin PBXGroup section */')\ntree.traverse(tr, {\nonnode = function(node)\nif (node.path and #node.children == 0) or node.kind == \"vgroup\" then\nreturn\nend\nif node.parent == tr.projects then\n_p(2,'%s /* Products */ = {', node.productgroupid)\nelse\n_p(2,'%s /* %s */ = {', node.id, node.name)\nend\n_p(3,'isa = PBXGroup;')\n_p(3,'children = (')\nfor _, childnode in ipairs(node.children) do\n_p(4,'%s /* %s */,', childnode.id, childnode.name)\nend\n_p(3,');')\nif node.parent == tr.projects then\n_p(3,'name = Products;')\nelse\n_p(3,'name = \"%s\";', node.name)\nif node.path and not node.isvpath then\nlocal p = node.path\nif node.parent.path then\np = path.getrelative(node.parent.path, node.path)\nend\n_p(3,'path = \"%s\";', p)\nend\nend\n_p(3,'sourceTree = \"\";')\n_p(2,'};')\nend\n}, true)\n_p('/* End PBXGroup section */')\n_p('')\nend\nfunction xcode.PBXNativeTarget(tr)\n_p('/* Begin PBXNativeTarget section */')\nfor _, node in ipairs(tr.product" + "s.children) do\nlocal name = tr.project.name\nlocal function hasBuildCommands(which)\nif #tr.project[which] > 0 then\nreturn true\nend\nfor _, cfg in ipairs(tr.configs) do\nif #cfg[which] > 0 then\nreturn true\nend\nend\nend\n_p(2,'%s /* %s */ = {', node.targetid, name)\n_p(3,'isa = PBXNativeTarget;')\n_p(3,'buildConfigurationList = %s /* Build configuration list for PBXNativeTarget \"%s\" */;', node.cfgsection, name)\n_p(3,'buildPhases = (')\nif hasBuildCommands('prebuildcommands') then\n_p(4,'9607AE1010C857E500CD1376 /* Prebuild */,')\nend\n_p(4,'%s /* Resources */,', node.resstageid)\n_p(4,'%s /* Sources */,', node.sourcesid)\nif hasBuildCommands('prelinkcommands') then\n_p(4,'9607AE3510C85E7E00CD1376 /* Prelink */,')\nend\n_p(4,'%s /* Frameworks */,', node.fxstageid)\nif hasBuildCommands('postbuildcommands') then\n_p(4,'9607AE3710C85E8F00CD1376 /* Postbuild */,')\nend\n_p(3,');')\n_p(3,'buildRules = (')\n_p(3,');')\n_p(3,'dependencies = (')\nfor _, node in ipairs(tr.projects.children) do\n_p(4,'%s /* PBXTa" + "rgetDependency */,', node.targetdependid)\nend\n_p(3,');')\n_p(3,'name = \"%s\";', name)\nlocal p\nif node.cfg.kind == \"ConsoleApp\" then\np = \"$(HOME)/bin\"\nelseif node.cfg.kind == \"WindowedApp\" then\np = \"$(HOME)/Applications\"\nend\nif p then\n_p(3,'productInstallPath = \"%s\";', p)\nend\n_p(3,'productName = \"%s\";', name)\n_p(3,'productReference = %s /* %s */;', node.id, node.name)\n_p(3,'productType = \"%s\";', xcode.getproducttype(node))\n_p(2,'};')\nend\n_p('/* End PBXNativeTarget section */')\n_p('')\nend\nfunction xcode.PBXProject(tr)\n_p('/* Begin PBXProject section */')\n_p(2,'08FB7793FE84155DC02AAC07 /* Project object */ = {')\n_p(3,'isa = PBXProject;')\n_p(3,'buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject \"%s\" */;', tr.name)\n_p(3,'compatibilityVersion = \"Xcode 3.2\";')\n_p(3,'hasScannedForEncodings = 1;')\n_p(3,'mainGroup = %s /* %s */;', tr.id, tr.name)\n_p(3,'projectDirPath = \"\";')\nif #tr.projects.children > 0 then\n_p(3,'projectReferen" + "ces = (')\nfor _, node in ipairs(tr.projects.children) do\n_p(4,'{')\n_p(5,'ProductGroup = %s /* Products */;', node.productgroupid)\n_p(5,'ProjectRef = %s /* %s */;', node.id, path.getname(node.path))\n_p(4,'},')\nend\n_p(3,');')\nend\n_p(3,'projectRoot = \"\";')\n_p(3,'targets = (')\nfor _, node in ipairs(tr.products.children) do\n_p(4,'%s /* %s */,', node.targetid, node.name)\nend\n_p(3,');')\n_p(2,'};')\n_p('/* End PBXProject section */')\n_p('')\nend\nfunction xcode.PBXReferenceProxy(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXReferenceProxy section */')\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(2,'%s /* %s */ = {', node.id, node.name)\n_p(3,'isa = PBXReferenceProxy;')\n_p(3,'fileType = %s;', xcode.gettargettype(node))\n_p(3,'path = \"%s\";', node.path)\n_p(3,'remoteRef = %s /* PBXContainerItemProxy */;', node.parent.productproxyid)\n_p(3,'sourceTree = BUILT_PRODUCTS_DIR;')\n_p(2,'};')\nend\n})\n_p('/* End PBXReferenceProxy section */')\n_p('')\nend\nend\nfunction xcode.PBXRes" + "ourcesBuildPhase(tr)\n_p('/* Begin PBXResourcesBuildPhase section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Resources */ = {', target.resstageid)\n_p(3,'isa = PBXResourcesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr, {\nonnode = function(node)\nif xcode.getbuildcategory(node) == \"Resources\" then\n_p(4,'%s /* %s in Resources */,', node.buildid, node.name)\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\nend\n_p('/* End PBXResourcesBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXShellScriptBuildPhase(tr)\nlocal wrapperWritten = false\nlocal function doblock(id, name, which)\nlocal prjcmds = tr.project[which]\nlocal commands = table.join(prjcmds, {})\nfor _, cfg in ipairs(tr.configs) do\nlocal cfgcmds = cfg[which]\nif #cfgcmds > #prjcmds then\ntable.insert(commands, 'if [ \"${CONFIGURATION}\" = \"' .. xcode.getconfigname(cfg) .. '\" ]; then')\nfor i = #prjcmds + 1, #cfgcmds do\nlocal cmd = cfgcm" + "ds[i]\ncmd = cmd:gsub('\\\\','\\\\\\\\')\ntable.insert(commands, cmd)\nend\ntable.insert(commands, 'fi')\nend\nend\nif #commands > 0 then\nif not wrapperWritten then\n_p('/* Begin PBXShellScriptBuildPhase section */')\nwrapperWritten = true\nend\n_p(2,'%s /* %s */ = {', id, name)\n_p(3,'isa = PBXShellScriptBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\n_p(3,');')\n_p(3,'inputPaths = (');\n_p(3,');');\n_p(3,'name = %s;', name);\n_p(3,'outputPaths = (');\n_p(3,');');\n_p(3,'runOnlyForDeploymentPostprocessing = 0;');\n_p(3,'shellPath = /bin/sh;');\n_p(3,'shellScript = \"%s\";', table.concat(commands, \"\\\\n\"):gsub('\"', '\\\\\"'))\n_p(2,'};')\nend\nend\ndoblock(\"9607AE1010C857E500CD1376\", \"Prebuild\", \"prebuildcommands\")\ndoblock(\"9607AE3510C85E7E00CD1376\", \"Prelink\", \"prelinkcommands\")\ndoblock(\"9607AE3710C85E8F00CD1376\", \"Postbuild\", \"postbuildcommands\")\nif wrapperWritten then\n_p('/* End PBXShellScriptBuildPhase section */')\nend\nend\nfunction xcode.PBXSourcesBuil" + "dPhase(tr,prj)\n_p('/* Begin PBXSourcesBuildPhase section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Sources */ = {', target.sourcesid)\n_p(3,'isa = PBXSourcesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr, {\nonleaf = function(node)\nif xcode.getbuildcategory(node) == \"Sources\" then\n if not table.icontains(prj.excludes, node.cfg.name) then -- if not excluded\n_p(4,'%s /* %s in Sources */,', node.buildid, node.name)\n end\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\nend\n_p('/* End PBXSourcesBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXVariantGroup(tr)\n_p('/* Begin PBXVariantGroup section */')\ntree.traverse(tr, {\nonbranch = function(node)\nif node.kind == \"vgroup\" then\n_p(2,'%s /* %s */ = {', node.id, node.name)\n_p(3,'isa = PBXVariantGroup;')\n_p(3,'children = (')\nfor _, lang in ipairs(node.children) do\n_p(4,'%s /* %s */,', lang.id, lang.name)\nend" + "\n_p(3,');')\n_p(3,'name = %s;', node.name)\n_p(3,'sourceTree = \"\";')\n_p(2,'};')\nend\nend\n})\n_p('/* End PBXVariantGroup section */')\n_p('')\nend\nfunction xcode.PBXTargetDependency(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXTargetDependency section */')\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(2,'%s /* PBXTargetDependency */ = {', node.parent.targetdependid)\n_p(3,'isa = PBXTargetDependency;')\n_p(3,'name = \"%s\";', node.name)\n_p(3,'targetProxy = %s /* PBXContainerItemProxy */;', node.parent.targetproxyid)\n_p(2,'};')\nend\n})\n_p('/* End PBXTargetDependency section */')\n_p('')\nend\nend\nfunction xcode.XCBuildConfiguration_Target(tr, target, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\n_p(2,'%s /* %s */ = {', cfg.xcode.targetid, cfgname)\n_p(3,'isa = XCBuildConfiguration;')\n_p(3,'buildSettings = {')\n_p(4,'ALWAYS_SEARCH_USER_PATHS = NO;')\nif not cfg.flags.Symbols then\n_p(4,'DEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";')\nend\nif cfg.kind ~= \"StaticLib" + "\" and cfg.buildtarget.prefix ~= \"\" then\n_p(4,'EXECUTABLE_PREFIX = %s;', cfg.buildtarget.prefix)\nend\nif cfg.targetextension then\nlocal ext = cfg.targetextension\next = iif(ext:startswith(\".\"), ext:sub(2), ext)\n_p(4,'EXECUTABLE_EXTENSION = %s;', ext)\nend\nlocal outdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif outdir ~= \".\" then\n_p(4,'CONFIGURATION_BUILD_DIR = %s;', outdir)\nend\n_p(4,'GCC_DYNAMIC_NO_PIC = NO;')\n_p(4,'GCC_MODEL_TUNING = G5;')\nif tr.infoplist then\n_p(4,'INFOPLIST_FILE = \"%s\";', tr.infoplist.cfg.name)\nend\ninstallpaths = {\nConsoleApp = '/usr/local/bin',\nWindowedApp = '\"$(HOME)/Applications\"',\nSharedLib = '/usr/local/lib',\nStaticLib = '/usr/local/lib',\n}\n_p(4,'INSTALL_PATH = %s;', installpaths[cfg.kind])\nlocal infoplist_file = nil\nfor _, v in ipairs(cfg.files) do\nif (string.find (string.lower (v), 'info.plist') ~= nil) then\ninfoplist_file = string.format('$(SRCROOT)/%s', v)\nend\nend\nif infoplist_file ~= nil then\n_p(4,'INFOPLIST_FILE = \"%s\";', infoplist_" + "file)\nend\n_p(4,'PRODUCT_NAME = \"%s\";', cfg.buildtarget.basename)\n_p(3,'};')\n_p(3,'name = \"%s\";', cfgname)\n_p(2,'};')\nend\nfunction xcode.XCBuildConfiguration_Project(tr, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\n_p(2,'%s /* %s */ = {', cfg.xcode.projectid, cfgname)\n_p(3,'isa = XCBuildConfiguration;')\n_p(3,'buildSettings = {')\nlocal archs = {\nNative = \"$(NATIVE_ARCH_ACTUAL)\",\nx32 = \"i386\",\nx64 = \"x86_64\",\nUniversal32 = \"$(ARCHS_STANDARD_32_BIT)\",\nUniversal64 = \"$(ARCHS_STANDARD_64_BIT)\",\nUniversal = \"$(ARCHS_STANDARD_32_64_BIT)\",\n}\n_p(4,'ARCHS = \"%s\";', archs[cfg.platform])\n_p(4,'SDKROOT = \"%s\";', xcode.toolset)\nif tr.entitlements then\n_p(4,'CODE_SIGN_ENTITLEMENTS = \"%s\";', tr.entitlements.cfg.name)\nend\nlocal targetdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif targetdir ~= \".\" then\n_p(4,'CONFIGURATION_BUILD_DIR = \"$(SYMROOT)\";');\nend\n_p(4,'CONFIGURATION_TEMP_DIR = \"$(OBJROOT)\";')\nif cfg.flags.Symbols then\n_p(4,'COPY_PHASE_STRIP = NO;')" + "\nend\n_p(4,'GCC_C_LANGUAGE_STANDARD = gnu99;')\nif cfg.flags.NoExceptions then\n_p(4,'GCC_ENABLE_CPP_EXCEPTIONS = NO;')\nend\nif cfg.flags.NoRTTI then\n_p(4,'GCC_ENABLE_CPP_RTTI = NO;')\nend\nif _ACTION ~= \"xcode4\" and cfg.flags.Symbols and not cfg.flags.NoEditAndContinue then\n_p(4,'GCC_ENABLE_FIX_AND_CONTINUE = YES;')\nend\nif cfg.flags.NoExceptions then\n_p(4,'GCC_ENABLE_OBJC_EXCEPTIONS = NO;')\nend\nif cfg.flags.Optimize or cfg.flags.OptimizeSize then\n_p(4,'GCC_OPTIMIZATION_LEVEL = s;')\nelseif cfg.flags.OptimizeSpeed then\n_p(4,'GCC_OPTIMIZATION_LEVEL = 3;')\nelse\n_p(4,'GCC_OPTIMIZATION_LEVEL = 0;')\nend\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(4,'GCC_PRECOMPILE_PREFIX_HEADER = YES;')\n_p(4,'GCC_PREFIX_HEADER = \"%s\";', cfg.pchheader)\nend\nxcode.printlist(cfg.defines, 'GCC_PREPROCESSOR_DEFINITIONS')\n_p(4,'GCC_SYMBOLS_PRIVATE_EXTERN = NO;')\nif cfg.flags.FatalWarnings then\n_p(4,'GCC_TREAT_WARNINGS_AS_ERRORS = YES;')\nend\n_p(4,'GCC_WARN_ABOUT_RETURN_TYPE = YES;')\n_p(4,'GCC_WARN_UNUSED_V" + "ARIABLE = YES;')\nxcode.printlist(cfg.includedirs, 'HEADER_SEARCH_PATHS')\nxcode.printlist(cfg.userincludedirs, 'USER_HEADER_SEARCH_PATHS')\nxcode.printlist(cfg.libdirs, 'LIBRARY_SEARCH_PATHS')\n_p(4,'OBJROOT = \"%s\";', cfg.objectsdir)\n_p(4,'ONLY_ACTIVE_ARCH = %s;',iif(premake.config.isdebugbuild(cfg),'YES','NO'))\nlocal checks = {\n[\"-ffast-math\"] = cfg.flags.FloatFast,\n[\"-ffloat-store\"] = cfg.flags.FloatStrict,\n[\"-fomit-frame-pointer\"] = cfg.flags.NoFramePointer,\n}\nlocal flags = { }\nfor flag, check in pairs(checks) do\nif check then\ntable.insert(flags, flag)\nend\nend\nfor _, val in ipairs(premake.xcode.parameters) do\n_p(4, val ..';')\nend\nxcode.printlist(table.join(flags, cfg.buildoptions, cfg.buildoptions_c), 'OTHER_CFLAGS')\nxcode.printlist(table.join(flags, cfg.buildoptions, cfg.buildoptions_cpp), 'OTHER_CPLUSPLUSFLAGS')\nflags = { }\nfor _, lib in ipairs(premake.getlinks(cfg, \"system\")) do\nif not xcode.isframework(lib) then\ntable.insert(flags, \"-l\" .. lib)\nend\nend" + "\nflags = table.join(flags, cfg.linkoptions)\nxcode.printlist(flags, 'OTHER_LDFLAGS')\nif cfg.flags.StaticRuntime then\n_p(4,'STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;')\nend\nif targetdir ~= \".\" then\n_p(4,'SYMROOT = \"%s\";', targetdir)\nend\nif cfg.flags.ExtraWarnings then\n_p(4,'WARNING_CFLAGS = \"-Wall\";')\nend\n_p(3,'};')\n_p(3,'name = \"%s\";', cfgname)\n_p(2,'};')\nend\nfunction xcode.XCBuildConfiguration(tr)\n_p('/* Begin XCBuildConfiguration section */')\nfor _, target in ipairs(tr.products.children) do\nfor _, cfg in ipairs(tr.configs) do\nxcode.XCBuildConfiguration_Target(tr, target, cfg)\nend\nend\nfor _, cfg in ipairs(tr.configs) do\nxcode.XCBuildConfiguration_Project(tr, cfg)\nend\n_p('/* End XCBuildConfiguration section */')\n_p('')\nend\nfunction xcode.XCBuildConfigurationList(tr)\nlocal sln = tr.project.solution\n_p('/* Begin XCConfigurationList section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Build configuration list for PBXNativeTarget \"%s\" */ = {', target." + "cfgsection, target.name)\n_p(3,'isa = XCConfigurationList;')\n_p(3,'buildConfigurations = (')\nfor _, cfg in ipairs(tr.configs) do\n_p(4,'%s /* %s */,', cfg.xcode.targetid, xcode.getconfigname(cfg))\nend\n_p(3,');')\n_p(3,'defaultConfigurationIsVisible = 0;')\n_p(3,'defaultConfigurationName = \"%s\";', xcode.getconfigname(tr.configs[1]))\n_p(2,'};')\nend\n_p(2,'1DEB928908733DD80010E9CD /* Build configuration list for PBXProject \"%s\" */ = {', tr.name)\n_p(3,'isa = XCConfigurationList;')\n_p(3,'buildConfigurations = (')\nfor _, cfg in ipairs(tr.configs) do\n_p(4,'%s /* %s */,', cfg.xcode.projectid, xcode.getconfigname(cfg))\nend\n_p(3,');')\n_p(3,'defaultConfigurationIsVisible = 0;')\n_p(3,'defaultConfigurationName = \"%s\";', xcode.getconfigname(tr.configs[1]))\n_p(2,'};')\n_p('/* End XCConfigurationList section */')\n_p('')\nend\nfunction xcode.Footer()\n_p(1,'};')\n_p('\\trootObject = 08FB7793FE84155DC02AAC07 /* Project object */;')\n_p('}')\nend\n", /* actions/xcode/xcode_project.lua */ - "local xcode = premake.xcode\nlocal tree = premake.tree\nfunction xcode.buildprjtree(prj)\nlocal tr = premake.project.buildsourcetree(prj)\ntr.configs = {}\nfor _, cfgname in ipairs(prj.solution.configurations) do\nfor _, platform in ipairs(prj.solution.xcode.platforms) do\nlocal cfg = premake.getconfig(prj, cfgname, platform)\ncfg.xcode = {}\ncfg.xcode.targetid = xcode.newid(prj.xcode.projectnode, cfgname)\ncfg.xcode.projectid = xcode.newid(tr, cfgname)\ntable.insert(tr.configs, cfg)\nend\nend\ntree.traverse(tr, {\nonbranch = function(node)\nif path.getextension(node.name) == \".lproj\" then\nlocal lang = path.getbasename(node.name) -- \"English\", \"French\", etc.\nfor _, filenode in ipairs(node.children) do\nlocal grpnode = node.parent.children[filenode.name]\nif not grpnode then\ngrpnode = tree.insert(node.parent, tree.new(filenode.name))\ngrpnode.kind = \"vgroup\"\nend\nfilenode.name = path.getbasename(lang)\ntree.insert(grpnode, filenode)\nend\ntree.remove(node)\nend\nend\n})\ntr.frameworks = tree.new(\"" - "Frameworks\")\nfor cfg in premake.eachconfig(prj) do\nfor _, link in ipairs(premake.getlinks(cfg, \"system\", \"fullpath\")) do\nlocal name = path.getname(link)\nif xcode.isframework(name) and not tr.frameworks.children[name] then\nnode = tree.insert(tr.frameworks, tree.new(name))\nnode.path = link\nend\nend\nend\nif #tr.frameworks.children > 0 then \ntree.insert(tr, tr.frameworks)\nend\ntr.products = tree.insert(tr, tree.new(\"Products\"))\ntr.projects = tree.new(\"Projects\")\nfor _, dep in ipairs(premake.getdependencies(prj, \"sibling\", \"object\")) do\nlocal xcpath = xcode.getxcodeprojname(dep)\nlocal xcnode = tree.insert(tr.projects, tree.new(path.getname(xcpath)))\nxcnode.path = xcpath\nxcnode.project = dep\nxcnode.productgroupid = xcode.newid(xcnode, \"prodgrp\")\nxcnode.productproxyid = xcode.newid(xcnode, \"prodprox\")\nxcnode.targetproxyid = xcode.newid(xcnode, \"targprox\")\nxcnode.targetdependid = xcode.newid(xcnode, \"targdep\")\nlocal cfg = premake.getconfig(dep, prj.configurations[1])\nnode = " - "tree.insert(xcnode, tree.new(cfg.linktarget.name))\nnode.path = cfg.linktarget.fullpath\nnode.cfg = cfg\nend\nif #tr.projects.children > 0 then\ntree.insert(tr, tr.projects)\nend\ntree.traverse(tr, {\nonnode = function(node)\nnode.id = xcode.newid(node)\nif xcode.getbuildcategory(node) then\nnode.buildid = xcode.newid(node, \"build\")\nend\nif string.endswith(node.name, \"Info.plist\") then\ntr.infoplist = node\nend\nend\n}, true)\nnode = tree.insert(tr.products, prj.xcode.projectnode)\nnode.kind = \"product\"\nnode.path = node.cfg.buildtarget.fullpath\nnode.cfgsection = xcode.newid(node, \"cfg\")\nnode.resstageid = xcode.newid(node, \"rez\")\nnode.sourcesid = xcode.newid(node, \"src\")\nnode.fxstageid = xcode.newid(node, \"fxs\")\nreturn tr\nend\nfunction premake.xcode.project(prj)\nlocal tr = xcode.buildprjtree(prj)\nxcode.Header(tr)\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(tr)\nxcode.PBXNativeTarget(tr)\nxco" - "de.PBXProject(tr)\nxcode.PBXReferenceProxy(tr)\nxcode.PBXResourcesBuildPhase(tr)\nxcode.PBXShellScriptBuildPhase(tr)\nxcode.PBXSourcesBuildPhase(tr,prj)\nxcode.PBXVariantGroup(tr)\nxcode.PBXTargetDependency(tr)\nxcode.XCBuildConfiguration(tr)\nxcode.XCBuildConfigurationList(tr)\nxcode.Footer(tr)\nend\n", + "local xcode = premake.xcode\nlocal tree = premake.tree\nfunction xcode.buildprjtree(prj)\nlocal tr = premake.project.buildsourcetree(prj)\ntr.configs = {}\nfor _, cfgname in ipairs(prj.solution.configurations) do\nfor _, platform in ipairs(prj.solution.xcode.platforms) do\nlocal cfg = premake.getconfig(prj, cfgname, platform)\ncfg.xcode = {}\ncfg.xcode.targetid = xcode.newid(prj.xcode.projectnode, cfgname)\ncfg.xcode.projectid = xcode.newid(tr, cfgname)\ntable.insert(tr.configs, cfg)\nend\nend\ntree.traverse(tr, {\nonbranch = function(node)\nif path.getextension(node.name) == \".lproj\" then\nlocal lang = path.getbasename(node.name) -- \"English\", \"French\", etc.\nfor _, filenode in ipairs(node.children) do\nlocal grpnode = node.parent.children[filenode.name]\nif not grpnode then\ngrpnode = tree.insert(node.parent, tree.new(filenode.name))\ngrpnode.kind = \"vgroup\"\nend\nfilenode.name = path.getbasename(lang)\ntree.insert(grpnode, filenode)\nend\ntree.remove(node)\nend\nend\n})\ntree.traverse(tr, {\nonbran" + "ch = function(node)\nif path.getextension(node.name) == \".xcassets\" then\nnode.children = {}\nend\nend\n})\ntr.frameworks = tree.new(\"Frameworks\")\nfor cfg in premake.eachconfig(prj) do\nfor _, link in ipairs(premake.getlinks(cfg, \"system\", \"fullpath\")) do\nlocal name = path.getname(link)\nif xcode.isframework(name) and not tr.frameworks.children[name] then\nnode = tree.insert(tr.frameworks, tree.new(name))\nnode.path = link\nend\nend\nend\nif #tr.frameworks.children > 0 then \ntree.insert(tr, tr.frameworks)\nend\ntr.products = tree.insert(tr, tree.new(\"Products\"))\ntr.projects = tree.new(\"Projects\")\nfor _, dep in ipairs(premake.getdependencies(prj, \"sibling\", \"object\")) do\nlocal xcpath = xcode.getxcodeprojname(dep)\nlocal xcnode = tree.insert(tr.projects, tree.new(path.getname(xcpath)))\nxcnode.path = xcpath\nxcnode.project = dep\nxcnode.productgroupid = xcode.newid(xcnode, \"prodgrp\")\nxcnode.productproxyid = xcode.newid(xcnode, \"prodprox\")\nxcnode.targetproxyid = xcode.newid(xcnode, \"" + "targprox\")\nxcnode.targetdependid = xcode.newid(xcnode, \"targdep\")\nlocal cfg = premake.getconfig(dep, prj.configurations[1])\nnode = tree.insert(xcnode, tree.new(cfg.linktarget.name))\nnode.path = cfg.linktarget.fullpath\nnode.cfg = cfg\nend\nif #tr.projects.children > 0 then\ntree.insert(tr, tr.projects)\nend\ntree.traverse(tr, {\nonnode = function(node)\nnode.id = xcode.newid(node)\nif xcode.getbuildcategory(node) then\nnode.buildid = xcode.newid(node, \"build\")\nend\nif string.endswith(node.name, \"Info.plist\") then\ntr.infoplist = node\nend\nif string.endswith(node.name, \".entitlements\") then\ntr.entitlements = node\nend\nend\n}, true)\nnode = tree.insert(tr.products, prj.xcode.projectnode)\nnode.kind = \"product\"\nnode.path = node.cfg.buildtarget.fullpath\nnode.cfgsection = xcode.newid(node, \"cfg\")\nnode.resstageid = xcode.newid(node, \"rez\")\nnode.sourcesid = xcode.newid(node, \"src\")\nnode.fxstageid = xcode.newid(node, \"fxs\")\nreturn tr\nend\nfunction premake.xcode.project(prj)\nlocal t" + "r = xcode.buildprjtree(prj)\nxcode.Header(tr)\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(tr)\nxcode.PBXNativeTarget(tr)\nxcode.PBXProject(tr)\nxcode.PBXReferenceProxy(tr)\nxcode.PBXResourcesBuildPhase(tr)\nxcode.PBXShellScriptBuildPhase(tr)\nxcode.PBXSourcesBuildPhase(tr,prj)\nxcode.PBXVariantGroup(tr)\nxcode.PBXTargetDependency(tr)\nxcode.XCBuildConfiguration(tr)\nxcode.XCBuildConfigurationList(tr)\nxcode.Footer(tr)\nend\n", /* actions/xcode/xcode4_workspace.lua */ "premake.xcode4 = {}\nlocal xcode4 = premake.xcode4\nfunction xcode4.workspace_head()\n_p('')\n_p('')\nend\nfunction xcode4.workspace_tail()\n_p('')\nend\nfunction xcode4.workspace_file_ref(prj)\nlocal projpath = path.getrelative(prj.solution.location, prj.location)\nif projpath == '.' then projpath = '' \nelse projpath = projpath ..'/' \nend\n_p(1,'',projpath .. prj.name .. '.xcodeproj')\n_p(1,'')\nend\nfunction xcode4.workspace_generate(sln)\npremake.xcode.preparesolution(sln)\nxcode4.workspace_head()\nxcode4.reorderProjects(sln)\nfor prj in premake.solution.eachproject(sln) do\nxcode4.workspace_file_ref(prj)\nend\nxcode4.workspace_tail()\nend\nfunction xcode4.reorderProjects(sln)\nif sln.startproject then\nfor i, prj in ipairs(sln.projects) do\nif sln.startproject == prj.name then\nlocal cur = prj.group\nwhile cur ~= nil do\nfor j, group in ipairs(sln.groups) do\nif " @@ -390,23 +410,46 @@ const char* builtin_scripts[] = { "premake.fastbuild = { }\nlocal fastbuild = premake.fastbuild\nnewaction\n{\ntrigger = \"vs2015-fastbuild\",\nshortname = \"FASTBuild VS2015\",\ndescription = \"Generate FASTBuild configuration files for Visual Studio 2015.\",\nvalid_kinds = {\n\"ConsoleApp\",\n\"WindowedApp\",\n\"SharedLib\",\n\"StaticLib\"\n},\nvalid_languages = {\n\"C\",\n\"C++\"\n},\nvalid_tools = {\ncc = {\n\"msc\"\n},\n},\nonsolution = function(sln)\npremake.generate(sln, \"fbuild.bff\", premake.fastbuild.solution)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.bff\", premake.fastbuild.project)\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, \"fbuild.bff\")\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, \"%%.bff\")\nend,\n}\n", /* actions/fastbuild/fastbuild_project.lua */ - "-- Generates a FastBuild config file for a project\nlocal function add_trailing_backslash(dir)\nif dir:len() > 0 and dir:sub(-1) ~= \"\\\\\" then\nreturn dir..\"\\\\\"\nend\nreturn dir\nend\nlocal function compile(indentlevel, prj, cfg)\nlocal firstflag = true\nfor _, cfgexclude in ipairs(cfg.excludes) do\nif path.iscppfile(cfgexclude) then\nif firstflag then\n_p(indentlevel, '// Excluded files:')\nfirstflag = false\nend\n_p(indentlevel, \".CompilerInputFiles - '%s'\", cfgexclude)\nend\nend\nif not firstflag then\n_p('')\nend\n_p(indentlevel, \".CompilerOutputPath = '%s'\", add_trailing_backslash(cfg.objectsdir))\n_p(indentlevel, \".Defines = ''\")\nfor _, define in ipairs(cfg.defines) do\n_p(indentlevel, \" + ' /D%s'\", define)\nend\nif cfg.kind == 'SharedLib' then\n_p(indentlevel, \" + ' /D_WINDLL'\")\nend\n_p(indentlevel, \".IncludeDirs = ''\")\nfor _, includedir in ipairs(cfg.includedirs) do\n_p(indentlevel, \" + ' /I\\\"%s\\\"'\", includedir)\nend\n_p(indentlevel, \" " - " + .MSVCIncludes\")\nlocal compileroptions = {\n'\"%1\"',\n'/nologo',\n'/c',\n'/Gy',\n'/Gm-',\n'/Zc:inline',\n'/errorReport:prompt',\n'/FS',\n}\nif cfg.flags.ExtraWarnings then\ntable.insert(compileroptions, '/W4')\nend\nif (cfg.flags.NativeWChar == false or\ncfg.flags.NoNativeWChar) then\ntable.insert(compileroptions, '/Zc:wchar_t-')\nend\nif (cfg.flags.EnableMinimalRebuild or\ncfg.flags.NoMultiProcessorCompilation) then\nos.exit(1) -- Not compatible with FastBuild\nend\nif cfg.flags.FloatFast then\ntable.insert(compileroptions, '/fp:fast')\nelseif cfg.flags.FloatStrict then\ntable.insert(compileroptions, '/fp:strict')\nelse\ntable.insert(compileroptions, '/fp:precise')\nend\nif cfg.flags.FastCall then\ntable.insert(compileroptions, '/Gr')\nelseif cfg.flags.StdCall then\ntable.insert(compileroptions, '/Gd')\nend\nif cfg.flags.UnsignedChar then\ntable.insert(compileroptions, '/J')\nend\nif premake.config.isdebugbuild(cfg) then\nif cfg.flags.StaticRuntime then\ntable.insert(compileroptions, '/MTd')\nelse\nta" - "ble.insert(compileroptions, '/MDd')\nend\nelse\nif cfg.flags.StaticRuntime then\ntable.insert(compileroptions, '/MT')\nelse\ntable.insert(compileroptions, '/MD')\nend\nend\nif cfg.flags.Symbols then\nif (premake.config.isoptimizedbuild(cfg.flags)\nor cfg.flags.NoEditAndContinue) then\ntable.insert(compileroptions, '/Zi')\nelse\ntable.insert(compileroptions, '/ZI')\nend\nlocal targetdir = add_trailing_backslash(cfg.buildtarget.directory)\ntable.insert(compileroptions, string.format(\"/Fd\\\"%s%s.pdb\\\"\", targetdir, cfg.buildtarget.basename))\nend\nlocal isoptimised = true\nif (cfg.flags.Optimize) then\ntable.insert(compileroptions, '/Ox')\nelseif (cfg.flags.OptimizeSize) then\ntable.insert(compileroptions, '/O1')\nelseif (cfg.flags.OptimizeSpeed) then\ntable.insert(compileroptions, '/O2')\nelse\nisoptimised = false\nend\nif isoptimised then\ntable.insert(compileroptions, '/GF')\nelse\ntable.insert(compileroptions, '/Od')\ntable.insert(compileroptions, '/RTC1')\nend\nif cfg.flags.FatalWarnings then\ntable.inse" - "rt(compileroptions, '/WX')\nelse\ntable.insert(compileroptions, '/WX-')\nend\nif cfg.platform == 'x32' then\nif cfg.flags.EnableSSE2 then\ntable.insert(compileroptions, '/arch:SSE2')\nelseif cfg.flags.EnableSSE then\ntable.insert(compileroptions, '/arch:SSE')\nend\nend\nfor _, addloption in ipairs(cfg.buildoptions) do\ntable.insert(compileroptions, addloption)\nend\n_p(indentlevel, \".CompilerOptions = ''\")\nfor _, option in ipairs(compileroptions) do\n_p(indentlevel, \" + ' %s'\", option)\nend\n_p(indentlevel, \" + .IncludeDirs\")\n_p(indentlevel, \" + .Defines\")\nif not cfg.flags.NoPCH and cfg.pchheader then\n_p(indentlevel, \".CompilerInputFiles - '%s'\", cfg.pchsource)\n_p(indentlevel, \".PCHInputFile = '%s'\", cfg.pchsource)\n_p(indentlevel, \".PCHOutputFile = .CompilerOutputPath + '%s.pch'\", prj.name)\n_p(indentlevel, \".CompilerOptions + ' /Fp\\\"' + .CompilerOutputPath + '%s.pch\\\"'\", prj.name)\n_p(indentlevel, \".PCHOptions = .CompilerOptions\")\n_p" - "(indentlevel, \" + ' /Yc\\\"%s\\\"'\", cfg.pchheader)\n_p(indentlevel, \" + ' /Fo\\\"%%3\\\"'\")\n_p(indentlevel, \".CompilerOptions + ' /Yu\\\"%s\\\"'\", cfg.pchheader)\nend\n_p(indentlevel, \" + ' /Fo\\\"%%2\\\"'\") -- make sure the previous property is .CompilerOptions\nend\nlocal function library(prj, cfg, useconfig)\n_p(1, \"Library('%s-%s-%s')\", prj.name, cfg.name, cfg.platform)\n_p(1, '{')\nuseconfig(2)\ncompile(2, prj, cfg)\nlocal librarianoptions = {\n'\"%1\"',\n'/OUT:\"%2\"',\n'/NOLOGO',\n}\nif cfg.platform == 'x64' then\ntable.insert(librarianoptions, '/MACHINE:X64')\nelse\ntable.insert(librarianoptions, '/MACHINE:X86')\nend\n_p(2, \".LibrarianOptions = ''\")\nfor _, option in ipairs(librarianoptions) do\n_p(2, \" + ' %s'\", option)\nend\n_p(2, \".LibrarianOutput = '%s'\", cfg.buildtarget.fullpath)\n_p(1, '}')\n_p('')\nend\nlocal function binary(prj, cfg, useconfig, bintype)\n_p(1, \"ObjectList('%s_obj-%s-%s')\", prj.name, cfg.name, cfg.platfor" - "m)\n_p(1, '{')\nuseconfig(2)\ncompile(2, prj, cfg)\n_p(1, '}')\n_p('')\n_p(1, \"%s('%s-%s-%s')\", bintype, prj.name, cfg.name, cfg.platform)\n_p(1, '{')\nuseconfig(2)\n_p(2, '.Libraries = {')\n_p(3, \"'%s_obj-%s-%s',\", prj.name, cfg.name, cfg.platform) -- Refer to the ObjectList\nfor _, deplib in ipairs(premake.getlinks(cfg, \"dependencies\", \"basename\")) do\n_p(3, \"'%s-%s-%s',\", deplib, cfg.name, cfg.platform)\nend\n_p(3, '}')\n_p(2, '.LinkerLinkObjects = false')\nlocal linkeroptions = {\n'\"%1\"',\n'/OUT:\"%2\"',\n'/NOLOGO',\n'/errorReport:prompt',\n}\nlocal subsystemversion = '\",5.02\"'\nif cfg.platform == 'x32' then\nsubsystemversion = '\",5.01\"'\nend\nif cfg.kind == 'ConsoleApp' then\ntable.insert(linkeroptions, '/SUBSYSTEM:CONSOLE'..subsystemversion)\nelse\ntable.insert(linkeroptions, '/SUBSYSTEM:WINDOWS'..subsystemversion)\nend\nif cfg.kind == 'SharedLib' then\ntable.insert(linkeroptions, '/DLL')\nend\nif cfg.platform == 'x64' then\ntable.insert(linkeroptions, '/MACHINE:X64')\nelse\ntable.insert(" - "linkeroptions, '/MACHINE:X86')\nend\nfor _, libdir in ipairs(cfg.libdirs) do\ntable.insert(linkeroptions, string.format('/LIBPATH:%s', path.translate(libdir, '\\\\')))\nend\nif not cfg.flags.WinMain and (cfg.kind == 'ConsoleApp' or cfg.kind == 'WindowedApp') then\nif cfg.flags.Unicode then\ntable.insert(linkeroptions, '/ENTRY:wmainCRTStartup')\nelse\ntable.insert(linkeroptions, '/ENTRY:mainCRTStartup')\nend\nend\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\ntable.insert(linkeroptions, '/DEF:%s', deffile)\nend\nif premake.config.isoptimizedbuild(cfg.flags) then\ntable.insert(linkeroptions, '/OPT:REF')\ntable.insert(linkeroptions, '/OPT:ICF')\nend\ntable.insert(linkeroptions, '/INCREMENTAL'..((premake.config.isincrementallink(cfg) and '') or ':NO'))\nfor _, addloption in ipairs(cfg.linkoptions) do\ntable.insert(linkeroptions, addloption)\nend\nlocal linklibs = premake.getlinks(cfg, \"all\", \"fullpath\")\nfor _, linklib in ipairs(linklibs) do\ntable.insert(linkeroptions, path.getname(linklib" - "))\nend\n_p(2, \".LinkerOptions = ''\")\nfor _, option in ipairs(linkeroptions) do\n_p(2, \" + ' %s'\", option)\nend\n_p(2, \" + .MSVCLibPaths\")\n_p(2, \".LinkerOutput = '%s'\", cfg.buildtarget.fullpath)\n_p(1, '}')\n_p('')\nend\nlocal function executable(prj, cfg, useconfig)\nbinary(prj, cfg, useconfig, 'Executable')\nend\nlocal function dll(prj, cfg, useconfig)\nbinary(prj, cfg, useconfig, 'DLL')\nend\nlocal function alias(prj, cfg, target)\n_p(1, \"Alias('%s-%s-%s')\", prj.name, cfg.name, cfg.platform)\n_p(1, '{')\n_p(2, \".Targets = '%s'\", target)\n_p(1, '}')\n_p('')\nend\nfunction premake.fastbuild.project(prj)\nio.indent = ' '\n_p('// FastBuild project configuration file. Generated by GENie.')\n_p('//------------------------------------------------------------------------------------')\n_p('// %s', prj.name)\n_p('//------------------------------------------------------------------------------------')\n_p('')\n_p('{')\nlocal cppfiles = {}\nfor file in premake.project.each" - "file(prj) do\nif path.iscppfile(file.name) then\ntable.insert(cppfiles, file.name)\nend\nend\nlocal commonbasepath = cppfiles[1]\nfor _, file in ipairs(cppfiles) do\ncommonbasepath = path.getcommonbasedir(commonbasepath..'/', file)\nend\n_p(1, \".CompilerInputPath = '%s/'\", commonbasepath)\n_p(1, \".CompilerInputPattern = 'ignoreall'\")\n_p(1, '.CompilerInputFiles = {')\nfor _, file in ipairs(cppfiles) do\n_p(2, \"'%s',\", file)\nend\n_p(2, '}')\n_p('')\nlocal targetkindmap = {\nConsoleApp = executable,\nWindowedApp = executable,\nSharedLib = dll,\nStaticLib = library,\n}\nlocal useconfigmap = {\nx32 = function(indentlevel)\n_p(indentlevel, 'Using(.MSVCx86Config)')\n_p('')\nend,\nx64 = function(indentlevel)\n_p(indentlevel, 'Using(.MSVCx64Config)')\n_p('')\nend,\n}\nlocal nativeplatform = (os.is64bit() and 'x64') or 'x32'\nfor _, platform in ipairs(prj.solution.platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\nif cfg.platform == 'Native' then\nalias(prj, cfg, string.format('%s-%s-%s', prj.name, " - "cfg.name, nativeplatform))\nelse\ntargetkindmap[prj.kind](prj, cfg, useconfigmap[cfg.platform])\nend\nend\nend\n_p('}')\nend\n", + "-- Generates a FASTBuild config file for a project.\nlocal function add_trailing_backslash(dir)\nif dir:len() > 0 and dir:sub(-1) ~= \"\\\\\" then\nreturn dir..\"\\\\\"\nend\nreturn dir\nend\nlocal function compile(indentlevel, prj, cfg, commonbasepath)\nlocal firstflag = true\nfor _, cfgexclude in ipairs(cfg.excludes) do\nif path.isSourceFile(cfgexclude) then\nif firstflag then\n_p(indentlevel, '// Excluded files:')\nfirstflag = false\nend\n_p(indentlevel, \".CompilerInputFiles - '%s'\", cfgexclude)\nend\nend\nif not firstflag then\n_p('')\nend\n_p(indentlevel, \".CompilerOutputPath = '%s'\", add_trailing_backslash(cfg.objectsdir))\n_p(indentlevel, \".Defines = ''\")\nfor _, define in ipairs(cfg.defines) do\n_p(indentlevel+1, \"+ ' /D%s'\", define)\nend\nif cfg.kind == 'SharedLib' then\n_p(indentlevel+1, \"+ ' /D_WINDLL'\")\nend\n_p(indentlevel, \".IncludeDirs = ''\")\nlocal sortedincdirs = {}\nfor _, includedir in ipairs(cfg.userincludedirs) do\nif includedir ~= nil then\ntable.insert(sortedincdirs, included" + "ir)\nend\nend\nfor _, includedir in ipairs(cfg.includedirs) do\nif includedir ~= nil then\ntable.insert(sortedincdirs, includedir)\nend\nend\nlocal function getpathnodecount(p)\nlocal nodefinder = string.gmatch(p, \"[^\\\\/]+\")\nlocal result = 0\nlocal node = nodefinder()\nwhile node do\nresult = result + ((node ~= '.' and 1) or 0)\nnode = nodefinder()\nend\nreturn result\nend\nlocal stepsfrombase = {}\nfor _, includedir in ipairs(sortedincdirs) do\nstepsfrombase[includedir] = getpathnodecount(path.getrelative(commonbasepath, includedir))\nend\nlocal function includesort(a, b)\nif stepsfrombase[a] == stepsfrombase[b] then\nreturn a < b\nelse\nreturn stepsfrombase[a] < stepsfrombase[b]\nend\nend\ntable.sort(sortedincdirs, includesort)\nfor _, includedir in ipairs(sortedincdirs) do\n_p(indentlevel+1, \"+ ' /I\\\"%s\\\"'\", includedir)\nend\n_p(indentlevel+1, \"+ .MSVCIncludes\")\nlocal compileroptions = {\n'\"%1\"',\n'/nologo',\n'/c',\n'/Gy',\n'/Gm-',\n'/Zc:inline',\n'/errorReport:prompt',\n'/FS',\n}\nif cfg.fl" + "ags.ExtraWarnings then\ntable.insert(compileroptions, '/W4')\nend\nif (cfg.flags.NativeWChar == false or\ncfg.flags.NoNativeWChar) then\ntable.insert(compileroptions, '/Zc:wchar_t-')\nend\nif (cfg.flags.EnableMinimalRebuild or\ncfg.flags.NoMultiProcessorCompilation) then\nend\nif cfg.flags.FloatFast then\ntable.insert(compileroptions, '/fp:fast')\nelseif cfg.flags.FloatStrict then\ntable.insert(compileroptions, '/fp:strict')\nelse\ntable.insert(compileroptions, '/fp:precise')\nend\nif cfg.flags.FastCall then\ntable.insert(compileroptions, '/Gr')\nelseif cfg.flags.StdCall then\ntable.insert(compileroptions, '/Gd')\nend\nif cfg.flags.UnsignedChar then\ntable.insert(compileroptions, '/J')\nend\nif premake.config.isdebugbuild(cfg) then\nif cfg.flags.StaticRuntime then\ntable.insert(compileroptions, '/MTd')\nelse\ntable.insert(compileroptions, '/MDd')\nend\nelse\nif cfg.flags.StaticRuntime then\ntable.insert(compileroptions, '/MT')\nelse\ntable.insert(compileroptions, '/MD')\nend\nend\nif cfg.flags.Symbols then\nif" + " (premake.config.isoptimizedbuild(cfg.flags)\nor cfg.flags.NoEditAndContinue) then\ntable.insert(compileroptions, '/Zi')\nelse\ntable.insert(compileroptions, '/ZI')\nend\nlocal targetdir = add_trailing_backslash(cfg.buildtarget.directory)\ntable.insert(compileroptions, string.format(\"/Fd\\\"%s%s.pdb\\\"\", targetdir, cfg.buildtarget.basename))\nend\nlocal isoptimised = true\nif (cfg.flags.Optimize) then\ntable.insert(compileroptions, '/Ox')\nelseif (cfg.flags.OptimizeSize) then\ntable.insert(compileroptions, '/O1')\nelseif (cfg.flags.OptimizeSpeed) then\ntable.insert(compileroptions, '/O2')\nelse\nisoptimised = false\nend\nif isoptimised then\ntable.insert(compileroptions, '/GF')\nelse\ntable.insert(compileroptions, '/Od')\ntable.insert(compileroptions, '/RTC1')\nend\nif cfg.flags.FatalWarnings then\ntable.insert(compileroptions, '/WX')\nelse\ntable.insert(compileroptions, '/WX-')\nend\nif cfg.platform == 'x32' then\nif cfg.flags.EnableSSE2 then\ntable.insert(compileroptions, '/arch:SSE2')\nelseif cfg.flags.E" + "nableSSE then\ntable.insert(compileroptions, '/arch:SSE')\nend\nend\nif cfg.flags.NoExceptions then\nelse\nif cfg.flags.SEH then\ntable.insert(compileroptions, '/EHa')\nelse\ntable.insert(compileroptions, '/EHsc')\nend\nend\nif cfg.flags.NoRTTI then\ntable.insert(compileroptions, '/GR-')\nelse\ntable.insert(compileroptions, '/GR')\nend\nif cfg.flags.NoFramePointer then\ntable.insert(compileroptions, '/Oy-')\nelse\ntable.insert(compileroptions, '/Oy')\nend\nfor _, addloption in ipairs(cfg.buildoptions) do\ntable.insert(compileroptions, addloption)\nend\n_p(indentlevel, \".CompilerOptions = ''\")\nfor _, option in ipairs(compileroptions) do\n_p(indentlevel+1, \"+ ' %s'\", option)\nend\n_p(indentlevel+1, \"+ .IncludeDirs\")\n_p(indentlevel+1, \"+ .Defines\")\nif not cfg.flags.NoPCH and cfg.pchheader then\n_p(indentlevel, \".CompilerInputFiles - '%s'\", cfg.pchsource)\n_p(indentlevel, \".PCHInputFile = '%s'\", cfg.pchsource)\n_p(indentlevel, \".PCHOutputFile = .CompilerOutputPath + '%s.pch'\", prj.name)\n_p(indent" + "level, \".CompilerOptions + ' /Fp\\\"' + .CompilerOutputPath + '%s.pch\\\"'\", prj.name)\n_p(indentlevel, \".PCHOptions = .CompilerOptions\")\n_p(indentlevel+1, \"+ ' /Yc\\\"%s\\\"'\", cfg.pchheader)\n_p(indentlevel+1, \"+ ' /Fo\\\"%%3\\\"'\")\n_p(indentlevel, \".CompilerOptions + ' /Yu\\\"%s\\\"'\", cfg.pchheader)\nend\n_p(indentlevel+1, \"+ ' /Fo\\\"%%2\\\"'\") -- make sure the previous property is .CompilerOptions\nend\nlocal function library(prj, cfg, useconfig, commonbasepath)\n_p(1, \"Library('%s-%s-%s')\", prj.name, cfg.name, cfg.platform)\n_p(1, '{')\nuseconfig(2)\ncompile(2, prj, cfg, commonbasepath)\nlocal librarianoptions = {\n'\"%1\"',\n'/OUT:\"%2\"',\n'/NOLOGO',\n}\nif cfg.platform == 'x64' then\ntable.insert(librarianoptions, '/MACHINE:X64')\nelse\ntable.insert(librarianoptions, '/MACHINE:X86')\nend\n_p(2, \".LibrarianOptions = ''\")\nfor _, option in ipairs(librarianoptions) do\n_p(3, \"+ ' %s'\", option)\nend\n_p(2, \".LibrarianOutput = '%s'\", cfg.buildtarget.fullpath)\n_p(1, '}')\n_p('')\nend" + "\nlocal function binary(prj, cfg, useconfig, bintype, commonbasepath)\n_p(1, \"ObjectList('%s_obj-%s-%s')\", prj.name, cfg.name, cfg.platform)\n_p(1, '{')\nuseconfig(2)\ncompile(2, prj, cfg, commonbasepath)\n_p(1, '}')\n_p('')\n_p(1, \"%s('%s-%s-%s')\", bintype, prj.name, cfg.name, cfg.platform)\n_p(1, '{')\nuseconfig(2)\n_p(2, '.Libraries = {')\n_p(3, \"'%s_obj-%s-%s',\", prj.name, cfg.name, cfg.platform) -- Refer to the ObjectList\nlocal sorteddeplibs = {}\nfor _, deplib in ipairs(premake.getlinks(cfg, \"dependencies\", \"basename\")) do\ntable.insert(sorteddeplibs, string.format(\"'%s-%s-%s',\", deplib, cfg.name, cfg.platform))\nend\ntable.sort(sorteddeplibs)\nfor _, deplib in ipairs(sorteddeplibs) do\n_p(3, deplib)\nend\n_p(3, '}')\n_p(2, '.LinkerLinkObjects = false')\nlocal linkeroptions = {\n'\"%1\"',\n'/OUT:\"%2\"',\n'/NOLOGO',\n'/errorReport:prompt',\n}\nlocal subsystemversion = '\",5.02\"'\nif cfg.platform == 'x32' then\nsubsystemversion = '\",5.01\"'\nend\nif cfg.kind == 'ConsoleApp' then\ntable.inse" + "rt(linkeroptions, '/SUBSYSTEM:CONSOLE'..subsystemversion)\nelse\ntable.insert(linkeroptions, '/SUBSYSTEM:WINDOWS'..subsystemversion)\nend\nif cfg.kind == 'SharedLib' then\ntable.insert(linkeroptions, '/DLL')\nend\nif cfg.platform == 'x64' then\ntable.insert(linkeroptions, '/MACHINE:X64')\nelse\ntable.insert(linkeroptions, '/MACHINE:X86')\nend\nfor _, libdir in ipairs(cfg.libdirs) do\ntable.insert(linkeroptions, string.format('/LIBPATH:%s', path.translate(libdir, '\\\\')))\nend\nif not cfg.flags.WinMain and (cfg.kind == 'ConsoleApp' or cfg.kind == 'WindowedApp') then\nif cfg.flags.Unicode then\ntable.insert(linkeroptions, '/ENTRY:wmainCRTStartup')\nelse\ntable.insert(linkeroptions, '/ENTRY:mainCRTStartup')\nend\nend\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\ntable.insert(linkeroptions, '/DEF:%s', deffile)\nend\nif (cfg.flags.Symbols ~= nil) then\ntable.insert(linkeroptions, '/DEBUG')\nend\nif premake.config.isoptimizedbuild(cfg.flags) then\ntable.insert(linkeroptions, '/OPT:REF')\ntable." + "insert(linkeroptions, '/OPT:ICF')\nend\ntable.insert(linkeroptions, '/INCREMENTAL'..((premake.config.isincrementallink(cfg) and '') or ':NO'))\nfor _, addloption in ipairs(cfg.linkoptions) do\ntable.insert(linkeroptions, addloption)\nend\nlocal linklibs = premake.getlinks(cfg, \"all\", \"fullpath\")\nfor _, linklib in ipairs(linklibs) do\ntable.insert(linkeroptions, path.getname(linklib))\nend\ntable.sort(linkeroptions)\n_p(2, \".LinkerOptions = ''\")\nfor _, option in ipairs(linkeroptions) do\n_p(3, \"+ ' %s'\", option)\nend\n_p(3, \"+ .MSVCLibPaths\")\n_p(2, \".LinkerOutput = '%s'\", cfg.buildtarget.fullpath)\n_p(1, '}')\n_p('')\nend\nlocal function executable(prj, cfg, useconfig, commonbasepath)\nbinary(prj, cfg, useconfig, 'Executable', commonbasepath)\nend\nlocal function dll(prj, cfg, useconfig, commonbasepath)\nbinary(prj, cfg, useconfig, 'DLL', commonbasepath)\nend\nlocal function alias(prj, cfg, target)\n_p(1, \"Alias('%s-%s-%s')\", prj.name, cfg.name, cfg.platform)\n_p(1, '{')\n_p(2, \".Targets = '%s" + "'\", target)\n_p(1, '}')\n_p('')\nend\nfunction premake.fastbuild.project(prj)\nio.indent = ' '\n_p('// FASTBuild project configuration file autogenerated by GENie.')\n_p('')\n_p('{')\nlocal cppfiles = {}\nfor file in premake.project.eachfile(prj) do\nif path.isSourceFile(file.name) then\ntable.insert(cppfiles, file.name)\nend\nend\nlocal commonbasepath = cppfiles[1]\nfor _, file in ipairs(cppfiles) do\ncommonbasepath = path.getcommonbasedir(commonbasepath..'/', file)\nend\n_p(1, \".CompilerInputPath = '%s/'\", commonbasepath)\n_p(1, \".CompilerInputPattern = 'ignoreall'\")\n_p(1, '.CompilerInputFiles = {')\nfor _, file in ipairs(cppfiles) do\n_p(2, \"'%s',\", file)\nend\n_p(1, '}')\n_p('')\nlocal targetkindmap = {\nConsoleApp = executable,\nWindowedApp = executable,\nSharedLib = dll,\nStaticLib = library,\n}\nlocal useconfigmap = {\nx32 = function(indentlevel)\n_p(indentlevel, 'Using(.MSVCx86Config)')\n_p('')\nend,\nx64 = function(indentlevel)\n_p(indentlevel, 'Using(.MSVCx64Config)')\n_p('')\nend,\n}\nloc" + "al nativeplatform = (os.is64bit() and 'x64') or 'x32'\nfor _, platform in ipairs(prj.solution.platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\nif cfg.platform == 'Native' then\nalias(prj, cfg, string.format('%s-%s-%s', prj.name, cfg.name, nativeplatform))\nelse\ntargetkindmap[prj.kind](prj, cfg, useconfigmap[cfg.platform], commonbasepath)\nend\nend\nend\n_p('}')\nend\n", /* actions/fastbuild/fastbuild_solution.lua */ - "function premake.fastbuild.solution(sln)\nio.indent = ' '\n_p('// FastBuild solution configuration file. Generated by GENie.')\n_p('//------------------------------------------------------------------------------------')\n_p('// %s', sln.name)\n_p('//------------------------------------------------------------------------------------')\n_p('#import VS140COMNTOOLS')\nlocal is64bit = os.is64bit()\nlocal target64 = (is64bit and ' amd64') or ' x86_amd64'\nlocal target32 = (is64bit and ' amd64_x86') or ''\nlocal vstoolspath = os.getenv('VS140COMNTOOLS')\nlocal getvcvarspatt = 'call \"%s..\\\\..\\\\VC\\\\vcvarsall.bat\"%s & cmd /c echo %%INCLUDE%% & cmd /c echo %%LIB%%'\nlocal includeslibsrawx64 = os.outputof(string.format(getvcvarspatt, vstoolspath, target64))\nlocal msvcvars = {}\nmsvcvars.x64 = {}\nlocal includeslibssplitter = string.gmatch(includeslibsrawx64, \"[^\\n]+\")\nmsvcvars.x64.includesraw = includeslibssplitter()\nmsvcvars.x64.libpathsraw = includeslibssplitter()\nlocal includeslibsrawx86 = os.outpu" - "tof(string.format(getvcvarspatt, vstoolspath, target32))\nmsvcvars.x32 = {}\nincludeslibssplitter = string.gmatch(includeslibsrawx86, \"[^\\n]+\")\nmsvcvars.x32.includesraw = includeslibssplitter()\nmsvcvars.x32.libpathsraw = includeslibssplitter()\nif is64bit then\n_p('.MSVCx64Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64\\\\link.exe'\")\n_p(1, \".MSVCIncludes = ''\")\nfor i in string.gmatch(msvcvars.x64.includesraw, \"[^;]+\") do\n_p(1, \" + ' /I\\\"%s\\\"'\", i)\nend\n_p(1, \".MSVCLibPaths = ''\")\nfor i in string.gmatch(msvcvars.x64.libpathsraw, \"[^;]+\") do\n_p(1, \" + ' /LIBPATH:\\\"%s\\\"'\", i)\nend\n_p(']')\n_p('')\n_p('.MSVCx86Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64_x86\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOL" - "S$..\\\\..\\\\VC\\\\bin\\\\amd64_x86\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64_x86\\\\link.exe'\")\n_p(1, \".MSVCIncludes = ''\")\nfor i in string.gmatch(msvcvars.x32.includesraw, \"[^;]+\") do\n_p(1, \" + ' /I\\\"%s\\\"'\", i)\nend\n_p(1, \".MSVCLibPaths = ''\")\nfor i in string.gmatch(msvcvars.x32.libpathsraw, \"[^;]+\") do\n_p(1, \" + ' /LIBPATH:\\\"%s\\\"'\", i)\nend\n_p(']')\n_p('')\nelse\n_p('.MSVCx64Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\x86_amd64\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\x86_amd64\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\x86_amd64\\\\link.exe'\")\n_p(1, \".MSVCIncludes = ''\")\nfor i in string.gmatch(msvcvars.x64.includesraw, \"[^;]+\") do\n_p(1, \" + ' /I\\\"%s\\\"'\", i)\nend\n_p(1, \".MSVCLibPaths = ''\")\nfor i in string.gmatch(msvcvars.x64.libpathsraw, \"[^;]+\") do\n_p(1, \" +" - " ' /LIBPATH:\\\"%s\\\"'\", i)\nend\n_p(']')\n_p('')\n_p('.MSVCx86Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\link.exe'\")\n_p(1, \".MSVCIncludes = ''\")\nfor i in string.gmatch(msvcvars.x32.includesraw, \"[^;]+\") do\n_p(1, \" + ' /I\\\"%s\\\"'\", i)\nend\n_p(1, \".MSVCLibPaths = ''\")\nfor i in string.gmatch(msvcvars.x32.libpathsraw, \"[^;]+\") do\n_p(1, \" + ' /LIBPATH:\\\"%s\\\"'\", i)\nend\n_p(']')\n_p('')\nend\nlocal function projkindsort(a, b)\nlocal projvaluemap = {\nConsoleApp = 3,\nWindowedApp = 3,\nSharedLib = 2,\nStaticLib = 1,\n}\nreturn projvaluemap[a.kind] < projvaluemap[b.kind]\nend\nlocal sortedprojs = {}\nfor prj in premake.solution.eachproject(sln) do\ntable.insert(sortedprojs, prj)\nend\ntable.sort(sortedprojs, projkindsort)\nfor _, prj in ipairs(sortedprojs) do\nlocal fname = prema" - "ke.project.getbasename(prj.name, '%%.bff')\nfname = path.join(prj.location, fname)\nfname = path.getrelative(sln.location, fname)\n_p('#include \"%s\"', fname)\nend\n_p('')\n_p('.ProjectVariants = {')\nfor _, plat in ipairs(sln.platforms) do\nfor _, cfg in ipairs(sln.configurations) do\n_p(1, \"'%s-%s',\", cfg, plat)\nend\nend\n_p(1, '}')\n_p('')\n_p('ForEach(.Variant in .ProjectVariants)')\n_p('{')\n_p(1, \"Alias('all-$Variant$')\")\n_p(1, '{')\n_p(2, '.Targets = {')\nfor prj in premake.solution.eachproject(sln) do\n_p(3, \"'%s-$Variant$',\", prj.name)\nend\n_p(3, '}')\n_p(1, '}')\n_p('}')\nend\n", + "-- Generates a FASTBuild config file for a solution.\nfunction premake.fastbuild.solution(sln)\nio.indent = ' '\n_p('// FastBuild solution configuration file. Generated by GENie.')\n_p('//------------------------------------------------------------------------------------')\n_p('// %s', sln.name)\n_p('//------------------------------------------------------------------------------------')\n_p('#import VS140COMNTOOLS')\nlocal is64bit = os.is64bit()\nlocal target64 = (is64bit and ' amd64') or ' x86_amd64'\nlocal target32 = (is64bit and ' amd64_x86') or ''\nlocal getvcvarscontent = [[\n@set INCLUDE=\n@set LIB=\n@set CommandPromptType=\n@set PreferredToolArchitecture=\n@set Platform=\n@set Path=%SystemRoot%\\System32;%SystemRoot%;%SystemRoot%\\System32\\wbem\n@call \"%VS140COMNTOOLS%..\\..\\VC\\vcvarsall.bat\" %1\n@echo %INCLUDE%\n@echo %LIB%\n@echo %CommandPromptType%\n@echo %PreferredToolArchitecture%\n@echo %Platform%\n@echo %Path%\n]]\nlocal getvcvarsfilepath = os.getenv('TEMP')..'\\\\getvcvars.bat'\nlocal" + " getvcvarsfile = assert(io.open(getvcvarsfilepath, 'w'))\ngetvcvarsfile:write(getvcvarscontent)\ngetvcvarsfile:close()\nlocal vcvarsrawx86 = os.outputof(string.format('call \"%s\"%s', getvcvarsfilepath, target32))\nlocal vcvarsrawx64 = os.outputof(string.format('call \"%s\"%s', getvcvarsfilepath, target64))\nos.remove(getvcvarsfilepath)\nlocal msvcvars = {}\nmsvcvars.x32 = {}\nmsvcvars.x64 = {}\nlocal includeslibssplitter = string.gmatch(vcvarsrawx64, \"[^\\n]+\")\nmsvcvars.x64.includesraw = includeslibssplitter()\nmsvcvars.x64.libpathsraw = includeslibssplitter()\nmsvcvars.x64.commandprompttype = includeslibssplitter()\nmsvcvars.x64.preferredtoolarchitecture = includeslibssplitter()\nmsvcvars.x64.platform = includeslibssplitter()\nmsvcvars.x64.pathraw = includeslibssplitter()\nincludeslibssplitter = string.gmatch(vcvarsrawx86, \"[^\\n]+\")\nmsvcvars.x32.includesraw = includeslibssplitter()\nmsvcvars.x32.libpathsraw = includeslibssplitter()\nmsvcvars.x32.commandprompttype = includeslibssplitter()\nmsvcvars.x32" + ".preferredtoolarchitecture = includeslibssplitter()\nmsvcvars.x32.platform = includeslibssplitter()\nmsvcvars.x32.pathraw = includeslibssplitter()\nlocal function printincludes(includesraw)\n_p(1, \".MSVCIncludes = ''\")\nfor i in string.gmatch(includesraw, \"[^;]+\") do\n_p(2, \"+ ' /I\\\"%s\\\"'\", i)\nend\nend\nlocal function printlibpaths(libpathsraw)\n_p(1, \".MSVCLibPaths = ''\")\nfor i in string.gmatch(libpathsraw, \"[^;]+\") do\n_p(2, \"+ ' /LIBPATH:\\\"%s\\\"'\", i)\nend\nend\nif is64bit then\n_p('.MSVCx64Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64\\\\link.exe'\")\nprintincludes(msvcvars.x64.includesraw)\nprintlibpaths(msvcvars.x64.libpathsraw)\n_p(']')\n_p('')\n_p('.MSVCx86Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64_x86\\\\cl.exe'\")\n_p(1, \"." + "Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64_x86\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64_x86\\\\link.exe'\")\nprintincludes(msvcvars.x32.includesraw)\nprintlibpaths(msvcvars.x32.libpathsraw)\n_p(']')\n_p('')\nelse\n_p('.MSVCx64Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\x86_amd64\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\x86_amd64\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\x86_amd64\\\\link.exe'\")\nprintincludes(msvcvars.x64.includesraw)\nprintlibpaths(msvcvars.x64.libpathsraw)\n_p(']')\n_p('')\n_p('.MSVCx86Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\link.exe'\")\nprintincludes(msvcvars.x32.includesraw)\nprintlibpaths(msvcvars.x32.libpathsraw)\n_p(']')" + "\n_p('')\nend\nlocal msvcbin = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin' .. ((is64bit and '\\\\amd64') or '')\n_p('#import Path')\n_p('#import TMP')\n_p('#import SystemRoot')\n_p('')\n_p('Settings')\n_p('{')\n_p(1, '.Environment = {')\n_p(2, \"'Path=%s;$Path$',\", msvcbin)\n_p(2, \"'TMP=$TMP$',\")\n_p(2, \"'SystemRoot=$SystemRoot$',\")\n_p(2, '}')\n_p('}')\n_p('')\nlocal function projkindsort(a, b)\nlocal projvaluemap = {\nConsoleApp = 3,\nWindowedApp = 3,\nSharedLib = 2,\nStaticLib = 1,\n}\nif projvaluemap[a.kind] == projvaluemap[b.kind] then\nreturn a.name < b.name\nelse\nreturn projvaluemap[a.kind] < projvaluemap[b.kind]\nend\nend\nlocal sortedprojs = {}\nfor prj in premake.solution.eachproject(sln) do\ntable.insert(sortedprojs, prj)\nend\ntable.sort(sortedprojs, projkindsort)\nfor _, prj in ipairs(sortedprojs) do\nlocal fname = premake.project.getbasename(prj.name, '%%.bff')\nfname = path.join(prj.location, fname)\nfname = path.getrelative(sln.location, fname)\n_p('#include \"%s\"', fname)\nend\n_p('')" + "\n_p('.ProjectVariants = {')\nfor _, plat in ipairs(sln.platforms) do\nfor _, cfg in ipairs(sln.configurations) do\n_p(1, \"'%s-%s',\", cfg, plat)\nend\nend\n_p('}')\n_p('')\n_p('ForEach(.Variant in .ProjectVariants)')\n_p('{')\n_p(1, \"Alias('all-$Variant$')\")\n_p(1, '{')\n_p(2, '.Targets = {')\nfor _, prj in ipairs(sortedprojs) do\n_p(3, \"'%s-$Variant$',\", prj.name)\nend\n_p(2, '}')\n_p(1, '}')\n_p('}')\nend\n", + + /* actions/ninja/_ninja.lua */ + "premake.ninja = { }\nlocal p = premake\nnewaction\n{\ntrigger = \"ninja\",\nshortname = \"ninja\",\ndescription = \"Ninja is a small build system with a focus on speed\",\nmodule = \"ninja\",\nvalid_kinds = {\"ConsoleApp\", \"WindowedApp\", \"SharedLib\", \"StaticLib\"},\nvalid_languages = {\"C\", \"C++\"},\nvalid_tools = {\ncc = { \"gcc\" }\n},\nonsolution = function(sln)\nio.eol = \"\\r\\n\"\nio.indent = \"\\t\"\nio.escaper(p.ninja.esc)\np.generate(sln, \"Makefile\", p.ninja.generate_solution)\nio.indent = \" \"\np.ninja.generate_ninja_builds(sln)\nend,\nonproject = function(prj)\nio.eol = \"\\r\\n\"\nio.indent = \" \"\nio.escaper(p.ninja.esc)\np.ninja.generate_project(prj)\nend,\noncleansolution = function(sln)\nfor _,name in ipairs(sln.configurations) do\npremake.clean.file(sln, p.ninja.get_solution_name(sln, name))\nend\nend,\noncleanproject = function(prj)\nend,\noncleantarget = function(prj)\nend,\n}", + + /* actions/ninja/ninja_base.lua */ + "local ninja = premake.ninja\nfunction ninja.esc(value)\nvalue = value:gsub(\"%$\", \"$$\") -- TODO maybe there is better way\nvalue = value:gsub(\":\", \"$:\")\nvalue = value:gsub(\"\\n\", \"$\\n\")\nvalue = value:gsub(\" \", \"$ \")\nreturn value\nend\nfunction ninja.shesc(value)\nif type(value) == \"table\" then\nlocal result = {}\nlocal n = #value\nfor i = 1, n do\ntable.insert(result, ninja.shesc(value[i]))\nend\nreturn result\nend\nif value:find(\" \") then\nreturn \"\\\"\" .. value .. \"\\\"\"\nend\nreturn value\nend\nfunction ninja.list(value)\nif #value > 0 then\nreturn \" \" .. table.concat(value, \" \")\nelse\nreturn \"\"\nend\nend\nfunction ninja.generate_project(prj)\nninja.generate_cpp(prj)\nend\nlocal function innerget(self, key)\nreturn rawget(getmetatable(self), key) or self.__inner[key]\nend\nlocal prj_proxy = { __index = innerget }\nlocal cfg_proxy = { __index = innerget }\nfunction new_prj_proxy(prj)\nprj = prj.project or prj\nlocal v = { __inner = prj }\nlocal __configs = {}\nfor key, cfg i" + "n pairs(prj.__configs) do\nif key ~= \"\" then\n__configs[key] = ninja.get_proxy(\"cfg\", cfg)\nelse\n__configs[key] = cfg\nend\nend\nv.__configs = __configs\nreturn setmetatable(v, prj_proxy)\nend\nlocal function rebasekeys(t, keys, old, new)\nfor _,key in ipairs(keys) do\nt[key] = path.rebase(t[key], old, new)\nend\nreturn t\nend\nlocal function rebasearray(t, old, new)\nlocal res = { }\nfor _,f in ipairs(t) do\ntable.insert(res, path.rebase(f, old, new))\nend\nreturn res\nend\nfunction new_cfg_proxy(cfg)\nlocal keys = { \"directory\", \"fullpath\", \"bundlepath\" }\nlocal old = cfg.location\nlocal new = path.join(cfg.location, cfg.shortname)\nlocal v = {\n__inner = cfg,\nlocation = new,\nobjectsdir = path.rebase(cfg.objectsdir, old, new),\nbuildtarget = rebasekeys(table.deepcopy(cfg.buildtarget), keys, old, new),\nlinktarget = rebasekeys(table.deepcopy(cfg.buildtarget), keys, old, new),\n}\nv.files = rebasearray(cfg.files, old, new)\nv.includedirs = rebasearray(cfg.includedirs, old, n" + "ew)\nv.userincludedirs = rebasearray(cfg.userincludedirs, old, new)\nreturn setmetatable(v, cfg_proxy)\nend\nfunction cfg_proxy:getprojectfilename(fullpath)\nlocal name = self.project.name .. \".ninja\"\nif fullpath ~= nil then\nreturn path.join(self.location, name)\nend\nreturn name\nend\nfunction cfg_proxy:getoutputfilename()\nreturn path.join(self.buildtarget.directory, self.buildtarget.name)\nend\nlocal proxy_cache = { \nprj = { new = new_prj_proxy }, \ncfg = { new = new_cfg_proxy },\n}\nfunction get_proxy(cache, obj)\nif not cache[obj] then\ncache[obj] = cache.new(obj)\nend\nreturn cache[obj]\nend\nfunction ninja.get_proxy(typ, obj)\nif not proxy_cache[typ] then\nerror(\"invalid proxy type\")\nend\nreturn get_proxy(proxy_cache[typ], obj)\nend\n", + + /* actions/ninja/ninja_solution.lua */ + "local ninja = premake.ninja\nlocal p = premake\nlocal solution = p.solution\nfunction ninja.generate_solution(sln)\nlocal cc = premake[_OPTIONS.cc]\nlocal platforms = premake.filterplatforms(sln, cc.platforms, \"Native\")\n_p('# %s solution makefile autogenerated by GENie', premake.action.current().shortname)\n_p('# Type \"make help\" for usage help')\n_p('')\n_p('NINJA=ninja')\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(sln.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\nlocal projects = table.extract(sln.projects, \"name\")\ntable.sort(projects)\n_p('')\n_p('.PHONY: all clean help $(PROJECTS)')\n_p('')\n_p('all:')\nif (not sln.messageskip) or (not table.contains(sln.messageskip, \"SkipBuildingMessage\")) then\n_p(1, '@echo \"==== Building all ($(config)) ====\"')\nend\n_p(1, '@${NINJA} -C ${config} all')\n_p('')\nfor _, prj in ipairs(sln.projects) do\nlocal prjx = ninja.get_proxy(\"prj\", prj)\n_p('%s:', _MAKE.esc(prj.name))\nif (not sln.messageskip) or (not table.c" + "ontains(sln.messageskip, \"SkipBuildingMessage\")) then\n_p(1, '@echo \"==== Building %s ($(config)) ====\"', prj.name)\nend\n_p(1, '@${NINJA} -C ${config} %s', prj.name)\n_p('')\nend\n_p('clean:')\n_p(1, '@${NINJA} -C ${config} -t clean')\n_p('')\n_p('help:')\n_p(1,'@echo \"Usage: make [config=name] [target]\"')\n_p(1,'@echo \"\"')\n_p(1,'@echo \"CONFIGURATIONS:\"')\nlocal cfgpairs = { }\nfor _, platform in ipairs(platforms) do\nfor _, cfgname in ipairs(sln.configurations) do\n_p(1,'@echo \" %s\"', premake.getconfigname(cfgname, platform, true))\nend\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"TARGETS:\"')\n_p(1,'@echo \" all (default)\"')\n_p(1,'@echo \" clean\"')\nfor _, prj in ipairs(sln.projects) do\n_p(1,'@echo \" %s\"', prj.name)\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"For more information, see https://github.com/bkaradzic/genie\"')\nend\nlocal generate\nlocal function getconfigs(sln, name, plat)\nlocal cfgs = {}\nfor prj in solution.eachproject(sln) do\nprj = ninja.get_proxy(\"prj\", prj)\nfor cfg " + "in p.eachconfig(prj, plat) do\nif cfg.name == name then\ntable.insert(cfgs, cfg)\nend\nend\nend\nreturn cfgs\nend\nfunction ninja.generate_ninja_builds(sln)\nlocal cc = premake[_OPTIONS.cc]\nsln.getlocation = function(cfg, plat)\nreturn path.join(sln.location, premake.getconfigname(cfg, plat, true))\nend\nlocal platforms = premake.filterplatforms(sln, cc.platforms, \"Native\")\nfor _,plat in ipairs(platforms) do\nfor _,name in ipairs(sln.configurations) do\np.generate(sln, ninja.get_solution_name(sln, name, plat), function(sln)\ngenerate(getconfigs(sln, name, plat))\nend)\nend\nend\nend\nfunction ninja.get_solution_name(sln, cfg, plat)\nreturn path.join(sln.getlocation(cfg, plat), \"build.ninja\")\nend\nfunction generate(prjcfgs)\nlocal cfgs = {}\nlocal cfg_first = nil\nlocal cfg_first_lib = nil\n_p(\"# solution build file\")\n_p(\"# generated with GENie ninja\")\n_p(\"\")\n_p(\"# build projects\")\nfor _,cfg in ipairs(prjcfgs) do\nlocal key = cfg.project.name\nif not cfgs[key] then cfgs[key] = " + "\"\" end\ncfgs[key] = cfg:getoutputfilename() .. \" \"\nif not cfgs[\"all\"] then cfgs[\"all\"] = \"\" end\ncfgs[\"all\"] = cfgs[\"all\"] .. cfg:getoutputfilename() .. \" \"\nif (cfg_first == nil) and (cfg.kind == \"ConsoleApp\" or cfg.kind == \"WindowedApp\") then\ncfg_first = key\nend\nif (cfg_first_lib == nil) and (cfg.kind == \"StaticLib\" or cfg.kind == \"SharedLib\") then\ncfg_first_lib = key\nend\n_p(\"subninja \" .. cfg:getprojectfilename())\nend\n_p(\"\")\n_p(\"# targets\")\nfor cfg, outputs in iter.sortByKeys(cfgs) do\n_p(\"build \" .. cfg .. \": phony \" .. outputs)\nend\n_p(\"\")\n_p(\"# default target\")\n_p(\"default \" .. (cfg_first or cfg_first_lib))\n_p(\"\")\nend\n", + + /* actions/ninja/ninja_cpp.lua */ + "premake.ninja.cpp = { }\nlocal ninja = premake.ninja\nlocal cpp = premake.ninja.cpp\nlocal p = premake\nlocal tree = p.tree\nfunction ninja.generate_cpp(prj)\nlocal pxy = ninja.get_proxy(\"prj\", prj)\nlocal tool = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, tool.platforms, \"Native\")\nfor _, platform in ipairs(platforms) do\nfor cfg in p.eachconfig(pxy, platform) do\np.generate(cfg, cfg:getprojectfilename(), function() cpp.generate_config(prj, cfg) end)\nend\nend\nend\nfunction cpp.generate_config(prj, cfg)\nlocal tool = premake.gettool(prj)\n_p(\"# project build file\")\n_p(\"# generated with GENie ninja\")\n_p(\"\")\n_p(\"ninja_required_version = 1.7\")\n_p(\"\")\nlocal flags = {\ndefines = ninja.list(tool.getdefines(cfg.defines)),\nincludes = ninja.list(table.join(tool.getincludedirs(cfg.includedirs), tool.getquoteincludedirs(cfg.userincludedirs))),\ncppflags = ninja.list(tool.getcppflags(cfg)),\ncflags = ninja.list(table.join(tool.getcflags(cfg), cfg.buildo" + "ptions, cfg.buildoptions_c)),\ncxxflags = ninja.list(table.join(tool.getcflags(cfg), tool.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)),\nobjcflags = ninja.list(table.join(tool.getcflags(cfg), tool.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)),\n}\n_p(\"\")\n_p(\"# core rules for \" .. cfg.name)\n_p(\"rule cc\")\n_p(\" command = \" .. tool.cc .. \" $defines $includes $flags -MMD -MF $out.d -c -o $out $in\")\n_p(\" description = cc $out\")\n_p(\" depfile = $out.d\")\n_p(\" deps = gcc\")\n_p(\"\")\n_p(\"rule cxx\")\n_p(\" command = \" .. tool.cxx .. \" $defines $includes $flags -MMD -MF $out.d -c -o $out $in\")\n_p(\" description = cxx $out\")\n_p(\" depfile = $out.d\")\n_p(\" deps = gcc\")\n_p(\"\")\n_p(\"rule ar\")\n_p(\" command = \" .. tool.ar .. \" $flags $out $in $libs \" .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\n_p(\" description = ar $out\")\n_p(\"\")\nlocal link = iif(cfg.language == \"C\", tool.cc, tool.cxx)\n_p(" + "\"rule link\")\n_p(\" command = \" .. link .. \" -o $out $in $all_ldflags $libs\")\n_p(\" description = link $out\")\n_p(\"\")\ncpp.file_rules(cfg, flags)\nlocal objfiles = {}\nfor _, file in ipairs(cfg.files) do\nif path.isSourceFile(file) then\ntable.insert(objfiles, cpp.objectname(cfg, file))\nend\nend\n_p('')\ncpp.linker(prj, cfg, objfiles, tool, flags)\n_p(\"\")\nend\nfunction cpp.objectname(cfg, file)\nreturn path.join(cfg.objectsdir, path.trimdots(path.removeext(file)) .. \".o\")\nend\nfunction cpp.file_rules(cfg, flags)\n_p(\"# build files\")\nfor _, file in ipairs(cfg.files) do\nif path.isSourceFile(file) then\nlocal objfilename = cpp.objectname(cfg, file)\nlocal cflags = \"cflags\"\nif path.isobjcfile(file) then\n_p(\"build \" .. objfilename .. \": cxx \" .. file)\ncflags = \"objcflags\"\nelseif path.iscfile(file) and not cfg.options.ForceCPP then\n_p(\"build \" .. objfilename .. \": cc \" .. file)\nelse\n_p(\"build \" .. objfilename .. \": cxx \" .. file)\ncflags = \"cxxflags\"\nend\n_p(1, \"flags" + " = \" .. flags[cflags])\n_p(1, \"includes = \" .. flags.includes)\n_p(1, \"defines = \" .. flags.defines)\nelseif path.isresourcefile(file) then\nend\nend\n_p(\"\")\nend\nfunction cpp.linker(prj, cfg, objfiles, tool)\nlocal all_ldflags = ninja.list(table.join(tool.getlibdirflags(cfg), tool.getldflags(cfg), cfg.linkoptions))\nlocal lddeps = ninja.list(premake.getlinks(cfg, \"siblings\", \"fullpath\")) \nlocal libs = lddeps .. \" \" .. ninja.list(tool.getlinkflags(cfg))\nlocal function writevars()\n_p(1, \"all_ldflags = \" .. all_ldflags)\n_p(1, \"libs = \" .. libs)\nend\nif cfg.kind == \"StaticLib\" then\nlocal ar_flags = ninja.list(tool.getarchiveflags(cfg, cfg, false))\n_p(\"# link static lib\")\n_p(\"build \" .. cfg:getoutputfilename() .. \": ar \" .. table.concat(objfiles, \" \") .. \" | \" .. lddeps)\n_p(1, \"flags = \" .. ninja.list(tool.getarchiveflags(cfg, cfg, false)))\nelseif cfg.kind == \"SharedLib\" then\nlocal output = cfg:getoutputfilename()\n_p(\"# link shared lib\")\n_p(\"" + "build \" .. output .. \": link \" .. table.concat(objfiles, \" \") .. \" | \" .. libs)\nwritevars()\nelseif (cfg.kind == \"ConsoleApp\") or (cfg.kind == \"WindowedApp\") then\n_p(\"# link executable\")\n_p(\"build \" .. cfg:getoutputfilename() .. \": link \" .. table.concat(objfiles, \" \") .. \" | \" .. lddeps)\nwritevars()\nelse\np.error(\"ninja action doesn't support this kind of target \" .. cfg.kind)\nend\nend\n", /* _premake_main.lua */ "_WORKING_DIR = os.getcwd()\nlocal function injectplatform(platform)\nif not platform then return true end\nplatform = premake.checkvalue(platform, premake.fields.platforms.allowed)\nfor sln in premake.solution.each() do\nlocal platforms = sln.platforms or { }\nif #platforms == 0 then\ntable.insert(platforms, \"Native\")\nend\nif not table.contains(platforms, \"Native\") then\nreturn false, sln.name .. \" does not target native platform\\nNative platform settings are required for the --platform feature.\"\nend\nif not table.contains(platforms, platform) then\ntable.insert(platforms, platform)\nend\nsln.platforms = platforms\nend\nreturn true\nend\nfunction _premake_main(scriptpath)\nif (scriptpath) then\nlocal scripts = dofile(scriptpath .. \"/_manifest.lua\")\nfor _,v in ipairs(scripts) do\ndofile(scriptpath .. \"/\" .. v)\nend\nend\n_PREMAKE_COMMAND = path.getabsolute(_PREMAKE_COMMAND)\npremake.action.set(_ACTION)\nmath.randomseed(os.time())\nif (nil ~= _OPTIONS[\"file\"]) then\nlocal fname = _OPTIONS" diff --git a/3rdparty/genie/src/tools/gcc.lua b/3rdparty/genie/src/tools/gcc.lua index 58ea8a19b50..78cc7744b30 100644 --- a/3rdparty/genie/src/tools/gcc.lua +++ b/3rdparty/genie/src/tools/gcc.lua @@ -312,6 +312,17 @@ return result end +-- +-- Decorate user include file search paths for the GCC command line. +-- + + function premake.gcc.getquoteincludedirs(includedirs) + local result = { } + for _,dir in ipairs(includedirs) do + table.insert(result, "-iquote " .. _MAKE.esc(dir)) + end + return result + end -- -- Return platform specific project and configuration level diff --git a/3rdparty/genie/src/tools/valac.lua b/3rdparty/genie/src/tools/valac.lua new file mode 100644 index 00000000000..f888a426ac2 --- /dev/null +++ b/3rdparty/genie/src/tools/valac.lua @@ -0,0 +1,93 @@ +-- +-- valac.lua +-- Provides valac-specific configuration strings. +-- + + + premake.valac = { } + + +-- +-- Set default tools +-- + + premake.valac.valac = "valac" + premake.valac.cc = "gcc" + + +-- +-- Translation of Premake flags into GCC flags +-- + + local valaflags = + { + DisableAssert = "--disable-assert", -- Disable assertions + DisableSinceCheck = "--disable-since-check", -- Do not check whether used symbols exist in local packages + DisableWarnings = "--disable-warnings", -- Disable warnings + EnableChecking = "--enable-checking", -- Enable additional run-time checks + EnableDeprecated = "--enable-deprecated", -- Enable deprecated features + EnableExperimental = "--enable-experimental", -- Enable experimental features + EnableExperimentalNonNull = "--enable-experimental-non-null", -- Enable experimental enhancements for non-null types + EnableGObjectTracing = "--enable-gobject-tracing", -- Enable GObject creation tracing + EnableMemProfiler = "--enable-mem-profiler", -- Enable GLib memory profiler + EnableThreading = "--thread", -- Enable multithreading support + FatalWarnings = "--fatal-warnings", -- Treat warnings as fatal + HideInternal = "--hide-internal", -- Hide symbols marked as internal + NoStdPkg = "--nostdpkg", -- Do not include standard packages + Optimize = "-X -O2", + OptimizeSize = "-X -Os", + OptimizeSpeed = "-X -O3", + Symbols = "-g", -- Produce debug information + } + + premake.valac.platforms = {} + +-- +-- Returns a list of compiler flags, based on the supplied configuration. +-- + + function premake.valac.getvalaflags(cfg) + return table.translate(cfg.flags, valaflags) + end + + + +-- +-- Decorate pkgs for the Vala command line. +-- + + function premake.valac.getlinks(links) + local result = { } + for _, pkg in ipairs(links) do + table.insert(result, '--pkg ' .. pkg) + end + return result + end + + + +-- +-- Decorate defines for the Vala command line. +-- + + function premake.valac.getdefines(defines) + local result = { } + for _, def in ipairs(defines) do + table.insert(result, '-D ' .. def) + end + return result + end + + + +-- +-- Decorate C flags for the Vala command line. +-- + + function premake.valac.getbuildoptions(buildoptions) + local result = { } + for _, def in ipairs(buildoptions) do + table.insert(result, '-X ' .. def) + end + return result + end diff --git a/makefile b/makefile index ca2b88c8495..1cbd1cdf89d 100644 --- a/makefile +++ b/makefile @@ -162,19 +162,19 @@ GENIEOS := solaris endif ifeq ($(firstword $(filter FreeBSD,$(UNAME))),FreeBSD) OS := freebsd -GENIEOS := bsd +GENIEOS := freebsd endif ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD) OS := freebsd -GENIEOS := bsd +GENIEOS := freebsd endif ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD) OS := netbsd -GENIEOS := bsd +GENIEOS := freebsd endif ifeq ($(firstword $(filter OpenBSD,$(UNAME))),OpenBSD) OS := openbsd -GENIEOS := bsd +GENIEOS := freebsd endif ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin) OS := macosx diff --git a/scripts/src/main.lua b/scripts/src/main.lua index dd6cd80f2e2..d5cce436dce 100644 --- a/scripts/src/main.lua +++ b/scripts/src/main.lua @@ -369,7 +369,7 @@ end configuration { } if _OPTIONS["DEBUG_DIR"]~=nil then - debugabsolutedir(_OPTIONS["DEBUG_DIR"]) + debugdir(_OPTIONS["DEBUG_DIR"]) else debugdir (MAME_DIR) end