diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2008-11-05 02:04:15 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2008-11-05 02:04:15 +0300 |
commit | beea73b110a7b3ad983a09c7e41b503cee590ebd (patch) | |
tree | d7fcd15db02d97e9c2a665fd8ecc0e99b734bfb9 /extern | |
parent | 2d802627596ba51a2ff7ff56f28c0c14aee559ad (diff) |
* enable openjpeg building for win32/msvc
* add support for building redcode on win32/msvc, but disabled for now, as there are linking problems
- I cleaned the redcode sconscript - the copying of headers within the source tree is not a clean solution
This needs to be fixed later on. For now, lets use redcode from extern/ until a better way is found.
Diffstat (limited to 'extern')
-rw-r--r-- | extern/libopenjpeg/SConscript | 14 | ||||
-rw-r--r-- | extern/libredcode/SConscript | 14 | ||||
-rw-r--r-- | extern/libredcode/format.c | 5 |
3 files changed, 15 insertions, 18 deletions
diff --git a/extern/libopenjpeg/SConscript b/extern/libopenjpeg/SConscript index f0a93f6e2d9..7100ecb37fd 100644 --- a/extern/libopenjpeg/SConscript +++ b/extern/libopenjpeg/SConscript @@ -7,14 +7,18 @@ Import('env') sources = env.Glob('*.c') incs = '.' -flags = "-Wall -O3 -ffast-math -std=c99" +if env['OURPLATFORM'] == 'win32-vc': + flags = [] +else: + flags = ['-Wall', '-O3', '-ffast-math', '-std=c99'] -oj_env = env.Copy(); -oj_env.Replace(CCFLAGS = '') -oj_env.Replace(BF_DEBUG_FLAGS = '') +oj_env = env.Clone() +if not env['OURPLATFORM'] == 'win32-vc': + oj_env.Replace(CCFLAGS = '') + oj_env.Replace(BF_DEBUG_FLAGS = '') oj_env.BlenderLib ( libname='extern_openjpeg', sources=sources, includes=Split(incs), defines=[], libtype=['core','intern','player'], - priority=[10, 10, 300], compileflags = Split(flags)) + priority=[5, 10, 200], compileflags = flags) diff --git a/extern/libredcode/SConscript b/extern/libredcode/SConscript index 4e83ba5cbb4..b58e6d5fe25 100644 --- a/extern/libredcode/SConscript +++ b/extern/libredcode/SConscript @@ -9,20 +9,8 @@ Import('env') sources = env.Glob('*.c') incs = '. ../libopenjpeg' -root = "extern/libredcode" - -if not os.path.isdir(root + "/include"): - os.mkdir(root + "/include"); -if not os.path.isdir(root + "/include/redcode"): - os.mkdir(root + "/include/redcode"); - -for h in env.Glob('*.h'): - shutil.copyfile(root + "/" + h, - root + "/include/redcode/" + h) - - env.BlenderLib ( libname='extern_redcode', sources=sources, includes=Split(incs), defines=[], libtype=['core','intern','player'], - priority=[5, 5, 200], compileflags = []) + priority=[10, 5, 300], compileflags = []) diff --git a/extern/libredcode/format.c b/extern/libredcode/format.c index 35410e9e269..4677c49b8a5 100644 --- a/extern/libredcode/format.c +++ b/extern/libredcode/format.c @@ -1,4 +1,9 @@ +#ifdef _WIN32 +#include <Winsock2.h> +#else #include <netinet/in.h> +#endif + #include <stdio.h> #include <stdlib.h> #include <string.h> |