| 
									
										
										
										
											2012-12-17 08:01:43 +00:00
										 |  |  | #!/usr/bin/env python | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # ***** BEGIN GPL LICENSE BLOCK ***** | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # This program is free software; you can redistribute it and/or | 
					
						
							|  |  |  | # modify it under the terms of the GNU General Public License | 
					
						
							|  |  |  | # as published by the Free Software Foundation; either version 2 | 
					
						
							|  |  |  | # of the License, or (at your option) any later version. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  | # GNU General Public License for more details. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # You should have received a copy of the GNU General Public License | 
					
						
							|  |  |  | # along with this program; if not, write to the Free Software Foundation, | 
					
						
							|  |  |  | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # The Original Code is Copyright (C) 2006, Blender Foundation | 
					
						
							|  |  |  | # All rights reserved. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # The Original Code is: all of this file. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # Contributor(s): Nathan Letwory. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # ***** END GPL LICENSE BLOCK ***** | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-02-04 14:15:10 +00:00
										 |  |  | Import ('env') | 
					
						
							| 
									
										
										
										
											2004-02-29 21:40:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-10 01:11:04 +00:00
										 |  |  | sources = env.Glob('intern/source/*.c') | 
					
						
							|  |  |  | raysources = env.Glob('intern/raytrace/*.cpp') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna ../makesrna' | 
					
						
							| 
									
										
										
										
											2012-04-14 21:48:34 +00:00
										 |  |  | incs += ' extern/include ../blenkernel ../imbuf ../blenfont' | 
					
						
							| 
									
										
										
										
											2011-03-17 23:30:29 +00:00
										 |  |  | incs += ' ../include ../blenloader ../../../intern/smoke/extern ../../../intern/mikktspace ../bmesh' | 
					
						
							| 
									
										
										
										
											2009-12-10 01:11:04 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-20 10:22:49 +00:00
										 |  |  | cflags_raytrace = env['CCFLAGS'] | 
					
						
							|  |  |  | cxxflags_raytrace = env['CXXFLAGS'] | 
					
						
							| 
									
										
										
										
											2009-12-05 01:07:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-10 00:51:13 +00:00
										 |  |  | defs = [] | 
					
						
							| 
									
										
										
										
											2010-07-20 10:22:49 +00:00
										 |  |  | defs_raytrace = [] | 
					
						
							| 
									
										
										
										
											2009-12-10 00:51:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-14 21:55:38 +00:00
										 |  |  | if env['WITH_BF_SMOKE']: | 
					
						
							|  |  |  |     defs.append('WITH_SMOKE') | 
					
						
							| 
									
										
										
										
											2011-07-13 18:40:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-22 17:01:54 +00:00
										 |  |  | if env['WITH_BF_PYTHON']: | 
					
						
							|  |  |  |     incs += ' ../python' | 
					
						
							|  |  |  |     incs += ' ' + env['BF_PYTHON_INC'] | 
					
						
							|  |  |  |     defs.append('WITH_PYTHON') | 
					
						
							|  |  |  |     if env['BF_DEBUG']: | 
					
						
							|  |  |  |         defs.append('DEBUG') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-05 01:07:42 +00:00
										 |  |  | if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): | 
					
						
							| 
									
										
										
										
											2009-12-05 00:26:20 +00:00
										 |  |  |     if env['WITH_BF_RAYOPTIMIZATION']: | 
					
						
							| 
									
										
										
										
											2010-07-20 10:22:49 +00:00
										 |  |  |         cflags_raytrace = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] | 
					
						
							|  |  |  |         cxxflags_raytrace = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] | 
					
						
							| 
									
										
										
										
											2009-12-05 01:07:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-24 12:57:58 +00:00
										 |  |  | if env['OURPLATFORM'] in ('win32-mingw', 'win64-mingw'): | 
					
						
							| 
									
										
										
										
											2009-12-05 01:07:42 +00:00
										 |  |  |     if env['WITH_BF_RAYOPTIMIZATION']: | 
					
						
							| 
									
										
										
										
											2010-07-20 10:22:49 +00:00
										 |  |  |         cflags_raytrace = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] | 
					
						
							|  |  |  |         cxxflags_raytrace = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] | 
					
						
							| 
									
										
										
										
											2009-11-09 17:52:13 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if env['OURPLATFORM'] == 'darwin': | 
					
						
							| 
									
										
										
										
											2009-12-05 00:26:20 +00:00
										 |  |  |     if env['MACOSX_ARCHITECTURE'] in ('i386', 'x86_64') and env['WITH_BF_RAYOPTIMIZATION']: | 
					
						
							| 
									
										
										
										
											2010-07-20 10:22:49 +00:00
										 |  |  |         cflags_raytrace = env['CFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] | 
					
						
							|  |  |  |         cxxflags_raytrace = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] | 
					
						
							| 
									
										
										
										
											2009-12-10 00:51:13 +00:00
										 |  |  |          | 
					
						
							| 
									
										
										
										
											2011-08-21 13:31:46 +00:00
										 |  |  | if env['OURPLATFORM'] == 'linux': | 
					
						
							| 
									
										
										
										
											2009-12-10 00:51:13 +00:00
										 |  |  |     if env['WITH_BF_RAYOPTIMIZATION']: | 
					
						
							| 
									
										
										
										
											2010-07-20 10:22:49 +00:00
										 |  |  |         cflags_raytrace = env['CCFLAGS'] +  env['BF_RAYOPTIMIZATION_SSE_FLAGS'] | 
					
						
							|  |  |  |         cxxflags_raytrace = env['CXXFLAGS'] +  env['BF_RAYOPTIMIZATION_SSE_FLAGS'] | 
					
						
							| 
									
										
										
										
											2009-12-10 00:51:13 +00:00
										 |  |  |     incs += ' ../../../extern/binreloc/include' | 
					
						
							| 
									
										
										
										
											2009-10-06 10:23:25 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-01 18:39:41 +00:00
										 |  |  | if env['OURPLATFORM'] == 'linuxcross': | 
					
						
							|  |  |  |     if env['WITH_BF_RAYOPTIMIZATION']: | 
					
						
							| 
									
										
										
										
											2010-07-20 10:22:49 +00:00
										 |  |  |         cflags_raytrace = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] | 
					
						
							|  |  |  |         cxxflags_raytrace = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] | 
					
						
							| 
									
										
										
										
											2010-02-01 18:39:41 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-10-22 11:28:10 +00:00
										 |  |  | if env['WITH_BF_QUICKTIME']: | 
					
						
							| 
									
										
										
										
											2006-02-19 22:21:45 +00:00
										 |  |  |     defs.append('WITH_QUICKTIME') | 
					
						
							| 
									
										
										
										
											2008-11-11 14:14:22 +00:00
										 |  |  |     incs += ' ../quicktime ' + env['BF_QUICKTIME_INC'] | 
					
						
							| 
									
										
										
										
											2004-01-04 21:11:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-02-23 21:37:29 +00:00
										 |  |  | if env['WITH_BF_OPENEXR']: | 
					
						
							|  |  |  |     defs.append('WITH_OPENEXR') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-22 17:01:54 +00:00
										 |  |  | if env['WITH_BF_GAMEENGINE']: | 
					
						
							|  |  |  |     defs.append('WITH_GAMEENGINE') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-24 12:57:58 +00:00
										 |  |  | if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): | 
					
						
							| 
									
										
										
										
											2009-10-01 16:32:33 +00:00
										 |  |  |     incs += ' ' + env['BF_PTHREADS_INC'] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-01 18:39:41 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # HACK: To fix problem with error 'MMX instruction set not enabled' from mmintrin.h | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | if env['OURPLATFORM'] == 'linuxcross': | 
					
						
							| 
									
										
										
										
											2010-07-20 10:22:49 +00:00
										 |  |  |     defs.append('__SSE__') | 
					
						
							|  |  |  |     defs_raytrace.append('__MMX__') | 
					
						
							| 
									
										
										
										
											2010-02-01 18:39:41 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-05 00:26:20 +00:00
										 |  |  | if env['WITH_BF_RAYOPTIMIZATION']: | 
					
						
							|  |  |  |     defs.append('__SSE__') | 
					
						
							| 
									
										
										
										
											2010-07-20 10:22:49 +00:00
										 |  |  |     defs_raytrace.append('__SSE__') | 
					
						
							| 
									
										
										
										
											2009-12-05 00:26:20 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-20 10:22:49 +00:00
										 |  |  | env.BlenderLib ( libname = 'bf_render', sources = sources, includes = Split(incs), defines=defs, libtype='core', priority=145 ) | 
					
						
							|  |  |  | env.BlenderLib ( libname = 'bf_render_raytrace', sources = raysources, includes = Split(incs), defines=defs_raytrace, libtype='core', priority=145, compileflags=cflags_raytrace, cxx_compileflags=cxxflags_raytrace ) |