1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
import sys
Import('env')
Import('lib_dir')
Import('sdl_cflags')
Import('sdl_libs')
env = env.Clone()
libs = ['btanks_engine', 'sdlx', 'mrt', 'SDL']
ed_src = [
'base_brush.cpp',
'editor.cpp', 'open_map_dialog.cpp', 'tileset_dialog.cpp',
'layer_item.cpp', 'layer_list_dialog.cpp', 'command.cpp',
'add_tileset_dialog.cpp', 'add_object_dialog.cpp',
'object_properties.cpp', 'tilebox_brush.cpp',
'morph_dialog.cpp', 'resize_dialog.cpp',
]
env.MergeFlags(sdl_cflags, sdl_libs)
env.Append(CPPPATH=['#/engine', '#/engine/src'])
if sys.platform != 'win32':
env.Append(LINKFLAGS=['-Wl,-rpath,' + lib_dir])
env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode']])
env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/mrt'])
env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/sdlx'])
env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/clunk'])
else:
libs.append('sdlx_main')
libs.append('user32')
env.Append(LIBPATH=['#/build/' + env['mode'] + '/engine'])
editor = env.Program('bted', ed_src, LIBS=libs, RPATH=[lib_dir])
if sys.platform != 'win32' and len(env['prefix']) > 0:
Import('install_targets')
install_targets.append(Install(env['prefix'] + '/bin', editor))
else:
Install('#', editor)
if sys.platform == 'win32':
env.AddPostAction(editor, 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;2')
|