summaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/msgfmt.py226
-rw-r--r--scripts/genie.lua59
-rw-r--r--scripts/src/3rdparty.lua104
-rw-r--r--scripts/src/emu.lua2
-rw-r--r--scripts/src/machine.lua12
-rw-r--r--scripts/src/main.lua26
-rw-r--r--scripts/src/osd/modules.lua60
-rw-r--r--scripts/src/osd/sdl.lua124
-rw-r--r--scripts/src/osd/sdl_cfg.lua18
-rw-r--r--scripts/src/osd/windows.lua10
-rw-r--r--scripts/src/osd/windows_cfg.lua2
-rw-r--r--scripts/src/tools.lua111
-rw-r--r--scripts/target/mame/mess.lua3
-rw-r--r--scripts/toolchain.lua59
14 files changed, 619 insertions, 197 deletions
diff --git a/scripts/build/msgfmt.py b/scripts/build/msgfmt.py
new file mode 100644
index 00000000000..f28c2fcf6c6
--- /dev/null
+++ b/scripts/build/msgfmt.py
@@ -0,0 +1,226 @@
+#!/usr/bin/env python2
+# -*- coding: iso-8859-1 -*-
+# Written by Martin v. Löwis <loewis@informatik.hu-berlin.de>
+
+"""Generate binary message catalog from textual translation description.
+
+This program converts a textual Uniforum-style message catalog (.po file) into
+a binary GNU catalog (.mo file). This is essentially the same function as the
+GNU msgfmt program, however, it is a simpler implementation.
+
+Usage: msgfmt.py [OPTIONS] filename.po
+
+Options:
+ -o file
+ --output-file=file
+ Specify the output file to write to. If omitted, output will go to a
+ file named filename.mo (based off the input file name).
+
+ -h
+ --help
+ Print this message and exit.
+
+ -V
+ --version
+ Display version information and exit.
+"""
+
+import os
+import sys
+import ast
+import getopt
+import struct
+import array
+
+__version__ = "1.1"
+
+MESSAGES = {}
+
+
+
+def usage(code, msg=''):
+ print >> sys.stderr, __doc__
+ if msg:
+ print >> sys.stderr, msg
+ sys.exit(code)
+
+
+
+def add(id, str, fuzzy):
+ "Add a non-fuzzy translation to the dictionary."
+ global MESSAGES
+ if not fuzzy and str:
+ MESSAGES[id] = str
+
+
+
+def generate():
+ "Return the generated output."
+ global MESSAGES
+ keys = MESSAGES.keys()
+ # the keys are sorted in the .mo file
+ keys.sort()
+ offsets = []
+ ids = strs = ''
+ for id in keys:
+ # For each string, we need size and file offset. Each string is NUL
+ # terminated; the NUL does not count into the size.
+ offsets.append((len(ids), len(id), len(strs), len(MESSAGES[id])))
+ ids += id + '\0'
+ strs += MESSAGES[id] + '\0'
+ output = ''
+ # The header is 7 32-bit unsigned integers. We don't use hash tables, so
+ # the keys start right after the index tables.
+ # translated string.
+ keystart = 7*4+16*len(keys)
+ # and the values start after the keys
+ valuestart = keystart + len(ids)
+ koffsets = []
+ voffsets = []
+ # The string table first has the list of keys, then the list of values.
+ # Each entry has first the size of the string, then the file offset.
+ for o1, l1, o2, l2 in offsets:
+ koffsets += [l1, o1+keystart]
+ voffsets += [l2, o2+valuestart]
+ offsets = koffsets + voffsets
+ output = struct.pack("Iiiiiii",
+ 0x950412deL, # Magic
+ 0, # Version
+ len(keys), # # of entries
+ 7*4, # start of key index
+ 7*4+len(keys)*8, # start of value index
+ 0, 0) # size and offset of hash table
+ output += array.array("i", offsets).tostring()
+ output += ids
+ output += strs
+ return output
+
+
+
+def make(filename, outfile):
+ ID = 1
+ STR = 2
+
+ # Compute .mo name from .po name and arguments
+ if filename.endswith('.po'):
+ infile = filename
+ else:
+ infile = filename + '.po'
+ if outfile is None:
+ outfile = os.path.splitext(infile)[0] + '.mo'
+
+ try:
+ lines = open(infile).readlines()
+ except IOError, msg:
+ print >> sys.stderr, msg
+ sys.exit(1)
+
+ section = None
+ fuzzy = 0
+
+ # Parse the catalog
+ lno = 0
+ for l in lines:
+ lno += 1
+ # If we get a comment line after a msgstr, this is a new entry
+ if l[0] == '#' and section == STR:
+ add(msgid, msgstr, fuzzy)
+ section = None
+ fuzzy = 0
+ # Record a fuzzy mark
+ if l[:2] == '#,' and 'fuzzy' in l:
+ fuzzy = 1
+ # Skip comments
+ if l[0] == '#':
+ continue
+ # Now we are in a msgid section, output previous section
+ if l.startswith('msgid') and not l.startswith('msgid_plural'):
+ if section == STR:
+ add(msgid, msgstr, fuzzy)
+ section = ID
+ l = l[5:]
+ msgid = msgstr = ''
+ is_plural = False
+ # This is a message with plural forms
+ elif l.startswith('msgid_plural'):
+ if section != ID:
+ print >> sys.stderr, 'msgid_plural not preceded by msgid on %s:%d' %\
+ (infile, lno)
+ sys.exit(1)
+ l = l[12:]
+ msgid += '\0' # separator of singular and plural
+ is_plural = True
+ # Now we are in a msgstr section
+ elif l.startswith('msgstr'):
+ section = STR
+ if l.startswith('msgstr['):
+ if not is_plural:
+ print >> sys.stderr, 'plural without msgid_plural on %s:%d' %\
+ (infile, lno)
+ sys.exit(1)
+ l = l.split(']', 1)[1]
+ if msgstr:
+ msgstr += '\0' # Separator of the various plural forms
+ else:
+ if is_plural:
+ print >> sys.stderr, 'indexed msgstr required for plural on %s:%d' %\
+ (infile, lno)
+ sys.exit(1)
+ l = l[6:]
+ # Skip empty lines
+ l = l.strip()
+ if not l:
+ continue
+ l = ast.literal_eval(l)
+ if section == ID:
+ msgid += l
+ elif section == STR:
+ msgstr += l
+ else:
+ print >> sys.stderr, 'Syntax error on %s:%d' % (infile, lno), \
+ 'before:'
+ print >> sys.stderr, l
+ sys.exit(1)
+ # Add last entry
+ if section == STR:
+ add(msgid, msgstr, fuzzy)
+
+ # Compute output
+ output = generate()
+
+ try:
+ open(outfile,"wb").write(output)
+ except IOError,msg:
+ print >> sys.stderr, msg
+
+
+
+def main():
+ try:
+ opts, args = getopt.getopt(sys.argv[1:], 'hVo:',
+ ['help', 'version', 'output-file='])
+ except getopt.error, msg:
+ usage(1, msg)
+
+ outfile = None
+ # parse options
+ for opt, arg in opts:
+ if opt in ('-h', '--help'):
+ usage(0)
+ elif opt in ('-V', '--version'):
+ print >> sys.stderr, "msgfmt.py", __version__
+ sys.exit(0)
+ elif opt in ('-o', '--output-file'):
+ outfile = arg
+ # do it
+ if not args:
+ print >> sys.stderr, 'No input file given'
+ print >> sys.stderr, "Try `msgfmt --help' for more information."
+ return
+
+ for filename in args:
+ make(filename, outfile)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 34705beefa5..02259293cbe 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -54,7 +54,9 @@ function layoutbuildtask(_folder, _name)
end
function precompiledheaders()
- pchheader("emu.h")
+ configuration { "not xcode4" }
+ pchheader("emu.h")
+ configuration { }
end
function addprojectflags()
@@ -198,6 +200,11 @@ newoption {
}
newoption {
+ trigger = "TOOLCHAIN",
+ description = "Toolchain prefix"
+}
+
+newoption {
trigger = "PROFILE",
description = "Enable profiling.",
}
@@ -271,15 +278,6 @@ newoption {
}
newoption {
- trigger = "USE_BGFX",
- description = "Use of BGFX.",
- allowed = {
- { "0", "Disabled" },
- { "1", "Enabled" },
- }
-}
-
-newoption {
trigger = "DEPRECATED",
description = "Generate deprecation warnings during compilation.",
allowed = {
@@ -422,9 +420,8 @@ if _OPTIONS["NOASM"]=="1" and not _OPTIONS["FORCE_DRC_C_BACKEND"] then
_OPTIONS["FORCE_DRC_C_BACKEND"] = "1"
end
-USE_BGFX = 1
-if(_OPTIONS["USE_BGFX"]~=nil) then
- USE_BGFX = tonumber(_OPTIONS["USE_BGFX"])
+if(_OPTIONS["TOOLCHAIN"] == nil) then
+ _OPTIONS['TOOLCHAIN'] = ""
end
GEN_DIR = MAME_BUILD_DIR .. "generated/"
@@ -447,11 +444,17 @@ configurations {
"Release",
}
-platforms {
- "x32",
- "x64",
- "Native", -- for targets where bitness is not specified
-}
+if _ACTION == "xcode4" then
+ platforms {
+ "Universal",
+ }
+else
+ platforms {
+ "x32",
+ "x64",
+ "Native", -- for targets where bitness is not specified
+ }
+end
language "C++"
@@ -671,12 +674,13 @@ end
--DEFS += -DUSE_SYSTEM_JPEGLIB
--endif
- --To support casting in Lua 5.3
defines {
- "LUA_COMPAT_APIINTCASTS",
+ "LUA_COMPAT_ALL",
+ "LUA_COMPAT_5_1",
+ "LUA_COMPAT_5_2",
}
- if _ACTION == "gmake" then
+ if _ACTION == "gmake" or _ACTION == "xcode4" then
--we compile C-only to C99 standard with GNU extensions
@@ -1049,6 +1053,7 @@ configuration { "nacl*" }
configuration { "linux-*" }
links {
"dl",
+ "rt",
}
if _OPTIONS["distro"]=="debian-stable" then
defines
@@ -1062,12 +1067,15 @@ configuration { "linux-*" }
configuration { "steamlink" }
links {
"dl",
- }
+ "EGL",
+ "GLESv2",
+ "SDL2",
+ }
defines {
"EGL_API_FB",
}
-configuration { "osx*" }
+configuration { "osx* or xcode4" }
links {
"pthread",
}
@@ -1298,10 +1306,7 @@ else
startproject (_OPTIONS["subtarget"])
end
mainProject(_OPTIONS["target"],_OPTIONS["subtarget"])
-
-if (_OPTIONS["STRIP_SYMBOLS"]=="1") then
- strip()
-end
+strip()
if _OPTIONS["with-tools"] then
group "tools"
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index 16b86dcbe21..8ef18689e66 100644
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -60,7 +60,7 @@ project "zlib"
local version = str_to_version(_OPTIONS["gcc_version"])
if _OPTIONS["gcc"]~=nil and (string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs")) then
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
if (version >= 30700) then
buildoptions {
"-Wno-shift-negative-value",
@@ -85,7 +85,7 @@ end
"verbose=-1",
}
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
buildoptions_c {
"-Wno-strict-prototypes",
}
@@ -271,7 +271,7 @@ end
"HAVE_CONFIG_H=1",
}
- configuration { "gmake"}
+ configuration { "gmake or xcode4"}
buildoptions_c {
"-Wno-unused-function",
"-O0",
@@ -280,6 +280,11 @@ end
buildoptions {
"-Wno-enum-conversion",
}
+ if _OPTIONS["targetos"]=="macosx" then
+ buildoptions_c {
+ "-Wno-unknown-attributes",
+ }
+ end
end
configuration { }
@@ -379,7 +384,7 @@ project "lua"
-- "ForceCPP",
--}
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
buildoptions_c {
"-Wno-bad-function-cast"
}
@@ -398,6 +403,8 @@ end
configuration { }
defines {
"LUA_COMPAT_ALL",
+ "LUA_COMPAT_5_1",
+ "LUA_COMPAT_5_2",
}
if not (_OPTIONS["targetos"]=="windows") and not (_OPTIONS["targetos"]=="asmjs") then
defines {
@@ -458,20 +465,19 @@ links {
end
--------------------------------------------------
--- sqlite3 lua library objects
+-- small lua library objects
--------------------------------------------------
-project "lsqlite3"
+project "lualibs"
uuid "1d84edab-94cf-48fb-83ee-b75bc697660e"
kind "StaticLib"
- -- options {
- -- "ForceCPP",
- -- }
-
configuration { "vs*" }
buildoptions {
"/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
+ "/wd4055", -- warning C4055: 'type cast': from data pointer 'void *' to function pointer 'xxx'
+ "/wd4152", -- warning C4152: nonstandard extension, function/data pointer conversion in expression
+ "/wd4130", -- warning C4130: '==': logical operation on address of string constant
}
configuration { }
@@ -487,9 +493,69 @@ project "lsqlite3"
MAME_DIR .. "3rdparty/lua/src",
}
end
+ if _OPTIONS["with-bundled-zlib"] then
+ includedirs {
+ MAME_DIR .. "3rdparty/zlib",
+ }
+ end
files {
MAME_DIR .. "3rdparty/lsqlite3/lsqlite3.c",
+ MAME_DIR .. "3rdparty/lua-zlib/lua_zlib.c",
+ MAME_DIR .. "3rdparty/luafilesystem/src/lfs.c",
+ }
+
+--------------------------------------------------
+-- luv lua library objects
+--------------------------------------------------
+
+project "luv"
+ uuid "d98ec5ca-da2a-4a50-88a2-52061ca53871"
+ kind "StaticLib"
+
+ if _OPTIONS["targetos"]=="windows" then
+ defines {
+ "_WIN32_WINNT=0x0600",
+ }
+ end
+ configuration { "vs*" }
+ buildoptions {
+ "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
+ }
+
+ configuration { "gmake or xcode4" }
+ buildoptions_c {
+ "-Wno-unused-function",
+ "-Wno-strict-prototypes",
+ "-Wno-unused-variable",
+ "-Wno-maybe-uninitialized",
+ "-Wno-undef",
+ }
+
+ configuration { "vs2015" }
+ buildoptions {
+ "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used
+ "/wd4703", -- warning C4703: potentially uninitialized local pointer variable 'xxx' used
+ }
+
+ configuration { }
+ defines {
+ "LUA_COMPAT_ALL",
+ }
+
+ includedirs {
+ MAME_DIR .. "3rdparty/lua/src",
+ MAME_DIR .. "3rdparty/libuv/include",
+ }
+ if _OPTIONS["with-bundled-lua"] then
+ includedirs {
+ MAME_DIR .. "3rdparty/luv/deps/lua/src",
+ }
+ end
+
+ files {
+ MAME_DIR .. "3rdparty/luv/src/luv.c",
+ MAME_DIR .. "3rdparty/luv/src/luv.h",
}
--------------------------------------------------
@@ -522,7 +588,7 @@ end
}
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
buildoptions_c {
"-Wno-bad-function-cast",
"-Wno-undef",
@@ -639,7 +705,6 @@ end
-- BGFX library objects
--------------------------------------------------
-if (USE_BGFX == 1) then
project "bgfx"
uuid "d3e7e119-35cf-4f4f-aba0-d3bdcd1b879a"
kind "StaticLib"
@@ -664,10 +729,14 @@ end
MAME_DIR .. "3rdparty/bgfx/include",
MAME_DIR .. "3rdparty/bgfx/3rdparty",
MAME_DIR .. "3rdparty/bx/include",
- MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos",
MAME_DIR .. "3rdparty/bgfx/3rdparty/dxsdk/include",
}
+ configuration { "not steamlink"}
+ includedirs {
+ MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos",
+ }
+
configuration { "vs*" }
includedirs {
MAME_DIR .. "3rdparty/bx/include/compat/msvc",
@@ -677,7 +746,7 @@ end
MAME_DIR .. "3rdparty/bx/include/compat/mingw",
}
- configuration { "osx*" }
+ configuration { "osx* or xcode4" }
includedirs {
MAME_DIR .. "3rdparty/bx/include/compat/osx",
}
@@ -692,7 +761,7 @@ end
MAME_DIR .. "3rdparty/bx/include/compat/freebsd",
}
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
buildoptions {
"-Wno-uninitialized",
"-Wno-unused-function",
@@ -763,7 +832,6 @@ end
MAME_DIR .. "3rdparty/bgfx/src/renderer_mtl.mm",
}
end
-end
--------------------------------------------------
-- PortAudio library objects
@@ -796,7 +864,7 @@ end
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
}
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
buildoptions_c {
"-Wno-strict-prototypes",
"-Wno-bad-function-cast",
@@ -931,7 +999,7 @@ project "uv"
MAME_DIR .. "3rdparty/libuv/src/win",
}
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
buildoptions_c {
"-Wno-strict-prototypes",
"-Wno-bad-function-cast",
diff --git a/scripts/src/emu.lua b/scripts/src/emu.lua
index e0358285114..9413b092af7 100644
--- a/scripts/src/emu.lua
+++ b/scripts/src/emu.lua
@@ -149,6 +149,8 @@ files {
MAME_DIR .. "src/emu/inpttype.h",
MAME_DIR .. "src/emu/luaengine.cpp",
MAME_DIR .. "src/emu/luaengine.h",
+ MAME_DIR .. "src/emu/language.cpp",
+ MAME_DIR .. "src/emu/language.h",
MAME_DIR .. "src/emu/mame.cpp",
MAME_DIR .. "src/emu/mame.h",
MAME_DIR .. "src/emu/machine.cpp",
diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua
index 5a97d22d015..fbc923b3073 100644
--- a/scripts/src/machine.lua
+++ b/scripts/src/machine.lua
@@ -773,6 +773,18 @@ end
---------------------------------------------------
--
+--@src/devices/machine/hp_taco.h,MACHINES["HP_TACO"] = true
+---------------------------------------------------
+
+if (MACHINES["HP_TACO"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/machine/hp_taco.cpp",
+ MAME_DIR .. "src/devices/machine/hp_taco.h",
+ }
+end
+
+---------------------------------------------------
+--
--@src/devices/machine/i2cmem.h,MACHINES["I2CMEM"] = true
---------------------------------------------------
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index 2397a489e00..80ebe436e01 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -87,8 +87,21 @@ end
configuration { "asmjs" }
targetextension ".bc"
if os.getenv("EMSCRIPTEN") then
+ local emccopts = ""
+ emccopts = emccopts .. " -O3"
+ emccopts = emccopts .. " -s USE_SDL=2"
+ emccopts = emccopts .. " --memory-init-file 0"
+ emccopts = emccopts .. " -s ALLOW_MEMORY_GROWTH=0"
+ emccopts = emccopts .. " -s TOTAL_MEMORY=268435456"
+ emccopts = emccopts .. " -s DISABLE_EXCEPTION_CATCHING=2"
+ emccopts = emccopts .. " -s EXCEPTION_CATCHING_WHITELIST='[\"__ZN15running_machine17start_all_devicesEv\"]'"
+ emccopts = emccopts .. " -s EXPORTED_FUNCTIONS=\"['_main', '_malloc', '__Z14js_get_machinev', '__Z9js_get_uiv', '__Z12js_get_soundv', '__ZN10ui_manager12set_show_fpsEb', '__ZNK10ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio']\""
+ emccopts = emccopts .. " --pre-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/modules/sound/js_sound.js"
+ emccopts = emccopts .. " --post-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/sdl/emscripten_post.js"
+ emccopts = emccopts .. " --embed-file " .. _MAKE.esc(MAME_DIR) .. "bgfx@bgfx"
+ emccopts = emccopts .. " --embed-file " .. _MAKE.esc(MAME_DIR) .. "shaders/gles@shaders/gles"
postbuildcommands {
- os.getenv("EMSCRIPTEN") .. "/emcc -O3 -s DISABLE_EXCEPTION_CATCHING=2 -s USE_SDL=2 --memory-init-file 0 -s ALLOW_MEMORY_GROWTH=0 -s TOTAL_MEMORY=268435456 -s EXCEPTION_CATCHING_WHITELIST='[\"__ZN15running_machine17start_all_devicesEv\"]' -s EXPORTED_FUNCTIONS=\"['_main', '_malloc', '__Z14js_get_machinev', '__Z9js_get_uiv', '__Z12js_get_soundv', '__ZN10ui_manager12set_show_fpsEb', '__ZNK10ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio']\" $(TARGET) -o " .. _MAKE.esc(MAME_DIR) .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".js --pre-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/modules/sound/js_sound.js --post-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/sdl/emscripten_post.js",
+ os.getenv("EMSCRIPTEN") .. "/emcc " .. emccopts .. " $(TARGET) -o " .. _MAKE.esc(MAME_DIR) .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".js",
}
end
@@ -128,7 +141,8 @@ end
"jpeg",
"7z",
"lua",
- "lsqlite3",
+ "lualibs",
+ "luv",
"uv",
"http-parser",
}
@@ -168,12 +182,8 @@ end
"portmidi",
}
end
- if (USE_BGFX == 1) then
- links {
- "bgfx"
- }
- end
- links{
+ links {
+ "bgfx",
"ocore_" .. _OPTIONS["osd"],
}
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua
index 87e684a50f6..1dfa4317a48 100644
--- a/scripts/src/osd/modules.lua
+++ b/scripts/src/osd/modules.lua
@@ -89,7 +89,6 @@ function osdmodulesbuild()
MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.h",
MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.h",
MAME_DIR .. "src/osd/modules/opengl/osd_opengl.h",
- MAME_DIR .. "src/osd/modules/opengl/SDL1211_opengl.h",
}
defines {
"USE_OPENGL=1",
@@ -101,18 +100,39 @@ function osdmodulesbuild()
end
end
- if USE_BGFX == 1 then
- files {
- MAME_DIR .. "src/osd/modules/render/drawbgfx.cpp",
- }
- defines {
- "USE_BGFX"
- }
- includedirs {
- MAME_DIR .. "3rdparty/bgfx/include",
- MAME_DIR .. "3rdparty/bx/include",
- }
- end
+ files {
+ MAME_DIR .. "src/osd/modules/render/drawbgfx.cpp",
+ MAME_DIR .. "src/osd/modules/render/binpacker.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/blendreader.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/cullreader.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/depthreader.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/effect.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/effectmanager.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/effectreader.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/chain.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/chainreader.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/chainentry.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/chainentryreader.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/inputpair.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/shadermanager.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/statereader.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/slider.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/sliderreader.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/parameter.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/paramreader.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/target.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/targetmanager.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/texture.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/texturemanager.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/uniform.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/uniformreader.cpp",
+ MAME_DIR .. "src/osd/modules/render/bgfx/writereader.cpp",
+ }
+ includedirs {
+ MAME_DIR .. "3rdparty/bgfx/include",
+ MAME_DIR .. "3rdparty/bx/include",
+ MAME_DIR .. "3rdparty/rapidjson/include",
+ }
if _OPTIONS["NO_USE_MIDI"]=="1" then
defines {
@@ -356,14 +376,6 @@ newoption {
},
}
-if not _OPTIONS["NO_OPENGL"] then
- if _OPTIONS["targetos"]=="os2" then
- _OPTIONS["NO_OPENGL"] = "1"
- else
- _OPTIONS["NO_OPENGL"] = "0"
- end
-end
-
newoption {
trigger = "USE_DISPATCH_GL",
description = "Use GL-dispatching",
@@ -374,11 +386,7 @@ newoption {
}
if not _OPTIONS["USE_DISPATCH_GL"] then
- if USE_BGFX == 1 then
- _OPTIONS["USE_DISPATCH_GL"] = "0"
- else
- _OPTIONS["USE_DISPATCH_GL"] = "1"
- end
+ _OPTIONS["USE_DISPATCH_GL"] = "0"
end
newoption {
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index 6acb5a2d262..cb5bd6debdc 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -39,29 +39,23 @@ function maintargetosdoptions(_target,_subtarget)
end
if BASE_TARGETOS=="unix" and _OPTIONS["targetos"]~="macosx" then
- if _OPTIONS["SDL_LIBVER"]=="sdl2" then
- links {
- "SDL2_ttf",
- }
- else
- links {
- "SDL_ttf",
- }
- end
+ links {
+ "SDL2_ttf",
+ }
local str = backtick("pkg-config --libs fontconfig")
addlibfromstring(str)
addoptionsfromstring(str)
end
if _OPTIONS["targetos"]=="windows" then
- if _OPTIONS["SDL_LIBVER"]=="sdl2" then
+ if _OPTIONS["USE_LIBSDL"]~="1" then
links {
"SDL2.dll",
}
else
- links {
- "SDL.dll",
- }
+ local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
end
links {
"psapi",
@@ -93,16 +87,21 @@ function maintargetosdoptions(_target,_subtarget)
configuration { "mingw*" or "vs*" }
targetprefix "sdl"
+ links {
+ "psapi"
+ }
configuration { }
end
function sdlconfigcmd()
- if not _OPTIONS["SDL_INSTALL_ROOT"] then
- return _OPTIONS["SDL_LIBVER"] .. "-config"
+ if _OPTIONS["targetos"]=="asmjs" then
+ return "sdl2-config"
+ elseif not _OPTIONS["SDL_INSTALL_ROOT"] then
+ return _OPTIONS['TOOLCHAIN'] .. "pkg-config sdl2"
else
- return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin",_OPTIONS["SDL_LIBVER"]) .. "-config"
+ return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin","sdl2") .. "-config"
end
end
@@ -148,23 +147,6 @@ if not _OPTIONS["NO_USE_XINPUT"] then
end
newoption {
- trigger = "SDL_LIBVER",
- description = "Choose SDL version",
- allowed = {
- { "sdl", "SDL" },
- { "sdl2", "SDL 2" },
- },
-}
-
-if not _OPTIONS["SDL_LIBVER"] then
- if _OPTIONS["targetos"]=="os2" then
- _OPTIONS["SDL_LIBVER"] = "sdl"
- else
- _OPTIONS["SDL_LIBVER"] = "sdl2"
- end
-end
-
-newoption {
trigger = "SDL2_MULTIAPI",
description = "Use couriersud's multi-keyboard patch for SDL 2.1? (this API was removed prior to the 2.0 release)",
allowed = {
@@ -192,16 +174,16 @@ if not _OPTIONS["SDL_FRAMEWORK_PATH"] then
end
newoption {
- trigger = "MACOSX_USE_LIBSDL",
- description = "Use SDL library on OS (rather than framework)",
+ trigger = "USE_LIBSDL",
+ description = "Use SDL library on OS (rather than framework/dll)",
allowed = {
- { "0", "Use framework" },
+ { "0", "Use framework/dll" },
{ "1", "Use library" },
},
}
-if not _OPTIONS["MACOSX_USE_LIBSDL"] then
- _OPTIONS["MACOSX_USE_LIBSDL"] = "0"
+if not _OPTIONS["USE_LIBSDL"] then
+ _OPTIONS["USE_LIBSDL"] = "0"
end
@@ -235,10 +217,6 @@ elseif _OPTIONS["targetos"]=="os2" then
SYNC_IMPLEMENTATION = "os2"
end
-if _OPTIONS["SDL_LIBVER"]=="sdl" then
- USE_BGFX = 0
-end
-
if BASE_TARGETOS=="unix" then
if _OPTIONS["targetos"]=="macosx" then
local os_version = str_to_version(backtick("sw_vers -productVersion"))
@@ -255,39 +233,27 @@ if BASE_TARGETOS=="unix" then
"-weak_framework Metal",
}
end
- if _OPTIONS["MACOSX_USE_LIBSDL"]~="1" then
+ if _OPTIONS["USE_LIBSDL"]~="1" then
linkoptions {
"-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"],
}
- if _OPTIONS["SDL_LIBVER"]=="sdl2" then
- links {
- "SDL2.framework",
- }
- else
- links {
- "SDL.framework",
- }
- end
+ links {
+ "SDL2.framework",
+ }
else
- local str = backtick(sdlconfigcmd() .. " --libs | sed 's/-lSDLmain//'")
+ local str = backtick(sdlconfigcmd() .. " --libs --static | sed 's/-lSDLmain//'")
addlibfromstring(str)
addoptionsfromstring(str)
end
else
if _OPTIONS["NO_X11"]=="1" then
_OPTIONS["USE_QTDEBUG"] = "0"
- USE_BGFX = 0
else
libdirs {
"/usr/X11/lib",
"/usr/X11R6/lib",
"/usr/openwin/lib",
}
- if _OPTIONS["SDL_LIBVER"]=="sdl" then
- links {
- "X11",
- }
- end
end
local str = backtick(sdlconfigcmd() .. " --libs")
addlibfromstring(str)
@@ -404,13 +370,6 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h",
MAME_DIR .. "src/osd/modules/debugger/osx/debugosx.h",
}
- if _OPTIONS["SDL_LIBVER"]=="sdl" then
- -- SDLMain_tmpl isn't necessary for SDL2
- files {
- MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.mm",
- MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.h",
- }
- end
end
files {
@@ -425,18 +384,17 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/sdl/video.h",
MAME_DIR .. "src/osd/sdl/window.cpp",
MAME_DIR .. "src/osd/sdl/window.h",
+ MAME_DIR .. "src/osd/modules/osdwindow.cpp",
MAME_DIR .. "src/osd/modules/osdwindow.h",
MAME_DIR .. "src/osd/sdl/output.cpp",
MAME_DIR .. "src/osd/sdl/watchdog.cpp",
MAME_DIR .. "src/osd/sdl/watchdog.h",
MAME_DIR .. "src/osd/modules/render/drawsdl.cpp",
}
- if _OPTIONS["SDL_LIBVER"]=="sdl2" then
- files {
- MAME_DIR .. "src/osd/modules/render/draw13.cpp",
- MAME_DIR .. "src/osd/modules/render/blit13.h",
- }
- end
+ files {
+ MAME_DIR .. "src/osd/modules/render/draw13.cpp",
+ MAME_DIR .. "src/osd/modules/render/blit13.h",
+ }
project ("ocore_" .. _OPTIONS["osd"])
@@ -529,14 +487,14 @@ if _OPTIONS["with-tools"] then
}
if _OPTIONS["targetos"] == "windows" then
- if _OPTIONS["SDL_LIBVER"] == "sdl2" then
+ if _OPTIONS["USE_LIBSDL"]~="1" then
links {
"SDL2.dll",
}
else
- links {
- "SDL.dll",
- }
+ local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
end
links {
"psapi",
@@ -547,12 +505,14 @@ if _OPTIONS["with-tools"] then
files {
MAME_DIR .. "src/osd/sdl/main.cpp",
}
- elseif _OPTIONS["targetos"] == "macosx" and _OPTIONS["SDL_LIBVER"] == "sdl" then
- -- SDLMain_tmpl isn't necessary for SDL2
- files {
- MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.mm",
- }
end
+
+ configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+ configuration { }
+
+ strip()
end
@@ -594,4 +554,6 @@ if _OPTIONS["targetos"] == "macosx" and _OPTIONS["with-tools"] then
files {
MAME_DIR .. "src/osd/sdl/aueffectutil.mm",
}
+
+ strip()
end
diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua
index dd902d1fe60..bdeb7274ef1 100644
--- a/scripts/src/osd/sdl_cfg.lua
+++ b/scripts/src/osd/sdl_cfg.lua
@@ -56,18 +56,12 @@ if _OPTIONS["NO_USE_MIDI"]~="1" and _OPTIONS["targetos"]=="linux" then
}
end
-if _OPTIONS["SDL_LIBVER"]=="sdl2" then
- defines {
- "SDLMAME_SDL2=1",
- }
- if _OPTIONS["SDL2_MULTIAPI"]=="1" then
- defines {
- "SDL2_MULTIAPI",
- }
- end
-else
+defines {
+ "SDLMAME_SDL2=1",
+}
+if _OPTIONS["SDL2_MULTIAPI"]=="1" then
defines {
- "SDLMAME_SDL2=0",
+ "SDL2_MULTIAPI",
}
end
@@ -81,7 +75,7 @@ if BASE_TARGETOS=="unix" then
"SDLMAME_UNIX",
}
if _OPTIONS["targetos"]=="macosx" then
- if _OPTIONS["MACOSX_USE_LIBSDL"]~="1" then
+ if _OPTIONS["USE_LIBSDL"]~="1" then
buildoptions {
"-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"],
}
diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua
index fd508e645c5..154d4732bc1 100644
--- a/scripts/src/osd/windows.lua
+++ b/scripts/src/osd/windows.lua
@@ -152,16 +152,17 @@ project ("osd_" .. _OPTIONS["osd"])
}
files {
- MAME_DIR .. "src/osd/modules/render/drawd3d.cpp",
- MAME_DIR .. "src/osd/modules/render/drawd3d.h",
MAME_DIR .. "src/osd/modules/render/d3d/d3d9intf.cpp",
+ MAME_DIR .. "src/osd/modules/render/d3d/d3dintf.h",
MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.cpp",
MAME_DIR .. "src/osd/modules/render/d3d/d3dcomm.h",
MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.h",
- MAME_DIR .. "src/osd/modules/render/d3d/d3dintf.h",
- MAME_DIR .. "src/osd/modules/render/drawdd.cpp",
+ MAME_DIR .. "src/osd/modules/render/drawd3d.cpp",
+ MAME_DIR .. "src/osd/modules/render/drawd3d.h",
MAME_DIR .. "src/osd/modules/render/drawgdi.cpp",
+ MAME_DIR .. "src/osd/modules/render/drawgdi.h",
MAME_DIR .. "src/osd/modules/render/drawnone.cpp",
+ MAME_DIR .. "src/osd/modules/render/drawnone.h",
MAME_DIR .. "src/osd/windows/input.cpp",
MAME_DIR .. "src/osd/windows/input.h",
MAME_DIR .. "src/osd/windows/output.cpp",
@@ -170,6 +171,7 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/windows/video.h",
MAME_DIR .. "src/osd/windows/window.cpp",
MAME_DIR .. "src/osd/windows/window.h",
+ MAME_DIR .. "src/osd/modules/osdwindow.cpp",
MAME_DIR .. "src/osd/modules/osdwindow.h",
MAME_DIR .. "src/osd/windows/winmenu.cpp",
MAME_DIR .. "src/osd/windows/winmain.cpp",
diff --git a/scripts/src/osd/windows_cfg.lua b/scripts/src/osd/windows_cfg.lua
index 19ef05c3ce9..3e656017816 100644
--- a/scripts/src/osd/windows_cfg.lua
+++ b/scripts/src/osd/windows_cfg.lua
@@ -50,7 +50,7 @@ end
if _OPTIONS["USE_SDL"]=="1" then
defines {
- "SDLMAME_SDL2=0",
+ "SDLMAME_SDL2=1",
"USE_XINPUT=0",
"USE_SDL=1",
"USE_SDL_SOUND",
diff --git a/scripts/src/tools.lua b/scripts/src/tools.lua
index 19942651f0c..421f5cc76b5 100644
--- a/scripts/src/tools.lua
+++ b/scripts/src/tools.lua
@@ -50,6 +50,13 @@ files {
MAME_DIR .. "src/tools/romcmp.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- chdman
--------------------------------------------------
@@ -104,6 +111,13 @@ files {
MAME_DIR .. "src/version.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- jedutil
--------------------------------------------------
@@ -145,6 +159,13 @@ files {
MAME_DIR .. "src/tools/jedutil.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- unidasm
--------------------------------------------------
@@ -201,6 +222,12 @@ files {
MAME_DIR .. "src/emu/emucore.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
--------------------------------------------------
-- ldresample
@@ -255,6 +282,13 @@ files {
MAME_DIR .. "src/tools/ldresample.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- ldverify
--------------------------------------------------
@@ -308,6 +342,13 @@ files {
MAME_DIR .. "src/tools/ldverify.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- regrep
--------------------------------------------------
@@ -349,6 +390,13 @@ files {
MAME_DIR .. "src/tools/regrep.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- srcclean
---------------------------------------------------
@@ -390,6 +438,13 @@ files {
MAME_DIR .. "src/tools/srcclean.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- src2html
--------------------------------------------------
@@ -431,6 +486,13 @@ files {
MAME_DIR .. "src/tools/src2html.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- split
--------------------------------------------------
@@ -483,6 +545,13 @@ files {
MAME_DIR .. "src/tools/split.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- pngcmp
--------------------------------------------------
@@ -524,6 +593,13 @@ files {
MAME_DIR .. "src/tools/pngcmp.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- nltool
--------------------------------------------------
@@ -578,6 +654,13 @@ files {
MAME_DIR .. "src/lib/netlist/prg/nltool.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- nlwav
--------------------------------------------------
@@ -610,6 +693,13 @@ files {
MAME_DIR .. "src/lib/netlist/prg/nlwav.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- castool
--------------------------------------------------
@@ -664,6 +754,13 @@ files {
MAME_DIR .. "src/tools/castool.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- floptool
--------------------------------------------------
@@ -719,6 +816,13 @@ files {
MAME_DIR .. "src/tools/floptool.cpp",
}
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
+
--------------------------------------------------
-- imgtool
--------------------------------------------------
@@ -822,3 +926,10 @@ files {
MAME_DIR .. "src/tools/imgtool/modules/bml3.cpp",
MAME_DIR .. "src/tools/imgtool/modules/hp48.cpp",
}
+
+configuration { "mingw*" or "vs*" }
+ targetextension ".exe"
+
+configuration { }
+
+strip()
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index cb9a150224a..281601e4d5f 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -398,6 +398,7 @@ MACHINES["ER2055"] = true
MACHINES["F3853"] = true
MACHINES["HD63450"] = true
MACHINES["HD64610"] = true
+MACHINES["HP_TACO"] = true
MACHINES["I2CMEM"] = true
MACHINES["I80130"] = true
MACHINES["I8089"] = true
@@ -1635,6 +1636,8 @@ files {
MAME_DIR .. "src/mame/machine/esqpanel.h",
MAME_DIR .. "src/mame/machine/esqvfd.cpp",
MAME_DIR .. "src/mame/machine/esqvfd.h",
+ MAME_DIR .. "src/mame/machine/esqlcd.cpp",
+ MAME_DIR .. "src/mame/machine/esqlcd.h",
}
createMESSProjects(_target, _subtarget, "enterprise")
diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua
index 7fad61ce928..137a873ae09 100644
--- a/scripts/toolchain.lua
+++ b/scripts/toolchain.lua
@@ -4,6 +4,11 @@
--
local naclToolchain = ""
+local toolchainPrefix = ""
+
+if _OPTIONS['TOOLCHAIN'] then
+ toolchainPrefix = _OPTIONS["TOOLCHAIN"]
+end
newoption {
trigger = "gcc",
@@ -204,15 +209,18 @@ function toolchain(_buildDir, _subDir)
if not os.getenv("MINGW32") then
print("Set MINGW32 envrionment variable.")
end
- premake.gcc.cc = "$(MINGW32)/bin/i686-w64-mingw32-gcc"
- premake.gcc.cxx = "$(MINGW32)/bin/i686-w64-mingw32-g++"
+ if not toolchainPrefix then
+ toolchainPrefix = "$(MINGW32)/bin/i686-w64-mingw32-"
+ end
+ premake.gcc.cc = toolchainPrefix .. "gcc"
+ premake.gcc.cxx = toolchainPrefix .. "g++"
-- work around GCC 4.9.2 not having proper linker for LTO=1 usage
local version_4_ar = str_to_version(_OPTIONS["gcc_version"])
if (version_4_ar < 50000) then
- premake.gcc.ar = "$(MINGW32)/bin/ar"
+ premake.gcc.ar = toolchainPrefix .. "ar"
end
if (version_4_ar >= 50000) then
- premake.gcc.ar = "$(MINGW32)/bin/gcc-ar"
+ premake.gcc.ar = toolchainPrefix .. "gcc-ar"
end
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw32-gcc")
end
@@ -221,20 +229,22 @@ function toolchain(_buildDir, _subDir)
if not os.getenv("MINGW64") then
print("Set MINGW64 envrionment variable.")
end
- premake.gcc.cc = "$(MINGW64)/bin/x86_64-w64-mingw32-gcc"
- premake.gcc.cxx = "$(MINGW64)/bin/x86_64-w64-mingw32-g++"
+ if not toolchainPrefix then
+ toolchainPrefix = "$(MINGW64)/bin/x86_64-w64-mingw32-"
+ end
+ premake.gcc.cc = toolchainPrefix .. "gcc"
+ premake.gcc.cxx = toolchainPrefix .. "g++"
-- work around GCC 4.9.2 not having proper linker for LTO=1 usage
local version_4_ar = str_to_version(_OPTIONS["gcc_version"])
if (version_4_ar < 50000) then
- premake.gcc.ar = "$(MINGW64)/bin/ar"
+ premake.gcc.ar = toolchainPrefix .. "ar"
end
if (version_4_ar >= 50000) then
- premake.gcc.ar = "$(MINGW64)/bin/gcc-ar"
+ premake.gcc.ar = toolchainPrefix .. "gcc-ar"
end
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw64-gcc")
end
-
if "mingw-clang" == _OPTIONS["gcc"] then
premake.gcc.cc = "clang"
premake.gcc.cxx = "clang++"
@@ -283,18 +293,17 @@ function toolchain(_buildDir, _subDir)
if "osx" == _OPTIONS["gcc"] then
if os.is("linux") then
- local osxToolchain = "x86_64-apple-darwin13-"
- premake.gcc.cc = osxToolchain .. "clang"
- premake.gcc.cxx = osxToolchain .. "clang++"
- premake.gcc.ar = osxToolchain .. "ar"
+ premake.gcc.cc = toolchainPrefix .. "clang"
+ premake.gcc.cxx = toolchainPrefix .. "clang++"
+ premake.gcc.ar = toolchainPrefix .. "ar"
end
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-osx")
end
if "osx-clang" == _OPTIONS["gcc"] then
- premake.gcc.cc = "clang"
- premake.gcc.cxx = "clang++"
- premake.gcc.ar = "ar"
+ premake.gcc.cc = toolchainPrefix .. "clang"
+ premake.gcc.cxx = toolchainPrefix .. "clang++"
+ premake.gcc.ar = toolchainPrefix .. "ar"
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-osx-clang")
end
@@ -496,7 +505,9 @@ function toolchain(_buildDir, _subDir)
configuration { "steamlink" }
objdir ( _buildDir .. "steamlink/obj")
-
+ defines {
+ "__STEAMLINK__=1", -- There is no special prefedined compiler symbol to detect SteamLink, faking it.
+ }
buildoptions {
"-marm",
"-mfloat-abi=hard",
@@ -909,6 +920,15 @@ function toolchain(_buildDir, _subDir)
end
function strip()
+ if _OPTIONS["STRIP_SYMBOLS"]~="1" then
+ return true
+ end
+
+ configuration { "osx-*", "Release" }
+ postbuildcommands {
+ "$(SILENT) echo Stripping symbols.",
+ "$(SILENT) " .. (_OPTIONS['TOOLCHAIN'] and toolchainPrefix) .. "strip \"$(TARGET)\"",
+ }
configuration { "android-arm", "Release" }
postbuildcommands {
@@ -937,13 +957,12 @@ function strip()
configuration { "mingw*", "x64", "Release" }
postbuildcommands {
"$(SILENT) echo Stripping symbols.",
- "$(SILENT) $(MINGW64)/bin/strip -s \"$(TARGET)\"",
+ "$(SILENT) " .. (_OPTIONS['TOOLCHAIN'] and toolchainPrefix or "$(MINGW64)/bin/") .. "strip -s \"$(TARGET)\"",
}
-
configuration { "mingw*", "x32", "Release" }
postbuildcommands {
"$(SILENT) echo Stripping symbols.",
- "$(SILENT) $(MINGW32)/bin/strip -s \"$(TARGET)\""
+ "$(SILENT) " .. (_OPTIONS['TOOLCHAIN'] and toolchainPrefix or "$(MINGW32)/bin/") .. "strip -s \"$(TARGET)\"",
}
configuration { "pnacl" }