Added the ability to use system flac, jpeg, lua, sqlite3, portmidi and zlib based on wallyweek's work

This commit is contained in:
Julian Sikorski 2015-06-06 23:39:24 +02:00
parent 13506b6b54
commit 9027ce9575
15 changed files with 504 additions and 54 deletions

View File

@ -47,7 +47,11 @@
#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" #include "sqlite3/sqlite3.h"
#else
#include <sqlite3.h>
#endif
/* compile time features */ /* compile time features */
#if !defined(SQLITE_OMIT_PROGRESS_CALLBACK) #if !defined(SQLITE_OMIT_PROGRESS_CALLBACK)

View File

@ -53,6 +53,12 @@
# LDOPTS = # LDOPTS =
# USE_SYSTEM_LIB_EXPAT = 1 # USE_SYSTEM_LIB_EXPAT = 1
# USE_SYSTEM_LIB_ZLIB = 1
# USE_SYSTEM_LIB_JPEG = 1
# USE_SYSTEM_LIB_FLAC = 1
# USE_SYSTEM_LIB_LUA = 1
# USE_SYSTEM_LIB_SQLITE3 = 1
# USE_SYSTEM_LIB_PORTMIDI = 1
# MESA_INSTALL_ROOT = /opt/mesa # MESA_INSTALL_ROOT = /opt/mesa
# SDL_INSTALL_ROOT = /opt/sdl2 # SDL_INSTALL_ROOT = /opt/sdl2
@ -294,6 +300,30 @@ ifndef USE_SYSTEM_LIB_EXPAT
PARAMS += --with-bundled-expat PARAMS += --with-bundled-expat
endif endif
ifndef USE_SYSTEM_LIB_ZLIB
PARAMS += --with-bundled-zlib
endif
ifndef USE_SYSTEM_LIB_JPEG
PARAMS += --with-bundled-jpeg
endif
ifndef USE_SYSTEM_LIB_FLAC
PARAMS += --with-bundled-flac
endif
ifndef USE_SYSTEM_LIB_LUA
PARAMS += --with-bundled-lua
endif
ifndef USE_SYSTEM_LIB_SQLITE3
PARAMS += --with-bundled-sqlite3
endif
ifndef USE_SYSTEM_LIB_PORTMIDI
PARAMS += --with-bundled-portmidi
endif
#------------------------------------------------- #-------------------------------------------------
# distribution may change things # distribution may change things
#------------------------------------------------- #-------------------------------------------------
@ -1048,8 +1078,12 @@ CPPCHECK_PARAMS += -Isrc/osd/modules/render
CPPCHECK_PARAMS += -Isrc/osd/windows CPPCHECK_PARAMS += -Isrc/osd/windows
CPPCHECK_PARAMS += -Isrc/emu/cpu/m68000 CPPCHECK_PARAMS += -Isrc/emu/cpu/m68000
CPPCHECK_PARAMS += -I3rdparty CPPCHECK_PARAMS += -I3rdparty
ifndef USE_SYSTEM_LIB_LUA
CPPCHECK_PARAMS += -I3rdparty/lua/src CPPCHECK_PARAMS += -I3rdparty/lua/src
endif
ifndef USE_SYSTEM_LIB_ZLIB
CPPCHECK_PARAMS += -I3rdparty/zlib CPPCHECK_PARAMS += -I3rdparty/zlib
endif
CPPCHECK_PARAMS += -I3rdparty/bgfx/include CPPCHECK_PARAMS += -I3rdparty/bgfx/include
CPPCHECK_PARAMS += -I3rdparty/bx/include CPPCHECK_PARAMS += -I3rdparty/bx/include
CPPCHECK_PARAMS += -Ibuild/generated/emu CPPCHECK_PARAMS += -Ibuild/generated/emu
@ -1062,7 +1096,9 @@ CPPCHECK_PARAMS += -DMAME_DEBUG
CPPCHECK_PARAMS += -DMAME_PROFILER CPPCHECK_PARAMS += -DMAME_PROFILER
CPPCHECK_PARAMS += -DCRLF=3 CPPCHECK_PARAMS += -DCRLF=3
CPPCHECK_PARAMS += -DLSB_FIRST CPPCHECK_PARAMS += -DLSB_FIRST
ifndef USE_SYSTEM_LIB_FLAC
CPPCHECK_PARAMS += -DFLAC__NO_DLL CPPCHECK_PARAMS += -DFLAC__NO_DLL
endif
CPPCHECK_PARAMS += -DNATIVE_DRC=drcbe_x64 CPPCHECK_PARAMS += -DNATIVE_DRC=drcbe_x64
CPPCHECK_PARAMS += -DLUA_COMPAT_APIINTCASTS CPPCHECK_PARAMS += -DLUA_COMPAT_APIINTCASTS
CPPCHECK_PARAMS += -DWIN32 CPPCHECK_PARAMS += -DWIN32

View File

@ -98,6 +98,36 @@ newoption {
description = 'Build bundled Expat library', 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 { newoption {
trigger = "distro", trigger = "distro",
description = "Choose distribution", description = "Choose distribution",
@ -596,9 +626,29 @@ else
end end
-- need to ensure FLAC functions are statically linked -- need to ensure FLAC functions are statically linked
defines { if _OPTIONS["with-bundled-flac"] then
"FLAC__NO_DLL", defines {
} "FLAC__NO_DLL",
}
end
if not _OPTIONS["with-bundled-jpeg"] then
defines {
"USE_SYSTEM_JPEGLIB",
}
end
if not _OPTIONS["with-bundled-portmidi"] then
defines {
"USE_SYSTEM_PORTMIDI",
}
end
if not _OPTIONS["with-bundled-sqlite3"] then
defines {
"USE_SYSTEM_SQLITE",
}
end
if _OPTIONS["NOASM"]=="1" then if _OPTIONS["NOASM"]=="1" then
defines { defines {

View File

@ -34,6 +34,7 @@ end
-- zlib library objects -- zlib library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["with-bundled-zlib"] then
project "zlib" project "zlib"
uuid "3d78bd2a-2bd0-4449-8087-42ddfaef7ec9" uuid "3d78bd2a-2bd0-4449-8087-42ddfaef7ec9"
kind "StaticLib" kind "StaticLib"
@ -71,6 +72,11 @@ project "zlib"
"-Wshadow" "-Wshadow"
} }
end end
else
links {
"z",
}
end
-------------------------------------------------- --------------------------------------------------
-- SoftFloat library objects -- SoftFloat library objects
@ -112,6 +118,7 @@ project "softfloat"
-- libJPEG library objects -- libJPEG library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["with-bundled-jpeg"] then
project "jpeg" project "jpeg"
uuid "447c6800-dcfd-4c48-b72a-a8223bb409ca" uuid "447c6800-dcfd-4c48-b72a-a8223bb409ca"
kind "StaticLib" kind "StaticLib"
@ -169,11 +176,17 @@ project "jpeg"
"-Wshadow" "-Wshadow"
} }
end end
else
links {
"jpeg",
}
end
-------------------------------------------------- --------------------------------------------------
-- libflac library objects -- libflac library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["with-bundled-flac"] then
project "flac" project "flac"
uuid "b6fc19e8-073a-4541-bb7b-d24b548d424a" uuid "b6fc19e8-073a-4541-bb7b-d24b548d424a"
kind "StaticLib" kind "StaticLib"
@ -223,6 +236,11 @@ project "flac"
"-Wshadow" "-Wshadow"
} }
end end
else
links {
"FLAC",
}
end
-------------------------------------------------- --------------------------------------------------
-- lib7z library objects -- lib7z library objects
@ -268,6 +286,7 @@ project "7z"
-- LUA library objects -- LUA library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["with-bundled-lua"] then
project "lua" project "lua"
uuid "d9e2eed1-f1ab-4737-a6ac-863700b1a5a9" uuid "d9e2eed1-f1ab-4737-a6ac-863700b1a5a9"
kind "StaticLib" kind "StaticLib"
@ -342,6 +361,11 @@ project "lua"
"-Wshadow" "-Wshadow"
} }
end end
else
links {
"lua",
}
end
-------------------------------------------------- --------------------------------------------------
-- sqlite3 lua library objects -- sqlite3 lua library objects
@ -362,8 +386,12 @@ project "lsqlite3"
includedirs { includedirs {
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/lua/src",
} }
if _OPTIONS["with-bundled-lua"] then
includedirs {
MAME_DIR .. "3rdparty/lua/src",
}
end
files { files {
MAME_DIR .. "3rdparty/lsqlite3/lsqlite3.c", MAME_DIR .. "3rdparty/lsqlite3/lsqlite3.c",
@ -435,6 +463,7 @@ project "jsoncpp"
-- SQLite3 library objects -- SQLite3 library objects
-------------------------------------------------- --------------------------------------------------
if _OPTIONS["with-bundled-sqlite3"] then
project "sqllite3" project "sqllite3"
uuid "5cb3d495-57ed-461c-81e5-80dc0857517d" uuid "5cb3d495-57ed-461c-81e5-80dc0857517d"
kind "StaticLib" kind "StaticLib"
@ -455,11 +484,17 @@ project "sqllite3"
"-Wshadow" "-Wshadow"
} }
end end
else
links {
"sqlite3",
}
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
project "portmidi" project "portmidi"
uuid "587f2da6-3274-4a65-86a2-f13ea315bb98" uuid "587f2da6-3274-4a65-86a2-f13ea315bb98"
kind "StaticLib" kind "StaticLib"
@ -514,6 +549,11 @@ project "portmidi"
"-Wshadow" "-Wshadow"
} }
end end
else
links {
"portmidi",
}
end
end end
-------------------------------------------------- --------------------------------------------------
-- BGFX library objects -- BGFX library objects

View File

@ -15,8 +15,6 @@ includedirs {
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/lua/src",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. "emu", GEN_DIR .. "emu",
GEN_DIR .. "emu/layout", GEN_DIR .. "emu/layout",
} }
@ -25,6 +23,16 @@ if _OPTIONS["with-bundled-expat"] then
MAME_DIR .. "3rdparty/expat/lib", MAME_DIR .. "3rdparty/expat/lib",
} }
end end
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
if _OPTIONS["with-bundled-lua"] then
includedirs {
MAME_DIR .. "3rdparty/lua/src",
}
end
files { files {
MAME_DIR .. "src/emu/emu.h", MAME_DIR .. "src/emu/emu.h",
@ -371,8 +379,6 @@ function emuProject(_target, _subtarget)
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/lua/src",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. "emu", GEN_DIR .. "emu",
GEN_DIR .. "emu/layout", GEN_DIR .. "emu/layout",
MAME_DIR .. "src/emu/cpu/m68000", MAME_DIR .. "src/emu/cpu/m68000",
@ -382,6 +388,16 @@ function emuProject(_target, _subtarget)
MAME_DIR .. "3rdparty/expat/lib", MAME_DIR .. "3rdparty/expat/lib",
} }
end end
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
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"))
@ -410,8 +426,6 @@ function emuProject(_target, _subtarget)
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/lua/src",
MAME_DIR .. "3rdparty/zlib",
MAME_DIR .. "src/mess", -- some mess bus devices need this MAME_DIR .. "src/mess", -- some mess bus devices need this
MAME_DIR .. "src/mame", -- used for nes bus devices MAME_DIR .. "src/mame", -- used for nes bus devices
GEN_DIR .. "emu", GEN_DIR .. "emu",
@ -422,6 +436,16 @@ function emuProject(_target, _subtarget)
MAME_DIR .. "3rdparty/expat/lib", MAME_DIR .. "3rdparty/expat/lib",
} }
end end
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
if _OPTIONS["with-bundled-lua"] then
includedirs {
MAME_DIR .. "3rdparty/lua/src",
}
end
dofile(path.join("src", "bus.lua")) dofile(path.join("src", "bus.lua"))
@ -440,8 +464,6 @@ function emuProject(_target, _subtarget)
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/lua/src",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. "emu", GEN_DIR .. "emu",
} }
if _OPTIONS["with-bundled-expat"] then if _OPTIONS["with-bundled-expat"] then
@ -449,6 +471,16 @@ function emuProject(_target, _subtarget)
MAME_DIR .. "3rdparty/expat/lib", MAME_DIR .. "3rdparty/expat/lib",
} }
end end
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
if _OPTIONS["with-bundled-lua"] then
includedirs {
MAME_DIR .. "3rdparty/lua/src",
}
end
files { files {
disasm_files disasm_files

View File

@ -14,13 +14,17 @@ 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",
MAME_DIR .. "3rdparty/zlib",
} }
if _OPTIONS["with-bundled-expat"] then if _OPTIONS["with-bundled-expat"] then
includedirs { includedirs {
MAME_DIR .. "3rdparty/expat/lib", MAME_DIR .. "3rdparty/expat/lib",
} }
end 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",
@ -110,9 +114,14 @@ 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",
MAME_DIR .. "3rdparty/zlib",
} }
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
files { files {
MAME_DIR .. "src/lib/formats/2d_dsk.c", MAME_DIR .. "src/lib/formats/2d_dsk.c",
MAME_DIR .. "src/lib/formats/2d_dsk.h", MAME_DIR .. "src/lib/formats/2d_dsk.h",

View File

@ -95,16 +95,44 @@ function mainProject(_target, _subtarget)
"expat", "expat",
"softfloat", "softfloat",
"jpeg", "jpeg",
"flac",
"7z", "7z",
"formats", "formats",
"lua", "lua",
"lsqlite3", "lsqlite3",
"sqllite3",
"zlib",
"jsoncpp", "jsoncpp",
"mongoose", "mongoose",
} }
if _OPTIONS["with-bundled-zlib"] then
links {
"zlib",
}
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", "portmidi",
@ -130,11 +158,16 @@ function mainProject(_target, _subtarget)
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. _target .. "/layout", GEN_DIR .. _target .. "/layout",
GEN_DIR .. "resource", GEN_DIR .. "resource",
} }
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 " .. GEN_DIR .. "/resource/" .. _subtarget .. "-Info.plist" "-sectcreate __TEXT __info_plist " .. GEN_DIR .. "/resource/" .. _subtarget .. "-Info.plist"

View File

@ -24,10 +24,19 @@ end
links { links {
"utils", "utils",
"expat", "expat",
"zlib",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",
@ -60,12 +69,30 @@ end
links { links {
"utils", "utils",
"expat", "expat",
"zlib",
"flac",
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",
@ -100,10 +127,19 @@ end
links { links {
"utils", "utils",
"expat", "expat",
"zlib",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",
@ -138,12 +174,30 @@ links {
"emu", "emu",
"utils", "utils",
"expat", "expat",
"zlib",
"flac",
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",
@ -179,12 +233,30 @@ end
links { links {
"utils", "utils",
"expat", "expat",
"zlib",
"flac",
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",
@ -218,12 +290,30 @@ end
links { links {
"utils", "utils",
"expat", "expat",
"zlib",
"flac",
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",
@ -257,10 +347,19 @@ end
links { links {
"utils", "utils",
"expat", "expat",
"zlib",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",
@ -293,10 +392,19 @@ end
links { links {
"utils", "utils",
"expat", "expat",
"zlib",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",
@ -329,10 +437,19 @@ end
links { links {
"utils", "utils",
"expat", "expat",
"zlib",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",
@ -365,12 +482,30 @@ end
links { links {
"utils", "utils",
"expat", "expat",
"zlib",
"flac",
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",
@ -403,10 +538,19 @@ end
links { links {
"utils", "utils",
"expat", "expat",
"zlib",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",
@ -439,13 +583,31 @@ end
links { links {
"utils", "utils",
"expat", "expat",
"zlib",
"flac",
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
"netlist", "netlist",
} }
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",
@ -480,12 +642,30 @@ links {
"formats", "formats",
"utils", "utils",
"expat", "expat",
"zlib",
"flac",
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",
@ -521,12 +701,30 @@ links {
"emu", "emu",
"utils", "utils",
"expat", "expat",
"zlib",
"flac",
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",
@ -562,12 +760,30 @@ links {
"emu", "emu",
"utils", "utils",
"expat", "expat",
"zlib",
"flac",
"7z", "7z",
"ocore_" .. _OPTIONS["osd"], "ocore_" .. _OPTIONS["osd"],
} }
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",

View File

@ -68,9 +68,13 @@ function createProjects_ldplayer_ldplayer(_target, _subtarget)
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. "mame/layout", GEN_DIR .. "mame/layout",
} }
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
files{ files{
MAME_DIR .. "src/emu/drivers/emudummy.c", MAME_DIR .. "src/emu/drivers/emudummy.c",
@ -89,4 +93,4 @@ function linkProjects_ldplayer_ldplayer(_target, _subtarget)
links { links {
"drvldplayer", "drvldplayer",
} }
end end

View File

@ -774,9 +774,14 @@ function createMAMEProjects(_target, _subtarget, _name)
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. "mame/layout", GEN_DIR .. "mame/layout",
} }
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
end end
function createProjects_mame_arcade(_target, _subtarget) function createProjects_mame_arcade(_target, _subtarget)

View File

@ -29,9 +29,13 @@ function createProjects_mame_dummy(_target, _subtarget)
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. "mess/layout", GEN_DIR .. "mess/layout",
} }
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
files{ files{
MAME_DIR .. "src/mess/drivers/coleco.c", MAME_DIR .. "src/mess/drivers/coleco.c",
@ -43,4 +47,4 @@ function linkProjects_mame_dummy(_target, _subtarget)
links { links {
"mame_dummy", "mame_dummy",
} }
end end

View File

@ -874,11 +874,15 @@ function createMESSProjects(_target, _subtarget, _name)
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. "mess/layout", GEN_DIR .. "mess/layout",
GEN_DIR .. "mame/layout", GEN_DIR .. "mame/layout",
MAME_DIR .. "src/emu/cpu/m68000", MAME_DIR .. "src/emu/cpu/m68000",
} }
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
end end
function createProjects_mame_mess(_target, _subtarget) function createProjects_mame_mess(_target, _subtarget)

View File

@ -96,9 +96,14 @@ function createProjects_mame_nl(_target, _subtarget)
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. "mame/layout", GEN_DIR .. "mame/layout",
} }
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
files{ files{
MAME_DIR .. "src/mame/drivers/pong.c", MAME_DIR .. "src/mame/drivers/pong.c",

View File

@ -92,9 +92,13 @@ function createProjects_mame_tiny(_target, _subtarget)
MAME_DIR .. "src/lib", MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. "mame/layout", GEN_DIR .. "mame/layout",
} }
if _OPTIONS["with-bundled-zlib"] then
includedirs {
MAME_DIR .. "3rdparty/zlib",
}
end
files{ files{
MAME_DIR .. "src/mame/machine/ticket.c", MAME_DIR .. "src/mame/machine/ticket.c",

View File

@ -10,7 +10,11 @@
#ifndef NO_USE_MIDI #ifndef NO_USE_MIDI
#ifndef USE_SYSTEM_PORTMIDI
#include "portmidi/pm_common/portmidi.h" #include "portmidi/pm_common/portmidi.h"
#else
#include <portmidi.h>
#endif
#include "osdcore.h" #include "osdcore.h"
#include "corealloc.h" #include "corealloc.h"
#include "modules/osdmodule.h" #include "modules/osdmodule.h"