mirror of
https://github.com/holub/mame
synced 2025-07-04 01:18:59 +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)'
|
||||
endif
|
||||
|
||||
ifdef NO_USE_MIDI
|
||||
PARAMS += --NO_USE_MIDI='$(NO_USE_MIDI)'
|
||||
endif
|
||||
|
||||
ifdef SDL_LIBVER
|
||||
PARAMS += --SDL_LIBVER='$(SDL_LIBVER)'
|
||||
endif
|
||||
|
@ -696,7 +696,6 @@ configuration { "nacl*" }
|
||||
|
||||
configuration { "linux-*" }
|
||||
links {
|
||||
"asound",
|
||||
"dl",
|
||||
"GL",
|
||||
}
|
||||
@ -714,8 +713,6 @@ configuration { "linux-*" }
|
||||
|
||||
configuration { "osx*" }
|
||||
links {
|
||||
"CoreAudio.framework",
|
||||
"CoreMIDI.framework",
|
||||
"pthread",
|
||||
}
|
||||
flags {
|
||||
|
@ -59,16 +59,32 @@ function maintargetosdoptions(_target)
|
||||
}
|
||||
end
|
||||
elseif _OPTIONS["targetos"]=="linux" then
|
||||
if (USE_QT == 1) then
|
||||
if USE_QT == 1 then
|
||||
linkoptions {
|
||||
"$(shell pkg-config --libs QtGui)",
|
||||
}
|
||||
links {
|
||||
"QtGui",
|
||||
"QtCore",
|
||||
}
|
||||
|
||||
end
|
||||
if _OPTIONS["NO_USE_MIDI"]~="1" then
|
||||
linkoptions {
|
||||
"$(shell pkg-config --libs QtGui)",
|
||||
string.gsub(os.outputof("pkg-config --libs alsa"), '[\r\n]+', ' '),
|
||||
}
|
||||
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
|
||||
|
||||
configuration { "mingw*" or "vs*" }
|
||||
@ -82,7 +98,7 @@ function sdlconfigcmd()
|
||||
if not _OPTIONS["SDL_INSTALL_ROOT"] then
|
||||
return _OPTIONS["SDL_LIBVER"] .. "-config"
|
||||
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
|
||||
|
||||
@ -117,6 +133,23 @@ if not _OPTIONS["NO_USE_XINPUT"] then
|
||||
_OPTIONS["NO_USE_XINPUT"] = "1"
|
||||
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 {
|
||||
trigger = "SDL_LIBVER",
|
||||
description = "Choose SDL version",
|
||||
@ -244,6 +277,13 @@ if BASE_TARGETOS=="unix" then
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif BASE_TARGETOS=="os2" then
|
||||
linkoptions {
|
||||
string.gsub(os.outputof(sdlconfigcmd() .. " --libs"), '[\r\n]+', ' '),
|
||||
}
|
||||
links {
|
||||
"pthread"
|
||||
}
|
||||
end
|
||||
|
||||
configuration { "mingw*" }
|
||||
|
@ -28,6 +28,16 @@ else
|
||||
}
|
||||
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
|
||||
defines {
|
||||
"SDLMAME_SDL2=1",
|
||||
@ -108,7 +118,6 @@ elseif _OPTIONS["targetos"]=="linux" then
|
||||
"USE_QTDEBUG=" .. USE_QT,
|
||||
"SDLMAME_NET_TAPTUN",
|
||||
}
|
||||
|
||||
buildoptions {
|
||||
'$(shell pkg-config --cflags QtGui)',
|
||||
}
|
||||
@ -120,8 +129,23 @@ elseif _OPTIONS["targetos"]=="macosx" then
|
||||
"USE_QTDEBUG=0",
|
||||
"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
|
||||
defines {
|
||||
"SDLMAME_OS2",
|
||||
}
|
||||
buildoptions {
|
||||
string.gsub(os.outputof(sdlconfigcmd() .. " --cflags"), '[\r\n]+', ' '),
|
||||
}
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user