Changeset 4
- Timestamp:
- 12/13/2006 11:00:45 PM (5 years ago)
- Files:
-
- 4 edited
-
Bindings/glfw/SConstruct (modified) (2 diffs)
-
Plugins/luaScripting/SConstruct (modified) (2 diffs)
-
SConstruct (modified) (4 diffs)
-
nrEngine/SConstruct (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Bindings/glfw/SConstruct
r2 r4 2 2 Import('build') 3 3 4 env = build.Copy() 5 4 6 # define include directory 5 include = "../../"6 build.Append(INCDIR = include, CPPPATH=[include])7 include = ['../../', env['prefix'] + '/include/'] 8 env.Append(CPPPATH=include) 7 9 8 10 # file list of files to be build … … 21 23 22 24 # Specify the library path where to search and the libraries to which to link 23 libpaths = ['.', build['prefix'] + '/lib', '/usr/local/lib', '/usr/lib', './lib']25 libpaths = ['.', env['prefix'] + '/lib', '/usr/local/lib', '/usr/lib', './lib'] 24 26 libs = ['glfw'] 25 27 26 28 # if we have to build shared version 27 if build['Shared']:28 library = build.SharedLibrary ('nrEngine_GLFWBinding', fileList, LIBS=libs, LIBPATH=libpaths)29 if env['Shared']: 30 library = env.SharedLibrary ('nrEngine_GLFWBinding', fileList, LIBS=libs, LIBPATH=libpaths) 29 31 30 32 # if we have to built static version 31 if build['Static']:32 library = build.StaticLibrary ('nrEngine_GLFWBinding', fileList, LIBS=libs, LIBPATH=libpaths)33 if env['Static']: 34 library = env.StaticLibrary ('nrEngine_GLFWBinding', fileList, LIBS=libs, LIBPATH=libpaths) 33 35 34 36 # compute the directory names where to store the include files 35 incdir = build['incdir'] + '/nrEngine/Binding/glfw'37 incdir = env['incdir'] + '/nrEngine/Binding/glfw' 36 38 37 39 # Now check for installing feature 38 build.Install(build['libdir'], library)39 build.Install(incdir, fileListInc)40 il = build.Alias('install-lib', build['libdir'])41 ih = build.Alias('install-inc', [incdir])42 build.Alias('install', [il, ih])40 env.Install(env['libdir'], library) 41 env.Install(incdir, fileListInc) 42 il = env.Alias('install-lib', env['libdir']) 43 ih = env.Alias('install-inc', [incdir]) 44 env.Alias('install', [il, ih]) 43 45 -
Plugins/luaScripting/SConstruct
r2 r4 1 1 # Import the current building environment 2 import os 2 3 Import('build') 3 4 5 # no copy the build into own environment 6 env = build.Copy() 7 4 8 # define include directory 5 include = "include"6 build.Append(INCDIR = include, CPPPATH=[include])9 include = ["include", env['prefix'] + '/include/'] 10 env.Append(CPPPATH=include, LINKFLAGS='-v -WL,-E,-Bstatic -nodefaultlibs') 7 11 8 12 # file list of files to be build … … 16 20 17 21 # Specify the library path where to search and the libraries to which to link 18 libpaths = ['.', build['prefix'] + '/lib', '/usr/local/lib', '/usr/lib']19 libs = ['lua' ]22 libpaths = ['.', env['prefix'] + '/lib', '/usr/local/lib', '/usr/lib'] 23 libs = ['lua', 'stdc++', 'c', 'm', 'gcc'] 20 24 21 25 suffix = '' 22 26 23 27 # if we have to build shared version 24 if build['Shared']:25 library = build.SharedLibrary ('luaScripting.so', fileList, LIBS=libs, LIBPATH=libpaths)28 if env['Shared']: 29 library = env.SharedLibrary ('luaScripting', fileList, LIBS=libs, LIBPATH=libpaths) 26 30 suffix = '.so' 27 31 28 32 # if we have to built static version 29 if build['Static']:30 library = build.StaticLibrary ('luaScripting', fileList, LIBS=libs, LIBPATH=libpaths)33 if env['Static']: 34 library = env.StaticLibrary ('luaScripting', fileList, LIBS=libs, LIBPATH=libpaths) 31 35 suffix = '.a' 32 36 33 # Now check for installing feature34 instLocation = build['libdir'] + '/nrEngine/' + 'luaScripting' + suffix37 # Create install location 38 instLocation = env['libdir'] + '/nrEngine/' + 'luaScripting' + suffix 35 39 36 build.InstallAs(instLocation, library) 37 il = build.Alias('install-lib', instLocation)40 # Create new alias for installing into this location 41 il = build.Alias('install-lib', build.InstallAs(instLocation, library)) 38 42 build.Alias('install', [il]) 39 43 -
SConstruct
r2 r4 27 27 # We define the default build environment 28 28 # -------------------------------------------------- 29 env = Environment(CC = COMPILER, CCFLAGS = CPPFLAGS, 30 PROGPREFIX=BIN_DIR, OBJPREFIX=OBJ_DIR) 31 32 # Check for libraries and header files 33 conf = Configure(env) 29 env = Environment(CC = COMPILER, CCFLAGS = CPPFLAGS, PROGPREFIX=BIN_DIR, OBJPREFIX=OBJ_DIR) 34 30 35 31 # -------------------------------------------------- 36 32 # Check for default Libraries and headers 37 33 # -------------------------------------------------- 34 # Check for libraries and header files 35 conf = Configure(env) 36 38 37 # Check for vector and map header to find STL library 39 38 if not conf.CheckCXXHeader('vector') or not conf.CheckCXXHeader('map'): … … 56 55 57 56 # Check for Boost-Thread headers 58 if not conf.CheckCXXHeader('boost/thread/thread.hpp'):59 print 'Boost-Thread must be installed!'60 Exit(1)57 #if not conf.CheckCXXHeader('boost/thread/thread.hpp'): 58 # print 'Boost-Thread must be installed!' 59 # Exit(1) 61 60 62 61 # Check for dl-library … … 67 66 68 67 env = conf.Finish() 69 70 71 68 72 69 # -------------------------------------------------- … … 139 136 build.Append(options = opts) 140 137 138 139 141 140 # Include building files from subdirectories 142 141 BuildDir('nrEngine/build', 'nrEngine/src', duplicate=0) 143 142 144 build.SConscript('nrEngine/SConstruct','build')145 build.SConscript('Bindings/glfw/SConstruct','build')146 build.SConscript('Plugins/luaScripting/SConstruct', 'build')147 143 144 SConscript('nrEngine/SConstruct', 'build') 145 #SConscript('Bindings/glfw/SConstruct', 'build') 146 147 #if 'luaScriptin' in COMMAND_LINE_TARGETS: 148 SConscript('Plugins/luaScripting/SConstruct', 'build') 149 -
nrEngine/SConstruct
r1 r4 2 2 Import('build') 3 3 4 env = build.Copy() 5 4 6 # define include directory 5 include = "include"6 build.Append(INCDIR = include, CPPPATH=[include])7 include = ['include', env['prefix'] + '/include/'] 8 env.Append(CPPPATH = include, CCFLAGS=' -pthread ') 7 9 8 10 # file list of files to be build … … 106 108 107 109 # Specify the library path where to search and the libraries to which to link 108 libpaths = ['.', '/usr/local/lib', '/usr/lib']110 libpaths = ['.', env['prefix'] + '/lib/', '/usr/local/lib', '/usr/lib'] 109 111 libs = ['dl', 'boost_thread'] 110 112 111 113 # if we have to build shared version 112 if build['Shared']:113 library = build.SharedLibrary ('nrEngine', fileList, LIBS=libs, LIBPATH=libpaths)114 if env['Shared']: 115 library = env.SharedLibrary ('nrEngine', fileList, LIBS=libs, LIBPATH=libpaths) 114 116 115 117 # if we have to built static version 116 if build['Static']:117 library = build.StaticLibrary ('nrEngine', fileList, LIBS=libs, LIBPATH=libpaths)118 if env['Static']: 119 library = env.StaticLibrary ('nrEngine', fileList, LIBS=libs, LIBPATH=libpaths) 118 120 119 121 # compute the directory names where to store the include files 120 incdir = build['incdir'] + '/nrEngine/'121 incdirev = build['incdir'] + '/nrEngine/events/'122 incdir = env['incdir'] + '/nrEngine/' 123 incdirev = env['incdir'] + '/nrEngine/events/' 122 124 123 125 # Now check for installing feature 124 build.Install( build['libdir'], library)126 build.Install(env['libdir'], library) 125 127 build.Install(incdir, fileListInc) 126 128 build.Install(incdirev, fileListIncEvents) 127 il = build.Alias('install-lib', build['libdir'])129 il = build.Alias('install-lib', env['libdir']) 128 130 ih = build.Alias('install-inc', [incdir, incdirev]) 129 131 build.Alias('install', [il, ih])
Note: See TracChangeset
for help on using the changeset viewer.
