[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14802] branches/soc-2008-mxcurioni: soc-2008-mxcurioni: lib3ds SConscript updated to compile under Win32 configs
Maxime Curioni
maxime.curioni at gmail.com
Sun May 11 23:13:56 CEST 2008
Revision: 14802
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14802
Author: mxcurioni
Date: 2008-05-11 23:13:54 +0200 (Sun, 11 May 2008)
Log Message:
-----------
soc-2008-mxcurioni: lib3ds SConscript updated to compile under Win32 configs
Modified Paths:
--------------
branches/soc-2008-mxcurioni/extern/freestyle/lib3ds/SConscript
branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript
Modified: branches/soc-2008-mxcurioni/extern/freestyle/lib3ds/SConscript
===================================================================
--- branches/soc-2008-mxcurioni/extern/freestyle/lib3ds/SConscript 2008-05-11 20:40:55 UTC (rev 14801)
+++ branches/soc-2008-mxcurioni/extern/freestyle/lib3ds/SConscript 2008-05-11 21:13:54 UTC (rev 14802)
@@ -15,90 +15,13 @@
lib3ds_env.Replace(CCFLAGS = '')
lib3ds_env.Replace(BF_DEBUG_FLAGS = '')
-makevardef = re.compile('^([a-zA-Z0-9_-]+)[ \t]*(\+?)=(.*)')
-makevarsubst = re.compile('\$\(([^\)]+)\)')
-makeifeq = re.compile('if(n?)eq \(([^,]*),([^\)]*)\)')
-
-def makeparseblock(fp, variables):
- pendingline = ''
- while 1:
- line = fp.readline()
- if pendingline:
- line = pendingline + line
- pendingline = ''
- if not line:
- return
- if line.endswith('\\\n'):
- pendingline = line[:-2]
- continue
-
- i = line.find('#')
- if i >= 0:
- line = line[:i]
-
- iter = makevarsubst.finditer(line[:])
- for obj in iter:
- (name) = obj.group(1)
- s = ""
- if name in variables:
- s = variables[name]
- line = line.replace('$(' + name + ')', s)
-
- matchobj = makevardef.match(line)
- if matchobj:
- (name, op, value) = matchobj.group(1, 2, 3)
-
- value = value.rstrip()
-
- if op == '+' and name in variables:
- variables[name] += value
- else:
- variables[name] = value
- continue
- matchobj = makeifeq.match(line)
- if matchobj:
- (op, name1, name2) = matchobj.group(1, 2, 3)
- if (op == '' and name1 == name2) or (op == 'n' and name1 != name2):
- makeparseblock(fp, variables)
- else:
- tempvars = {}
- makeparseblock(fp, tempvars)
- continue
- line = line.strip()
- if line == 'endif':
- return
-
-def getmakevars(filenames):
- variables = { }
- for filename in filenames:
- fp = open(filename)
- print "Processing makefile: " + filename
- try:
- makeparseblock(fp, variables)
- finally:
- fp.close()
-
- return variables
-
print "Configuring lib3ds..."
-# Configure
-os.chdir(root);
+#
+prefix = 'lib3ds'
+sources = env.Glob(prefix + '/*.c')
+sources.append(prefix + '/chunktable.h')
-if not os.path.isfile("Makefile"):
- os.system("sh -c './configure'")
-else:
- print "(skipped, Makefile already exists)"
-
-# Makefile parsing
-vars = getmakevars(['lib3ds/Makefile'])
-srcs = vars['lib3ds_la_SOURCES']
-srcs = list(Set(srcs.split()))
-
-sources = []
-for source in srcs:
- sources.append("lib3ds/" + source)
-
defs = ''
cflags = ''
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript 2008-05-11 20:40:55 UTC (rev 14801)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript 2008-05-11 21:13:54 UTC (rev 14802)
@@ -7,7 +7,7 @@
incs = ''
incs += '../blenkernel ../blenlib ../imbuf ../makesdna'
-# incs += ' #/extern/freestyle/lib3ds #/extern/freestyle/swig'
+incs += ' #/extern/freestyle/lib3ds'
incs += ' ' + env['BF_PYTHON_INC']
incs += ' ' + env['BF_LIB3DS_INC']
incs += ' ' + env['BF_PNG_INC']
More information about the Bf-blender-cvs
mailing list