diff options
Diffstat (limited to 'platform/windows/detect.py')
-rw-r--r-- | platform/windows/detect.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 4bb6dc4a96..93d29a3606 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -99,12 +99,15 @@ import sys import methods + def is_active(): return True + def get_name(): return "Windows" + def can_build(): if (os.name == "nt"): @@ -148,6 +151,7 @@ def can_build(): return False + def get_opts(): mingw = "" @@ -167,12 +171,12 @@ def get_opts(): if (os.getenv("MINGW64_PREFIX")): mingw64 = os.getenv("MINGW64_PREFIX") - return [ ('mingw_prefix', 'Mingw Prefix', mingw32), ('mingw_prefix_64', 'Mingw Prefix 64 bits', mingw64), ] + def get_flags(): return [ @@ -180,6 +184,7 @@ def get_flags(): ('openssl', 'builtin'), # use builtin openssl ] + def build_res_file(target, source, env): cmdbase = "" @@ -200,6 +205,7 @@ def build_res_file(target, source, env): return 1 return 0 + def configure(env): env.Append(CPPPATH=['#platform/windows']) @@ -210,7 +216,6 @@ def configure(env): env.Append(CPPPATH=['#platform/windows/include']) env.Append(LIBPATH=['#platform/windows/lib']) - if (env["target"] == "release"): env.Append(CCFLAGS=['/O2']) @@ -234,7 +239,6 @@ def configure(env): env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE']) env.Append(LINKFLAGS=['/DEBUG']) - env.Append(CCFLAGS=['/MT', '/Gd', '/GR', '/nologo']) env.Append(CXXFLAGS=['/TP']) env.Append(CPPFLAGS=['/DMSVC', '/GR', ]) @@ -331,8 +335,6 @@ def configure(env): else: nulstr = ">nul" - - # if os.system(mingw_prefix+"gcc --version"+nulstr)!=0: # #not really super consistent but.. # print("Can't find Windows compiler: "+mingw_prefix) @@ -357,8 +359,6 @@ def configure(env): env.Append(CCFLAGS=['-g', '-Wall', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED']) - - env["CC"] = mingw_prefix + "gcc" env['AS'] = mingw_prefix + "as" env['CXX'] = mingw_prefix + "g++" @@ -381,9 +381,6 @@ def configure(env): # env.Append(CPPFLAGS=['-march=i686']) # env.Append(LINKFLAGS=['-march=i686']) - - - #'d3dx9d' env.Append(CPPFLAGS=['-DMINGW_ENABLED']) # env.Append(LINKFLAGS=['-g']) |