File: SConscript

package info (click to toggle)
btanks 0.9.8083-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 43,616 kB
  • sloc: cpp: 46,425; ansic: 12,005; xml: 4,262; python: 313; sh: 13; makefile: 13
file content (44 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download | duplicates (5)
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')