mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
Restore NO_USE_MIDI and some more OS support from the old SDL makefile
This commit is contained in:
parent
ecbdb7dd1d
commit
9a2c6d95c8
4
makefile
4
makefile
@ -336,6 +336,10 @@ ifdef NO_USE_XINPUT
|
|||||||
PARAMS += --NO_USE_XINPUT='$(NO_USE_XINPUT)'
|
PARAMS += --NO_USE_XINPUT='$(NO_USE_XINPUT)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef NO_USE_MIDI
|
||||||
|
PARAMS += --NO_USE_MIDI='$(NO_USE_MIDI)'
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef SDL_LIBVER
|
ifdef SDL_LIBVER
|
||||||
PARAMS += --SDL_LIBVER='$(SDL_LIBVER)'
|
PARAMS += --SDL_LIBVER='$(SDL_LIBVER)'
|
||||||
endif
|
endif
|
||||||
|
@ -696,7 +696,6 @@ configuration { "nacl*" }
|
|||||||
|
|
||||||
configuration { "linux-*" }
|
configuration { "linux-*" }
|
||||||
links {
|
links {
|
||||||
"asound",
|
|
||||||
"dl",
|
"dl",
|
||||||
"GL",
|
"GL",
|
||||||
}
|
}
|
||||||
@ -714,8 +713,6 @@ configuration { "linux-*" }
|
|||||||
|
|
||||||
configuration { "osx*" }
|
configuration { "osx*" }
|
||||||
links {
|
links {
|
||||||
"CoreAudio.framework",
|
|
||||||
"CoreMIDI.framework",
|
|
||||||
"pthread",
|
"pthread",
|
||||||
}
|
}
|
||||||
flags {
|
flags {
|
||||||
|
@ -59,16 +59,32 @@ function maintargetosdoptions(_target)
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
elseif _OPTIONS["targetos"]=="linux" then
|
elseif _OPTIONS["targetos"]=="linux" then
|
||||||
if (USE_QT == 1) then
|
if USE_QT == 1 then
|
||||||
|
linkoptions {
|
||||||
|
"$(shell pkg-config --libs QtGui)",
|
||||||
|
}
|
||||||
links {
|
links {
|
||||||
"QtGui",
|
"QtGui",
|
||||||
"QtCore",
|
"QtCore",
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
if _OPTIONS["NO_USE_MIDI"]~="1" then
|
||||||
linkoptions {
|
linkoptions {
|
||||||
"$(shell pkg-config --libs QtGui)",
|
string.gsub(os.outputof("pkg-config --libs alsa"), '[\r\n]+', ' '),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
elseif _OPTIONS["targetos"]=="macosx" then
|
||||||
|
if _OPTIONS["NO_USE_MIDI"]~="1" then
|
||||||
|
links {
|
||||||
|
"CoreAudio.framework",
|
||||||
|
"CoreMIDI.framework",
|
||||||
|
}
|
||||||
|
end
|
||||||
|
elseif _OPTIONS["targetos"]=="haiku" then
|
||||||
|
links {
|
||||||
|
"network",
|
||||||
|
"bsd",
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
configuration { "mingw*" or "vs*" }
|
configuration { "mingw*" or "vs*" }
|
||||||
@ -82,7 +98,7 @@ function sdlconfigcmd()
|
|||||||
if not _OPTIONS["SDL_INSTALL_ROOT"] then
|
if not _OPTIONS["SDL_INSTALL_ROOT"] then
|
||||||
return _OPTIONS["SDL_LIBVER"] .. "-config"
|
return _OPTIONS["SDL_LIBVER"] .. "-config"
|
||||||
else
|
else
|
||||||
return _OPTIONS["SDL_INSTALL_ROOT"] .. "/bin/" .. _OPTIONS["SDL_LIBVER"] .. "-config"
|
return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin",_OPTIONS["SDL_LIBVER"]) .. "-config"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -117,6 +133,23 @@ if not _OPTIONS["NO_USE_XINPUT"] then
|
|||||||
_OPTIONS["NO_USE_XINPUT"] = "1"
|
_OPTIONS["NO_USE_XINPUT"] = "1"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
newoption {
|
||||||
|
trigger = "NO_USE_MIDI",
|
||||||
|
description = "Disable MIDI I/O",
|
||||||
|
allowed = {
|
||||||
|
{ "0", "Enable MIDI" },
|
||||||
|
{ "1", "Disable MIDI" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
if not _OPTIONS["NO_USE_MIDI"] then
|
||||||
|
if _OPTIONS["targetos"]=="freebsd" or _OPTIONS["targetos"]=="openbsd" or _OPTIONS["targetos"]=="netbsd" or _OPTIONS["targetos"]=="solaris" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"] == "emscripten" or _OPTIONS["targetos"] == "os2" then
|
||||||
|
_OPTIONS["NO_USE_MIDI"] = "1"
|
||||||
|
else
|
||||||
|
_OPTIONS["NO_USE_MIDI"] = "0"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
newoption {
|
newoption {
|
||||||
trigger = "SDL_LIBVER",
|
trigger = "SDL_LIBVER",
|
||||||
description = "Choose SDL version",
|
description = "Choose SDL version",
|
||||||
@ -244,6 +277,13 @@ if BASE_TARGETOS=="unix" then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
elseif BASE_TARGETOS=="os2" then
|
||||||
|
linkoptions {
|
||||||
|
string.gsub(os.outputof(sdlconfigcmd() .. " --libs"), '[\r\n]+', ' '),
|
||||||
|
}
|
||||||
|
links {
|
||||||
|
"pthread"
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
configuration { "mingw*" }
|
configuration { "mingw*" }
|
||||||
|
@ -28,6 +28,16 @@ else
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if _OPTIONS["NO_USE_MIDI"]=="1" then
|
||||||
|
defines {
|
||||||
|
"NO_USE_MIDI",
|
||||||
|
}
|
||||||
|
elseif _OPTIONS["targetos"]=="linux" then
|
||||||
|
buildoptions {
|
||||||
|
string.gsub(os.outputof("pkg-config --cflags alsa"), '[\r\n]+', ' '),
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
if _OPTIONS["SDL_LIBVER"]=="sdl2" then
|
if _OPTIONS["SDL_LIBVER"]=="sdl2" then
|
||||||
defines {
|
defines {
|
||||||
"SDLMAME_SDL2=1",
|
"SDLMAME_SDL2=1",
|
||||||
@ -108,7 +118,6 @@ elseif _OPTIONS["targetos"]=="linux" then
|
|||||||
"USE_QTDEBUG=" .. USE_QT,
|
"USE_QTDEBUG=" .. USE_QT,
|
||||||
"SDLMAME_NET_TAPTUN",
|
"SDLMAME_NET_TAPTUN",
|
||||||
}
|
}
|
||||||
|
|
||||||
buildoptions {
|
buildoptions {
|
||||||
'$(shell pkg-config --cflags QtGui)',
|
'$(shell pkg-config --cflags QtGui)',
|
||||||
}
|
}
|
||||||
@ -120,8 +129,23 @@ elseif _OPTIONS["targetos"]=="macosx" then
|
|||||||
"USE_QTDEBUG=0",
|
"USE_QTDEBUG=0",
|
||||||
"SDLMAME_NET_PCAP",
|
"SDLMAME_NET_PCAP",
|
||||||
}
|
}
|
||||||
|
elseif _OPTIONS["targetos"]=="freebsd" then
|
||||||
|
defines {
|
||||||
|
"NO_AFFINITY_NP",
|
||||||
|
}
|
||||||
|
buildoptions {
|
||||||
|
-- /usr/local/include is not considered a system include director on FreeBSD. GL.h resides there and throws warnings
|
||||||
|
"-isystem /usr/local/include",
|
||||||
|
}
|
||||||
|
elseif _OPTIONS["targetos"]=="solaris" then
|
||||||
|
defines {
|
||||||
|
"NO_AFFINITY_NP",
|
||||||
|
}
|
||||||
elseif _OPTIONS["targetos"]=="os2" then
|
elseif _OPTIONS["targetos"]=="os2" then
|
||||||
defines {
|
defines {
|
||||||
"SDLMAME_OS2",
|
"SDLMAME_OS2",
|
||||||
}
|
}
|
||||||
|
buildoptions {
|
||||||
|
string.gsub(os.outputof(sdlconfigcmd() .. " --cflags"), '[\r\n]+', ' '),
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user