comparison ext/SConscript @ 378:64738befdf3b

bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
author vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 11 Jan 2010 23:34:52 +0000
parents fa33cda75471
children b5e7e14004a4
comparison
equal deleted inserted replaced
377:fe6fb0e0ed23 378:64738befdf3b
1 import os, shutil 1 import os, sys, shutil
2 from utils.util_scripts.path import path 2 from utils.util_scripts.path import path
3 3
4 Import('env') 4 Import('env')
5 5
6 curpath = str(path('.')) 6 curpath = Dir('#/ext').srcnode().abspath
7 installpath = str((path('.') / path('install')).abspath()) 7 installpath = Dir(os.path.join(curpath, 'install')).srcnode().abspath
8 8
9 print "======= FIFE EXTERNAL DEPENDENCY BUILD: GUICHAN =======" 9 def build_guichan(target, source, env):
10 os.chdir(str(path('.') / path('guichan-0.8.1'))) 10 print "======= FIFE EXTERNAL DEPENDENCY BUILD: GUICHAN ======="
11 os.system('./configure') 11 failure = Execute(Action(['./configure',
12 os.system('make') 12 'make',
13 os.system('make install prefix=%s' % installpath) 13 'make install prefix=%s' % installpath],
14 chdir=os.path.join(curpath, 'guichan-0.8.2')))
15
16 if (failure):
17 print 'Building failed: guichan'
18 Exit(1)
14 19
15 print "======= FIFE EXTERNAL DEPENDENCY BUILD: LIBPNG =======" 20 def build_png(target, source, env):
16 os.chdir(str(path('..'))) 21 print "======= FIFE EXTERNAL DEPENDENCY BUILD: LIBPNG ======="
17 os.chdir(str(path('.') / path('libpng-1.2.29'))) 22 failure = Execute(Action(['./configure',
18 os.system('./configure') 23 'make all-am',
19 os.system('make all-am') 24 'make install prefix=%s' % installpath,
20 os.system('make install prefix=%s' % installpath) 25 'make install-data-hook prefix=%s' % installpath],
21 os.system('make install-data-hook prefix=%s' % installpath) 26 chdir=os.path.join(curpath, 'libpng-1.2.29')))
27
28 if (failure):
29 print 'Building failed: png'
30 Exit(1)
22 31
23 print "======= FIFE EXTERNAL DEPENDENCY BUILD: OPENAL-SOFT =======" 32
24 os.chdir('..') 33 ext_cmd = env.Command('ext_target',
25 os.chdir(str(path('.') / path('openal-soft'))) 34 'install',
26 os.system('./configure') 35 [build_guichan,
27 os.system('make') 36 build_png,
28 os.system('make install prefix=%s' % installpath) 37 os.chdir(Dir('#').abspath)])
29 38 Alias('ext', ext_cmd)
30 print "======= FIFE EXTERNAL DEPENDENCY BUILD: UNITTEST++ ======="
31 os.chdir('..')
32 os.chdir(str(path('.') / path('UnitTest++')))
33 os.system('make')
34 shutil.copyfile('libUnitTest++.a', str(path(installpath) / path('lib') / path('libUnitTest++.a')))
35 shutil.copyfile(
36 str(path('src') / path('UnitTest++.h')),
37 str(path(installpath) / path('include') / path('UnitTest++.h')))
38 shutil.copyfile(
39 str(path('src') / path('TestReporterStdout.h')),
40 str(path(installpath) / path('include') / path('TestReporterStdout.h')))
41
42 print "======= FIFE EXTERNAL DEPENDENCY BUILD: ALL DONE ( CHECK LOG FOR POSSIBLE ERRORS ) ======="
43
44 os.chdir(curpath)