2004-05-16 13:07:20 +00:00
|
|
|
#!/usr/bin/python
|
2006-02-04 14:15:10 +00:00
|
|
|
import sys
|
|
|
|
import os
|
2004-02-29 21:40:48 +00:00
|
|
|
|
2006-02-04 14:15:10 +00:00
|
|
|
Import ('env')
|
2004-01-04 21:11:59 +00:00
|
|
|
|
2006-02-05 17:14:52 +00:00
|
|
|
window_system = env['OURPLATFORM']
|
2004-01-04 21:11:59 +00:00
|
|
|
|
2009-10-27 14:11:28 +00:00
|
|
|
sources = env.Glob('intern/*.cpp')
|
|
|
|
if window_system == 'darwin':
|
|
|
|
sources += env.Glob('intern/*.mm')
|
2009-10-27 13:40:41 +00:00
|
|
|
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2009-12-02 01:05:37 +00:00
|
|
|
pf = ['GHOST_DisplayManager', 'GHOST_System', 'GHOST_Window', 'GHOST_DropTarget']
|
2009-12-03 12:16:00 +00:00
|
|
|
defs=['_USE_MATH_DEFINES']
|
2004-01-04 21:11:59 +00:00
|
|
|
|
2010-01-19 10:57:59 +00:00
|
|
|
if window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd6', 'irix6', 'aix4', 'aix5'):
|
2009-10-27 14:11:28 +00:00
|
|
|
for f in pf:
|
2009-12-02 01:12:22 +00:00
|
|
|
try:
|
|
|
|
sources.remove('intern' + os.sep + f + 'Win32.cpp')
|
|
|
|
sources.remove('intern' + os.sep + f + 'Carbon.cpp')
|
|
|
|
except ValueError:
|
|
|
|
pass
|
2009-02-20 22:08:02 +00:00
|
|
|
elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
|
2009-10-27 14:11:28 +00:00
|
|
|
for f in pf:
|
2009-12-02 01:12:22 +00:00
|
|
|
try:
|
|
|
|
sources.remove('intern' + os.sep + f + 'X11.cpp')
|
|
|
|
sources.remove('intern' + os.sep + f + 'Carbon.cpp')
|
|
|
|
except ValueError:
|
|
|
|
pass
|
2006-02-04 14:15:10 +00:00
|
|
|
elif window_system == 'darwin':
|
2009-10-27 14:11:28 +00:00
|
|
|
if env['WITH_GHOST_COCOA']:
|
2009-12-03 12:16:00 +00:00
|
|
|
if env['WITH_BF_QUICKTIME']:
|
|
|
|
defs.append('WITH_QUICKTIME')
|
|
|
|
if env['USE_QTKIT']:
|
|
|
|
defs.append('USE_QTKIT')
|
2009-10-27 14:17:29 +00:00
|
|
|
for f in pf:
|
2009-12-02 01:12:22 +00:00
|
|
|
try:
|
|
|
|
sources.remove('intern' + os.sep + f + 'Win32.cpp')
|
|
|
|
sources.remove('intern' + os.sep + f + 'X11.cpp')
|
|
|
|
sources.remove('intern' + os.sep + f + 'Carbon.cpp')
|
|
|
|
except ValueError:
|
|
|
|
pass
|
2009-10-27 14:11:28 +00:00
|
|
|
else:
|
|
|
|
for f in pf:
|
2009-12-02 01:12:22 +00:00
|
|
|
try:
|
|
|
|
sources.remove('intern' + os.sep + f + 'Win32.cpp')
|
|
|
|
sources.remove('intern' + os.sep + f + 'X11.cpp')
|
|
|
|
sources.remove('intern' + os.sep + f + 'Cocoa.mm')
|
|
|
|
except ValueError:
|
|
|
|
pass
|
2009-10-27 13:40:41 +00:00
|
|
|
|
2006-02-04 14:15:10 +00:00
|
|
|
else:
|
2009-10-27 14:11:28 +00:00
|
|
|
print "Unknown window system specified."
|
|
|
|
Exit()
|
2004-01-04 21:11:59 +00:00
|
|
|
|
2009-12-02 00:57:12 +00:00
|
|
|
if env['BF_GHOST_DEBUG']:
|
|
|
|
defs.append('BF_GHOST_DEBUG')
|
|
|
|
|
2010-02-01 18:23:24 +00:00
|
|
|
incs = '. ../string #extern/glew/include #source/blender/imbuf #source/blender/makesdna ' + env['BF_OPENGL_INC']
|
2009-02-20 22:08:02 +00:00
|
|
|
if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
|
2009-10-27 14:11:28 +00:00
|
|
|
incs = env['BF_WINTAB_INC'] + ' ' + incs
|
2009-12-02 00:57:12 +00:00
|
|
|
env.BlenderLib ('bf_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15] )
|
2009-10-27 13:40:41 +00:00
|
|
|
|