Restore DONT_USE_NETWORK

This commit is contained in:
Vas Crabb 2015-04-01 03:44:38 +11:00
parent d7d3818ea6
commit b64e4ecee5
5 changed files with 36 additions and 13 deletions

View file

@ -302,6 +302,10 @@ endif
endif
PARAMS += --USE_QT=$(USE_QT)
ifdef DONT_USE_NETWORK
PARAMS += --DONT_USE_NETWORK='$(DONT_USE_NETWORK)'
endif
ifdef NO_OPENGL
PARAMS += --NO_OPENGL='$(NO_OPENGL)'
endif

View file

@ -189,7 +189,12 @@ newoption {
{ "0", "Disabled" },
{ "1", "Enabled" },
}
}
}
newoption {
trigger = "DONT_USE_NETWORK",
description = "Disable network access",
}
local os_version = str_to_version(_OPTIONS["os_version"])

View file

@ -265,27 +265,33 @@ if not _OPTIONS["MACOSX_USE_LIBSDL"] then
end
BASE_TARGETOS = "unix"
SDLOS_TARGETOS = "unix"
BASE_TARGETOS = "unix"
SDLOS_TARGETOS = "unix"
SYNC_IMPLEMENTATION = "tc"
if _OPTIONS["targetos"]=="openbsd" then
SDL_NETWORK = ""
if _OPTIONS["targetos"]=="linux" then
SDL_NETWORK = "taptun"
elseif _OPTIONS["targetos"]=="openbsd" then
SYNC_IMPLEMENTATION = "ntc"
elseif _OPTIONS["targetos"]=="netbsd" then
SYNC_IMPLEMENTATION = "ntc"
SDL_NETWORK = "pcap"
elseif _OPTIONS["targetos"]=="haiku" then
SYNC_IMPLEMENTATION = "ntc"
elseif _OPTIONS["targetos"]=="emscripten" then
SYNC_IMPLEMENTATION = "mini"
elseif _OPTIONS["targetos"]=="windows" then
BASE_TARGETOS = "win32"
SDLOS_TARGETOS = "win32"
BASE_TARGETOS = "win32"
SDLOS_TARGETOS = "win32"
SYNC_IMPLEMENTATION = "windows"
SDL_NETWORK = "pcap"
elseif _OPTIONS["targetos"]=="macosx" then
SDLOS_TARGETOS = "macosx"
SDLOS_TARGETOS = "macosx"
SYNC_IMPLEMENTATION = "ntc"
SDL_NETWORK = "pcap"
elseif _OPTIONS["targetos"]=="os2" then
BASE_TARGETOS = "os2"
SDLOS_TARGETOS = "os2"
BASE_TARGETOS = "os2"
SDLOS_TARGETOS = "os2"
SYNC_IMPLEMENTATION = "os2"
end

View file

@ -2,6 +2,12 @@ forcedincludes {
MAME_DIR .. "src/osd/sdl/sdlprefix.h"
}
if SDL_NETWORK~="" and not _OPTIONS["DONT_USE_NETWORK"] then
defines {
"SDLMAME_NET_" .. string.upper(SDL_NETWORK),
}
end
if _OPTIONS["NO_OPENGL"]=="1" then
defines {
"USE_OPENGL=0",
@ -119,7 +125,6 @@ if _OPTIONS["targetos"]=="windows" then
"UNICODE",
"_UNICODE",
"USE_QTDEBUG=" .. USE_QT,
"SDLMAME_NET_PCAP",
"main=utf8_main",
}
configuration { "mingw*" }
@ -138,7 +143,6 @@ if _OPTIONS["targetos"]=="windows" then
elseif _OPTIONS["targetos"]=="linux" then
defines {
"USE_QTDEBUG=" .. USE_QT,
"SDLMAME_NET_TAPTUN",
}
buildoptions {
'$(shell pkg-config --cflags QtGui)',
@ -148,7 +152,6 @@ elseif _OPTIONS["targetos"]=="macosx" then
"SDLMAME_MACOSX",
"SDLMAME_DARWIN",
"USE_QTDEBUG=0",
"SDLMAME_NET_PCAP",
}
elseif _OPTIONS["targetos"]=="freebsd" then
buildoptions {

View file

@ -7,7 +7,12 @@ defines {
"USE_OPENGL=1",
"USE_DISPATCH_GL=1",
"DIRECTINPUT_VERSION=0x0800",
"SDLMAME_NET_PCAP",
"main=utf8_main",
"_WIN32_WINNT=0x0501",
}
if not _OPTIONS["DONT_USE_NETWORK"] then
defines {
"SDLMAME_NET_PCAP",
}
end