Merge pull request #178 from wallyweek/syslibs

Add makefile switch to choose linking against bundled OR system expat…
This commit is contained in:
Vas Crabb 2015-05-12 02:56:18 +10:00
commit da50c694be
5 changed files with 51 additions and 7 deletions

View File

@ -53,6 +53,8 @@
# ARCHOPTS =
# LDOPTS =
# USE_SYSTEM_LIB_EXPAT = 1
# MESA_INSTALL_ROOT = /opt/mesa
# SDL_INSTALL_ROOT = /opt/sdl2
# SDL_FRAMEWORK_PATH = $(HOME)/Library/Frameworks
@ -285,6 +287,13 @@ OSD := sdl
endif
endif
#-------------------------------------------------
# which 3rdparty library to build;
# link against system (common) library otherwise
#-------------------------------------------------
ifndef USE_SYSTEM_LIB_EXPAT
PARAMS += --with-bundled-expat
endif
#-------------------------------------------------
# distribution may change things

View File

@ -88,6 +88,11 @@ newoption {
},
}
newoption {
trigger = 'with-bundled-expat',
description = 'Build bundled Expat library',
}
newoption {
trigger = "distro",
description = "Choose distribution",

View File

@ -5,6 +5,7 @@
-- expat library objects
--------------------------------------------------
if _OPTIONS["with-bundled-expat"] then
project "expat"
uuid "f4cd40b1-c37c-452d-9785-640f26f0bf54"
kind "StaticLib"
@ -23,6 +24,11 @@ project "expat"
"-Wshadow"
}
end
else
links {
"expat",
}
end
--------------------------------------------------
-- zlib library objects
@ -84,8 +90,12 @@ project "softfloat"
MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/expat/lib/",
}
if _OPTIONS["with-bundled-expat"] then
includedirs {
MAME_DIR .. "3rdparty/expat/lib/",
}
end
files {
MAME_DIR .. "3rdparty/softfloat/softfloat.c",

View File

@ -14,12 +14,16 @@ includedirs {
MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/expat/lib",
MAME_DIR .. "3rdparty/lua/src",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. "emu",
GEN_DIR .. "emu/layout",
}
if _OPTIONS["with-bundled-expat"] then
includedirs {
MAME_DIR .. "3rdparty/expat/lib",
}
end
files {
MAME_DIR .. "src/emu/emu.h",
@ -368,13 +372,17 @@ function emuProject(_target, _subtarget)
MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/expat/lib",
MAME_DIR .. "3rdparty/lua/src",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. "emu",
GEN_DIR .. "emu/layout",
MAME_DIR .. "src/emu/cpu/m68000",
}
if _OPTIONS["with-bundled-expat"] then
includedirs {
MAME_DIR .. "3rdparty/expat/lib",
}
end
dofile(path.join("src", "cpu.lua"))
@ -402,7 +410,6 @@ function emuProject(_target, _subtarget)
MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/expat/lib",
MAME_DIR .. "3rdparty/lua/src",
MAME_DIR .. "3rdparty/zlib",
MAME_DIR .. "src/mess", -- some mess bus devices need this
@ -410,6 +417,11 @@ function emuProject(_target, _subtarget)
GEN_DIR .. "emu",
GEN_DIR .. "emu/layout",
}
if _OPTIONS["with-bundled-expat"] then
includedirs {
MAME_DIR .. "3rdparty/expat/lib",
}
end
dofile(path.join("src", "bus.lua"))
@ -428,11 +440,15 @@ function emuProject(_target, _subtarget)
MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/expat/lib",
MAME_DIR .. "3rdparty/lua/src",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. "emu",
}
if _OPTIONS["with-bundled-expat"] then
includedirs {
MAME_DIR .. "3rdparty/expat/lib",
}
end
files {
disasm_files
@ -449,4 +465,4 @@ function emuProject(_target, _subtarget)
disasm_custombuildtask[1]
}
end
end
end

View File

@ -13,9 +13,13 @@ project "utils"
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/expat/lib",
MAME_DIR .. "3rdparty/zlib",
}
if _OPTIONS["with-bundled-expat"] then
includedirs {
MAME_DIR .. "3rdparty/expat/lib",
}
end
files {
MAME_DIR .. "src/lib/util/bitstream.h",