Changeset 3750
- Timestamp:
- 10/03/11 11:44:07 (20 months ago)
- Location:
- branches/active/0.3.3dev
- Files:
-
- 1 added
- 4 edited
-
SConstruct (modified) (4 diffs)
-
build/linux2-config.py (modified) (1 diff)
-
engine/SConscript (modified) (2 diffs)
-
engine/core/version.h (added)
-
utils/scons/scons_utils.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/active/0.3.3dev/SConstruct
r3664 r3750 106 106 help='Forces fife to use the local version of tinyxml that ships with fife', 107 107 default=False) 108 109 AddOption('--lib-dir', 110 dest='lib-dir', 111 nargs=1, type='string', 112 action='store', 113 metavar='DIR', 114 help='Shared Library install location') 108 115 109 116 #************************************************************************** … … 174 181 prefix = env['DESTDIR'] + prefix 175 182 pythonprefix = env['DESTDIR'] + pythonprefix 183 184 libdir = GetOption('lib-dir') 185 if libdir is None: 186 libdir = os.path.join(prefix, 'lib') 187 else: 188 libdir = os.path.join(prefix, libdir) 189 190 env['LIBDIR'] = libdir 176 191 177 192 #************************************************************************** … … 339 354 'DEBUG' : debug, 340 355 'PREFIX' : prefix, 356 'LIBDIR' : libdir, 341 357 'TESTLIBS' : ['fife', 'UnitTest++'], 342 358 'PYTHON_PREFIX' : pythonprefix, … … 344 360 'PYLIB_COPY_DEST' : os.path.join('#engine', 'python', 'fife')} 345 361 362 opts['FIFE_VERSION'] = utils.get_fife_version(os.path.join(opts['SRC'], 'core')); 363 346 364 if debug: 347 365 opts['LIBPATH'] = os.path.join(os.getcwd(), 'build', 'engine', 'debug') -
branches/active/0.3.3dev/build/linux2-config.py
r3744 r3750 41 41 42 42 env.Append(LIBPATH = [os.path.join('/', 'opt', 'lib'), 43 extlibpath]) 43 extlibpath, 44 env.subst('$LIBDIR')]) 44 45 45 46 env.AppendENVPath('LD_RUN_PATH', os.path.join('..', '..', '..', extlibpath)) -
branches/active/0.3.3dev/engine/SConscript
r3398 r3750 127 127 OBJPREFIX='shared_', 128 128 SHLIBEMITTER = '') 129 el se:129 elif sys.platform == 'darwin': 130 130 sharedlib = env.SharedLibrary(target = fife_tgt, 131 131 source = compilefiles) 132 else: 133 # soname will be libfife.so.major 134 majorVersion = opts['FIFE_VERSION'].split('.')[0] 135 soname = env.subst('$SHLIBPREFIX') + fife_tgt + env.subst('$SHLIBSUFFIX') + '.' + majorVersion 136 sharedlib = env.SharedLibrary(target = fife_tgt, 137 source = compilefiles, 138 SHLIBSUFFIX = env.subst('$SHLIBSUFFIX') + '.' + opts['FIFE_VERSION'], 139 LINKFLAGS=['-Wl,-soname,' + str(soname)]) 132 140 133 141 #************************************************************************** … … 180 188 #TODO: This is not complete. Because of the current linux rpath issue this 181 189 #will not work as expected. 182 install_static = env.Install(o s.path.join(opts['PREFIX'], 'lib'), staticlib)183 install_shared = env.Install(o s.path.join(opts['PREFIX'], 'lib'), sharedlib)190 install_static = env.Install(opts['LIBDIR'], staticlib) 191 install_shared = env.Install(opts['LIBDIR'], sharedlib) 184 192 185 193 headerdestlist = utils.gen_dest_files(os.path.join(opts['PREFIX'], 'include', 'fife'), headerfiles) -
branches/active/0.3.3dev/utils/scons/scons_utils.py
r3541 r3750 23 23 24 24 import os, sys 25 import re 25 26 from string import Template 26 27 … … 108 109 interfacefile = os.path.join(outdir, 'fife.i') 109 110 open(interfacefile, 'w').write(template.substitute(inclusions=inclusions)) 111 112 def get_fife_version(srcpath): 113 MAJOR_VERSION_PATTERN = re.compile(r"#define\s+FIFE_MAJOR_VERSION\s+(.*)") 114 MINOR_VERSION_PATTERN = re.compile(r"#define\s+FIFE_MINOR_VERSION\s+(.*)") 115 SUBMINOR_VERSION_PATTERN = re.compile(r"#define\s+FIFE_SUBMINOR_VERSION\s+(.*)") 116 117 patterns = [MAJOR_VERSION_PATTERN, 118 MINOR_VERSION_PATTERN, 119 SUBMINOR_VERSION_PATTERN] 120 121 source = open(os.path.join(srcpath, 'version.h'), 'r').read() 122 versionInfo = [] 123 for pattern in patterns: 124 match = pattern.search(source) 125 if match: 126 versionInfo.append(match.group(1).strip()) 127 128 return '.'.join(versionInfo)
Note: See TracChangeset
for help on using the changeset viewer.
