Extend system library support (nw)

Extend USE_SYSTEM_LIB_* to support providing the library name and include directory.
To link against system specific lib names and header path: (ref #711)

USE_SYSTEM_LIB_LUA=lua5.3:/usr/include/lua5.3
This commit is contained in:
Jeffrey Clark 2016-03-28 12:09:19 -05:00
parent 6cb951b7c4
commit 9d9c8fad6a
12 changed files with 214 additions and 450 deletions

View File

@ -47,11 +47,7 @@
#define luaL_openlib(L,name,reg,nup) luaL_setfuncs(L,reg,nup) #define luaL_openlib(L,name,reg,nup) luaL_setfuncs(L,reg,nup)
#endif #endif
#ifndef USE_SYSTEM_SQLITE
#include "sqlite3/sqlite3.h"
#else
#include <sqlite3.h> #include <sqlite3.h>
#endif
/* compile time features */ /* compile time features */
#if !defined(SQLITE_OMIT_PROGRESS_CALLBACK) #if !defined(SQLITE_OMIT_PROGRESS_CALLBACK)

View File

@ -376,36 +376,36 @@ endif
# which 3rdparty library to build; # which 3rdparty library to build;
# link against system (common) library otherwise # link against system (common) library otherwise
#------------------------------------------------- #-------------------------------------------------
ifndef USE_SYSTEM_LIB_EXPAT ifdef USE_SYSTEM_LIB_EXPAT
PARAMS += --with-bundled-expat PARAMS += --with-system-expat='$(USE_SYSTEM_LIB_EXPAT)'
endif endif
ifndef USE_SYSTEM_LIB_ZLIB ifdef USE_SYSTEM_LIB_ZLIB
PARAMS += --with-bundled-zlib PARAMS += --with-system-zlib='$(USE_SYSTEM_LIB_ZLIB)'
endif endif
ifndef USE_SYSTEM_LIB_JPEG ifdef USE_SYSTEM_LIB_JPEG
PARAMS += --with-bundled-jpeg PARAMS += --with-system-jpeg='$(USE_SYSTEM_LIB_JPEG)'
endif endif
ifndef USE_SYSTEM_LIB_FLAC ifdef USE_SYSTEM_LIB_FLAC
PARAMS += --with-bundled-flac PARAMS += --with-system-flac='$(USE_SYSTEM_LIB_FLAC)'
endif endif
ifndef USE_SYSTEM_LIB_LUA ifdef USE_SYSTEM_LIB_LUA
PARAMS += --with-bundled-lua PARAMS += --with-system-lua='$(USE_SYSTEM_LIB_LUA)'
endif endif
ifndef USE_SYSTEM_LIB_SQLITE3 ifdef USE_SYSTEM_LIB_SQLITE3
PARAMS += --with-bundled-sqlite3 PARAMS += --with-system-sqlite3='$(USE_SYSTEM_LIB_SQLITE3)'
endif endif
ifndef USE_SYSTEM_LIB_PORTMIDI ifdef USE_SYSTEM_LIB_PORTMIDI
PARAMS += --with-bundled-portmidi PARAMS += --with-system-portmidi='$(USE_SYSTEM_LIB_PORTMIDI)'
endif endif
ifndef USE_SYSTEM_LIB_PORTAUDIO ifdef USE_SYSTEM_LIB_PORTAUDIO
PARAMS += --with-bundled-portaudio PARAMS += --with-system-portaudio='$(USE_SYSTEM_LIB_PORTAUDIO)'
endif endif
# reverse logic for this one # reverse logic for this one
@ -414,8 +414,8 @@ ifdef USE_BUNDLED_LIB_SDL2
PARAMS += --with-bundled-sdl2 PARAMS += --with-bundled-sdl2
endif endif
ifndef USE_SYSTEM_LIB_UV ifdef USE_SYSTEM_LIB_UV
PARAMS += --with-bundled-libuv PARAMS += --with-system-uv='$(USE_SYSTEM_LIB_UV)'
endif endif
#------------------------------------------------- #-------------------------------------------------

99
scripts/extlib.lua Normal file
View File

@ -0,0 +1,99 @@
-- license:BSD-3-Clause
-- copyright-holders:MAMEdev Team,Jeffrey Clark
local extlibs = {
--
-- 3rdparty system 3rdparty
-- lib name: lib name, include dir
--
expat = { "expat", "3rdparty/expat/lib" },
zlib = { "z", "3rdparty/zlib" },
jpeg = { "jpeg", "3rdparty/libjpeg" },
flac = { "FLAC", "3rdparty/libflac/include/FLAC" },
sqlite3 = { "sqlite3", "3rdparty/sqlite3" },
portmidi = { "portmidi", "3rdparty/portmidi/pm_common" },
portaudio = { "portaudio", "3rdparty/portaudio/include" },
lua = { "lua", "3rdparty/lua/src" },
uv = { "uv" , "3rdparty/libuv/include" },
}
-- system lib options
newoption {
trigger = 'with-system-expat',
description = 'Use system Expat library',
}
newoption {
trigger = 'with-system-zlib',
description = 'Use system Zlib library',
}
newoption {
trigger = 'with-system-jpeg',
description = 'Use system JPEG library',
}
newoption {
trigger = 'with-system-flac',
description = 'Use system FLAC library',
}
newoption {
trigger = 'with-system-sqlite3',
description = 'Use system SQLite library',
}
newoption {
trigger = 'with-system-portmidi',
description = 'Use system PortMidi library',
}
newoption {
trigger = 'with-system-portaudio',
description = 'Use system PortAudio library',
}
newoption {
trigger = "with-system-lua",
description = "Use system LUA library",
}
newoption {
trigger = 'with-system-uv',
description = 'Use system uv library',
}
-- build helpers
function ext_lib(lib)
local opt = _OPTIONS["with-system-" .. lib]
if (opt~=nil and opt=="1") then
default = extlibs[lib][1]
else
default = lib
end
return ext_best(lib, default, 1)
end
function ext_includedir(lib)
local opt = _OPTIONS["with-system-" .. lib]
if (opt==nil or opt=="0") then
-- using bundled, prepend MAME_DIR
default = MAME_DIR .. extlibs[lib][2]
else
default = "/usr/include/" .. lib
end
return ext_best(lib, default, 2)
end
function ext_best(lib, default, idx)
local opt = _OPTIONS["with-system-" .. lib]
local found = default
if (opt~=nil and opt~="0" and opt~="1") then
-- override default if provided (format <libname:includedir>)
local x = opt:explode(":")
if x[idx]~=nil then
found = x[idx]
end
end
return found
end

View File

@ -119,56 +119,11 @@ newoption {
}, },
} }
newoption {
trigger = 'with-bundled-expat',
description = 'Build bundled Expat library',
}
newoption {
trigger = 'with-bundled-zlib',
description = 'Build bundled Zlib library',
}
newoption {
trigger = 'with-bundled-jpeg',
description = 'Build bundled JPEG library',
}
newoption {
trigger = 'with-bundled-flac',
description = 'Build bundled FLAC library',
}
newoption {
trigger = 'with-bundled-lua',
description = 'Build bundled LUA library',
}
newoption {
trigger = 'with-bundled-sqlite3',
description = 'Build bundled SQLite library',
}
newoption {
trigger = 'with-bundled-portmidi',
description = 'Build bundled PortMidi library',
}
newoption {
trigger = 'with-bundled-portaudio',
description = 'Build bundled PortAudio library',
}
newoption { newoption {
trigger = 'with-bundled-sdl2', trigger = 'with-bundled-sdl2',
description = 'Build bundled SDL2 library', description = 'Build bundled SDL2 library',
} }
newoption {
trigger = 'with-bundled-libuv',
description = 'Build bundled libuv library',
}
newoption { newoption {
trigger = "distro", trigger = "distro",
description = "Choose distribution", description = "Choose distribution",
@ -411,6 +366,8 @@ newoption {
} }
} }
dofile("extlib.lua")
if _OPTIONS["SHLIB"]=="1" then if _OPTIONS["SHLIB"]=="1" then
LIBTYPE = "SharedLib" LIBTYPE = "SharedLib"
else else
@ -666,25 +623,25 @@ else
end end
-- need to ensure FLAC functions are statically linked -- need to ensure FLAC functions are statically linked
if _OPTIONS["with-bundled-flac"] then if not _OPTIONS["with-system-flac"] then
defines { defines {
"FLAC__NO_DLL", "FLAC__NO_DLL",
} }
end end
if not _OPTIONS["with-bundled-jpeg"] then if _OPTIONS["with-system-jpeg"] then
defines { defines {
"USE_SYSTEM_JPEGLIB", "USE_SYSTEM_JPEGLIB",
} }
end end
if not _OPTIONS["with-bundled-portmidi"] then if _OPTIONS["with-system-portmidi"] then
defines { defines {
"USE_SYSTEM_PORTMIDI", "USE_SYSTEM_PORTMIDI",
} }
end end
if not _OPTIONS["with-bundled-sqlite3"] then if _OPTIONS["with-system-sqlite3"] then
defines { defines {
"USE_SYSTEM_SQLITE", "USE_SYSTEM_SQLITE",
} }

View File

@ -13,7 +13,7 @@
-- expat library objects -- expat library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["with-bundled-expat"] then if not _OPTIONS["with-system-expat"] then
project "expat" project "expat"
uuid "f4cd40b1-c37c-452d-9785-640f26f0bf54" uuid "f4cd40b1-c37c-452d-9785-640f26f0bf54"
kind "StaticLib" kind "StaticLib"
@ -45,7 +45,7 @@ end
} }
else else
links { links {
"expat", ext_lib("expat"),
} }
end end
@ -53,7 +53,7 @@ end
-- zlib library objects -- zlib library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["with-bundled-zlib"] then if not _OPTIONS["with-system-zlib"] then
project "zlib" project "zlib"
uuid "3d78bd2a-2bd0-4449-8087-42ddfaef7ec9" uuid "3d78bd2a-2bd0-4449-8087-42ddfaef7ec9"
kind "StaticLib" kind "StaticLib"
@ -110,7 +110,7 @@ end
} }
else else
links { links {
"z", ext_lib("zlib"),
} }
end end
@ -152,7 +152,7 @@ end
-- libJPEG library objects -- libJPEG library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["with-bundled-jpeg"] then if not _OPTIONS["with-system-jpeg"] then
project "jpeg" project "jpeg"
uuid "447c6800-dcfd-4c48-b72a-a8223bb409ca" uuid "447c6800-dcfd-4c48-b72a-a8223bb409ca"
kind "StaticLib" kind "StaticLib"
@ -221,7 +221,7 @@ end
} }
else else
links { links {
"jpeg", ext_lib("jpeg"),
} }
end end
@ -229,7 +229,7 @@ end
-- libflac library objects -- libflac library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["with-bundled-flac"] then if not _OPTIONS["with-system-flac"] then
project "flac" project "flac"
uuid "b6fc19e8-073a-4541-bb7b-d24b548d424a" uuid "b6fc19e8-073a-4541-bb7b-d24b548d424a"
kind "StaticLib" kind "StaticLib"
@ -312,7 +312,7 @@ end
} }
else else
links { links {
"FLAC", ext_lib("flac"),
} }
end end
@ -370,7 +370,7 @@ end
-- LUA library objects -- LUA library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["with-bundled-lua"] then if not _OPTIONS["with-system-lua"] then
project "lua" project "lua"
uuid "d9e2eed1-f1ab-4737-a6ac-863700b1a5a9" uuid "d9e2eed1-f1ab-4737-a6ac-863700b1a5a9"
kind "StaticLib" kind "StaticLib"
@ -460,7 +460,7 @@ end
} }
else else
links { links {
"lua", ext_lib("lua"),
} }
end end
@ -493,16 +493,10 @@ project "lualibs"
includedirs { includedirs {
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
} }
if _OPTIONS["with-bundled-lua"] then includedirs {
includedirs { ext_includedir("lua"),
MAME_DIR .. "3rdparty/lua/src", ext_includedir("zlib"),
} }
end
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
files { files {
MAME_DIR .. "3rdparty/lsqlite3/lsqlite3.c", MAME_DIR .. "3rdparty/lsqlite3/lsqlite3.c",
@ -514,7 +508,7 @@ project "lualibs"
-- SQLite3 library objects -- SQLite3 library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["with-bundled-sqlite3"] then if not _OPTIONS["with-system-sqlite3"] then
project "sqllite3" project "sqllite3"
uuid "5cb3d495-57ed-461c-81e5-80dc0857517d" uuid "5cb3d495-57ed-461c-81e5-80dc0857517d"
kind "StaticLib" kind "StaticLib"
@ -565,7 +559,7 @@ end
} }
else else
links { links {
"sqlite3", ext_lib("sqlite3"),
} }
end end
@ -573,7 +567,7 @@ end
-- portmidi library objects -- portmidi library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["NO_USE_MIDI"]~="1" then if _OPTIONS["NO_USE_MIDI"]~="1" then
if _OPTIONS["with-bundled-portmidi"] then if not _OPTIONS["with-system-portmidi"] then
project "portmidi" project "portmidi"
uuid "587f2da6-3274-4a65-86a2-f13ea315bb98" uuid "587f2da6-3274-4a65-86a2-f13ea315bb98"
kind "StaticLib" kind "StaticLib"
@ -652,7 +646,7 @@ end
end end
else else
links { links {
"portmidi", ext_lib("portmidi"),
} }
end end
end end
@ -808,7 +802,7 @@ end
-- PortAudio library objects -- PortAudio library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["with-bundled-portaudio"] then if not _OPTIONS["with-system-portaudio"] then
project "portaudio" project "portaudio"
uuid "0755c5f5-eccf-47f3-98a9-df67018a94d4" uuid "0755c5f5-eccf-47f3-98a9-df67018a94d4"
kind "StaticLib" kind "StaticLib"
@ -953,7 +947,7 @@ end
else else
links { links {
"portaudio", ext_lib("portaudio"),
} }
end end
@ -961,7 +955,7 @@ end
-- libuv library objects -- libuv library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["USE_LIBUV"]=="1" then if _OPTIONS["USE_LIBUV"]=="1" then
if _OPTIONS["with-bundled-libuv"] then if not _OPTIONS["with-system-uv"] then
project "uv" project "uv"
uuid "cd2afe7f-139d-49c3-9000-fc9119f3cea0" uuid "cd2afe7f-139d-49c3-9000-fc9119f3cea0"
kind "StaticLib" kind "StaticLib"
@ -1173,7 +1167,7 @@ project "http-parser"
else else
links { links {
"libuv", ext_lib("uv"),
} }
end end
-------------------------------------------------- --------------------------------------------------
@ -1671,4 +1665,4 @@ end
MAME_DIR .. "3rdparty/SDL2/include", MAME_DIR .. "3rdparty/SDL2/include",
} }
end end

View File

@ -37,17 +37,9 @@ function devicesProject(_target, _subtarget)
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
GEN_DIR .. "emu", GEN_DIR .. "emu",
GEN_DIR .. "emu/layout", GEN_DIR .. "emu/layout",
ext_includedir("expat"),
ext_includedir("lua"),
} }
if _OPTIONS["with-bundled-expat"] then
includedirs {
MAME_DIR .. "3rdparty/expat/lib",
}
end
if _OPTIONS["with-bundled-lua"] then
includedirs {
MAME_DIR .. "3rdparty/lua/src",
}
end
dofile(path.join("src", "cpu.lua")) dofile(path.join("src", "cpu.lua"))
@ -75,17 +67,9 @@ if #disasm_files > 0 then
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
GEN_DIR .. "emu", GEN_DIR .. "emu",
ext_includedir("expat"),
ext_includedir("lua"),
} }
if _OPTIONS["with-bundled-expat"] then
includedirs {
MAME_DIR .. "3rdparty/expat/lib",
}
end
if _OPTIONS["with-bundled-lua"] then
includedirs {
MAME_DIR .. "3rdparty/lua/src",
}
end
files { files {
disasm_files disasm_files

View File

@ -30,16 +30,11 @@ includedirs {
GEN_DIR .. "emu", GEN_DIR .. "emu",
GEN_DIR .. "emu/layout", GEN_DIR .. "emu/layout",
} }
if _OPTIONS["with-bundled-expat"] then
includedirs { includedirs {
MAME_DIR .. "3rdparty/expat/lib", ext_includedir("expat"),
} ext_includedir("lua"),
end }
if _OPTIONS["with-bundled-lua"] then
includedirs {
MAME_DIR .. "3rdparty/lua/src",
}
end
if (_OPTIONS["targetos"] == "windows" and _OPTIONS["osd"] ~= "osdmini") then if (_OPTIONS["targetos"] == "windows" and _OPTIONS["osd"] ~= "osdmini") then
defines { defines {

View File

@ -19,17 +19,9 @@ project "utils"
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
ext_includedir("expat"),
ext_includedir("zlib"),
} }
if _OPTIONS["with-bundled-expat"] then
includedirs {
MAME_DIR .. "3rdparty/expat/lib",
}
end
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
files { files {
MAME_DIR .. "src/lib/util/bitstream.h", MAME_DIR .. "src/lib/util/bitstream.h",
@ -119,14 +111,9 @@ project "formats"
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
ext_includedir("zlib"),
} }
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
files { files {
MAME_DIR .. "src/lib/formats/2d_dsk.cpp", MAME_DIR .. "src/lib/formats/2d_dsk.cpp",
MAME_DIR .. "src/lib/formats/2d_dsk.h", MAME_DIR .. "src/lib/formats/2d_dsk.h",

View File

@ -192,53 +192,29 @@ if #disasm_files > 0 then
end end
links { links {
"utils", "utils",
"expat", ext_lib("expat"),
"softfloat", "softfloat",
"jpeg", ext_lib("jpeg"),
"7z", "7z",
"lua", ext_lib("lua"),
"lualibs", "lualibs",
} }
if _OPTIONS["USE_LIBUV"]=="1" then if _OPTIONS["USE_LIBUV"]=="1" then
links { links {
"uv", ext_lib("uv"),
"http-parser", "http-parser",
} }
end end
if _OPTIONS["with-bundled-zlib"] then links {
links { ext_lib("zlib"),
"zlib", ext_lib("flac"),
} ext_lib("sqlite3"),
else }
links {
"z",
}
end
if _OPTIONS["with-bundled-flac"] then
links {
"flac",
}
else
links {
"FLAC",
}
end
if _OPTIONS["with-bundled-sqlite3"] then
links {
"sqllite3",
}
else
links {
"sqlite3",
}
end
if _OPTIONS["NO_USE_MIDI"]~="1" then if _OPTIONS["NO_USE_MIDI"]~="1" then
links { links {
"portmidi", ext_lib("portmidi"),
} }
end end
links { links {
@ -260,14 +236,9 @@ end
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
GEN_DIR .. _target .. "/layout", GEN_DIR .. _target .. "/layout",
GEN_DIR .. "resource", GEN_DIR .. "resource",
ext_includedir("zlib"),
} }
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
if _OPTIONS["targetos"]=="macosx" and (not override_resources) then if _OPTIONS["targetos"]=="macosx" and (not override_resources) then
linkoptions { linkoptions {
"-sectcreate __TEXT __info_plist " .. _MAKE.esc(GEN_DIR) .. "resource/" .. _subtarget .. "-Info.plist" "-sectcreate __TEXT __info_plist " .. _MAKE.esc(GEN_DIR) .. "resource/" .. _subtarget .. "-Info.plist"

View File

@ -19,13 +19,8 @@ project "netlist"
MAME_DIR .. "src/lib/netlist", MAME_DIR .. "src/lib/netlist",
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
-- ext_includedir("expat"),
} }
-- if _OPTIONS["with-bundled-expat"] then
-- includedirs {
-- MAME_DIR .. "3rdparty/expat/lib",
-- }
--end
files { files {
MAME_DIR .. "src/lib/netlist/nl_config.h", MAME_DIR .. "src/lib/netlist/nl_config.h",

View File

@ -62,8 +62,8 @@ project("mametests")
links { links {
"gtest", "gtest",
"utils", "utils",
"expat", ext_lib("expat"),
"zlib", ext_lib("zlib"),
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
@ -72,6 +72,8 @@ project("mametests")
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/emu", MAME_DIR .. "src/emu",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
ext_includedir("expat"),
ext_includedir("zlib"),
} }
files { files {

View File

@ -27,21 +27,12 @@ end
links { links {
"utils", "utils",
"expat", ext_lib("expat"),
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
@ -77,31 +68,13 @@ end
links { links {
"utils", "utils",
"expat", ext_lib("expat"),
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
ext_lib("flac"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
if _OPTIONS["with-bundled-flac"] then
links {
"flac",
}
else
links {
"FLAC",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
@ -139,20 +112,11 @@ end
links { links {
"utils", "utils",
"expat", ext_lib("expat"),
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
@ -189,31 +153,13 @@ end
links { links {
"dasm", "dasm",
"utils", "utils",
"expat", ext_lib("expat"),
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
ext_lib("flac"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
if _OPTIONS["with-bundled-flac"] then
links {
"flac",
}
else
links {
"FLAC",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/emu", MAME_DIR .. "src/emu",
@ -251,31 +197,13 @@ end
links { links {
"utils", "utils",
"expat", ext_lib("expat"),
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
ext_lib("flac"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
if _OPTIONS["with-bundled-flac"] then
links {
"flac",
}
else
links {
"FLAC",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
@ -312,31 +240,13 @@ end
links { links {
"utils", "utils",
"expat", ext_lib("expat"),
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
ext_lib("flac"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
if _OPTIONS["with-bundled-flac"] then
links {
"flac",
}
else
links {
"FLAC",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
@ -373,20 +283,11 @@ end
links { links {
"utils", "utils",
"expat", ext_lib("expat"),
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
@ -422,20 +323,11 @@ end
links { links {
"utils", "utils",
"expat", ext_lib("expat"),
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
@ -471,20 +363,11 @@ end
links { links {
"utils", "utils",
"expat", ext_lib("expat"),
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
@ -520,31 +403,13 @@ end
links { links {
"utils", "utils",
"expat", ext_lib("expat"),
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
ext_lib("flac"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
if _OPTIONS["with-bundled-flac"] then
links {
"flac",
}
else
links {
"FLAC",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
@ -580,20 +445,11 @@ end
links { links {
"utils", "utils",
"expat", ext_lib("expat"),
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
@ -629,32 +485,14 @@ end
links { links {
"utils", "utils",
"expat", ext_lib("expat"),
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
"netlist", "netlist",
ext_lib("zlib"),
ext_lib("flac"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
if _OPTIONS["with-bundled-flac"] then
links {
"flac",
}
else
links {
"FLAC",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
@ -732,31 +570,13 @@ end
links { links {
"formats", "formats",
"utils", "utils",
"expat", ext_lib("expat"),
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
ext_lib("flac"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
if _OPTIONS["with-bundled-flac"] then
links {
"flac",
}
else
links {
"FLAC",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
@ -795,31 +615,13 @@ links {
"formats", "formats",
"emu", "emu",
"utils", "utils",
"expat", ext_lib("expat"),
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
ext_lib("flac"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
if _OPTIONS["with-bundled-flac"] then
links {
"flac",
}
else
links {
"FLAC",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
@ -858,36 +660,18 @@ links {
"formats", "formats",
"emu", "emu",
"utils", "utils",
"expat", ext_lib("expat"),
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
ext_lib("zlib"),
ext_lib("flac"),
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
else
links {
"z",
}
end
if _OPTIONS["with-bundled-flac"] then
links {
"flac",
}
else
links {
"FLAC",
}
end
includedirs { includedirs {
MAME_DIR .. "src/osd", MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty/zlib", ext_includedir("zlib"),
MAME_DIR .. "src/tools/imgtool", MAME_DIR .. "src/tools/imgtool",
} }