diff options
Diffstat (limited to '3rdParty/LibMiniUPnPc')
-rw-r--r-- | 3rdParty/LibMiniUPnPc/SConscript | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/3rdParty/LibMiniUPnPc/SConscript b/3rdParty/LibMiniUPnPc/SConscript index 05eed8f..3c2e29d 100644 --- a/3rdParty/LibMiniUPnPc/SConscript +++ b/3rdParty/LibMiniUPnPc/SConscript @@ -8,51 +8,51 @@ if env.get("LIBMINIUPNPC_BUNDLED", False) : # Module flags ################################################################################ - if env["SCONS_STAGE"] == "flags" : - env["HAVE_LIBMINIUPNPC"] = True - env["LIBMINIUPNPC_FLAGS"] = { - "LIBPATH": [Dir(".")], - "INTERNAL_CPPDEFINES": ["STATICLIB"], - } - if os.path.basename(env["CC"]) in ("clang", "gcc") : - env["LIBMINIUPNPC_FLAGS"].update({"CPPFLAGS": ["-isystem" "3rdParty/LibMiniUPnPc/src/miniupnpc"]}) - else : - env["LIBMINIUPNPC_FLAGS"].update({"CPPPATH": [Dir("src/miniupnpc")]}) - - #if env["PLATFORM"] == "win32" : - # env["LIBIDN_FLAGS"]["CPPPATH"] += [Dir("stubs/win32")] - # if env["MSVC_VERSION"][:3] == "9.0" : - # env["LIBIDN_FLAGS"]["CPPPATH"] += [Dir("stubs/win32/VC2008")] + if env["SCONS_STAGE"] == "flags" : + env["HAVE_LIBMINIUPNPC"] = True + env["LIBMINIUPNPC_FLAGS"] = { + "LIBPATH": [Dir(".")], + "INTERNAL_CPPDEFINES": ["STATICLIB"], + } + if os.path.basename(env["CC"]) in ("clang", "gcc") : + env["LIBMINIUPNPC_FLAGS"].update({"CPPFLAGS": ["-isystem" "3rdParty/LibMiniUPnPc/src/miniupnpc"]}) + else : + env["LIBMINIUPNPC_FLAGS"].update({"CPPPATH": [Dir("src/miniupnpc")]}) + + #if env["PLATFORM"] == "win32" : + # env["LIBIDN_FLAGS"]["CPPPATH"] += [Dir("stubs/win32")] + # if env["MSVC_VERSION"][:3] == "9.0" : + # env["LIBIDN_FLAGS"]["CPPPATH"] += [Dir("stubs/win32/VC2008")] ################################################################################ # Build ################################################################################ - if env["SCONS_STAGE"] == "build" : - myenv = env.Clone() - myenv.Append(CPPPATH = ["src"]) - # Remove warn flags - myenv.Replace(CCFLAGS = [flag for flag in env["CCFLAGS"] if flag not in ["-W", "-Wall"]]) + if env["SCONS_STAGE"] == "build" : + myenv = env.Clone() + myenv.Append(CPPPATH = ["src"]) + # Remove warn flags + myenv.Replace(CCFLAGS = [flag for flag in env["CCFLAGS"] if flag not in ["-W", "-Wall"]]) - myenv.Append(CCFLAGS = ["-DNDEBUG", "-DSTATICLIB"]) + myenv.Append(CCFLAGS = ["-DNDEBUG", "-DSTATICLIB"]) - if myenv["PLATFORM"] != "win32": - myenv.Append(CCFLAGS = ["-DMINIUPNPC_SET_SOCKET_TIMEOUT"]) - myenv.Append(CCFLAGS = ["-D_BSD_SOURCE"]) + if myenv["PLATFORM"] != "win32": + myenv.Append(CCFLAGS = ["-DMINIUPNPC_SET_SOCKET_TIMEOUT"]) + myenv.Append(CCFLAGS = ["-D_BSD_SOURCE"]) - if myenv["PLATFORM"] == "darwin": - myenv.Append(CCFLAGS = ["-DMACOSX", "-D_DARWIN_C_SOURCE"]) + if myenv["PLATFORM"] == "darwin": + myenv.Append(CCFLAGS = ["-DMACOSX", "-D_DARWIN_C_SOURCE"]) - if myenv["PLATFORM"] == "win32": - myenv.Append(CCFLAGS = ["-DWIN32", "-D_WIN32_WINNT=0x0501"]) + if myenv["PLATFORM"] == "win32": + myenv.Append(CCFLAGS = ["-DWIN32", "-D_WIN32_WINNT=0x0501"]) - if myenv["PLATFORM"] != "win32" and myenv["PLATFORM"] != "darwin": - conf = Configure(conf_env) - if conf.CheckTypeSize("struct ip_mreqn", includes="#include <netinet/in.h>") == 0: - myenv.Append(CCFLAGS = ["-DNEED_STRUCT_IP_MREQN"]) - conf.Finish() + if myenv["PLATFORM"] != "win32" and myenv["PLATFORM"] != "darwin": + conf = Configure(conf_env) + if conf.CheckTypeSize("struct ip_mreqn", includes="#include <netinet/in.h>") == 0: + myenv.Append(CCFLAGS = ["-DNEED_STRUCT_IP_MREQN"]) + conf.Finish() - myenv.WriteVal("src/miniupnpc/miniupnpcstrings.h", myenv.Value( + myenv.WriteVal("src/miniupnpc/miniupnpcstrings.h", myenv.Value( """ #ifndef __MINIUPNPCSTRINGS_H__ #define __MINIUPNPCSTRINGS_H__ @@ -63,22 +63,22 @@ if env.get("LIBMINIUPNPC_BUNDLED", False) : #endif """.replace("$OS_STRING", myenv["PLATFORM"]))) - miniupnpc_objects = [ - "src/miniupnpc/igd_desc_parse.c", - "src/miniupnpc/miniupnpc.c", - "src/miniupnpc/minixml.c", - "src/miniupnpc/minisoap.c", - "src/miniupnpc/miniwget.c", - #"src/miniupnpc/upnpc.c", - "src/miniupnpc/upnpcommands.c", - "src/miniupnpc/upnpreplyparse.c", - "src/miniupnpc/upnperrors.c", - "src/miniupnpc/connecthostport.c", - "src/miniupnpc/portlistingparse.c", - "src/miniupnpc/receivedata.c" - ] - - if myenv["PLATFORM"] != "win32": - miniupnpc_objects.append("src/miniupnpc/minissdpc.c") - - env["LIBMINIUPNPC_OBJECTS"] = myenv.SwiftenObject(miniupnpc_objects) + miniupnpc_objects = [ + "src/miniupnpc/igd_desc_parse.c", + "src/miniupnpc/miniupnpc.c", + "src/miniupnpc/minixml.c", + "src/miniupnpc/minisoap.c", + "src/miniupnpc/miniwget.c", + #"src/miniupnpc/upnpc.c", + "src/miniupnpc/upnpcommands.c", + "src/miniupnpc/upnpreplyparse.c", + "src/miniupnpc/upnperrors.c", + "src/miniupnpc/connecthostport.c", + "src/miniupnpc/portlistingparse.c", + "src/miniupnpc/receivedata.c" + ] + + if myenv["PLATFORM"] != "win32": + miniupnpc_objects.append("src/miniupnpc/minissdpc.c") + + env["LIBMINIUPNPC_OBJECTS"] = myenv.SwiftenObject(miniupnpc_objects) |