Changeset 4


Ignore:
Timestamp:
12/13/06 23:00:45 (13 years ago)
Author:
art
Message:
 
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Bindings/glfw/SConstruct

    r2 r4  
    22Import('build') 
    33 
     4env = build.Copy() 
     5 
    46# define include directory 
    5 include = "../../" 
    6 build.Append(INCDIR = include, CPPPATH=[include]) 
     7include = ['../../', env['prefix'] + '/include/'] 
     8env.Append(CPPPATH=include) 
    79 
    810# file list of files to be build 
     
    2123 
    2224# 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'] 
     25libpaths = ['.', env['prefix'] + '/lib', '/usr/local/lib', '/usr/lib', './lib'] 
    2426libs = ['glfw'] 
    2527 
    2628# if we have to build shared version 
    27 if build['Shared']: 
    28         library = build.SharedLibrary ('nrEngine_GLFWBinding', fileList, LIBS=libs, LIBPATH=libpaths) 
     29if env['Shared']: 
     30        library = env.SharedLibrary ('nrEngine_GLFWBinding', fileList, LIBS=libs, LIBPATH=libpaths) 
    2931 
    3032# if we have to built static version 
    31 if build['Static']: 
    32         library = build.StaticLibrary ('nrEngine_GLFWBinding', fileList, LIBS=libs, LIBPATH=libpaths) 
     33if env['Static']: 
     34        library = env.StaticLibrary ('nrEngine_GLFWBinding', fileList, LIBS=libs, LIBPATH=libpaths) 
    3335 
    3436# compute the directory names where to store the include files 
    35 incdir = build['incdir'] + '/nrEngine/Binding/glfw' 
     37incdir = env['incdir'] + '/nrEngine/Binding/glfw' 
    3638 
    3739# 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]) 
     40env.Install(env['libdir'], library) 
     41env.Install(incdir, fileListInc) 
     42il = env.Alias('install-lib', env['libdir']) 
     43ih = env.Alias('install-inc', [incdir]) 
     44env.Alias('install', [il, ih]) 
    4345 
  • Plugins/luaScripting/SConstruct

    r2 r4  
    11# Import the current building environment 
     2import os 
    23Import('build') 
    34 
     5# no copy the build into own environment 
     6env = build.Copy() 
     7 
    48# define include directory 
    5 include = "include" 
    6 build.Append(INCDIR = include, CPPPATH=[include]) 
     9include = ["include", env['prefix'] + '/include/'] 
     10env.Append(CPPPATH=include, LINKFLAGS='-v -WL,-E,-Bstatic -nodefaultlibs') 
    711 
    812# file list of files to be build 
     
    1620 
    1721# 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'] 
     22libpaths = ['.', env['prefix'] + '/lib', '/usr/local/lib', '/usr/lib'] 
     23libs = ['lua', 'stdc++', 'c', 'm', 'gcc'] 
    2024 
    2125suffix = '' 
    2226 
    2327# if we have to build shared version 
    24 if build['Shared']: 
    25         library = build.SharedLibrary ('luaScripting.so', fileList, LIBS=libs, LIBPATH=libpaths) 
     28if env['Shared']: 
     29        library = env.SharedLibrary ('luaScripting', fileList, LIBS=libs, LIBPATH=libpaths) 
    2630        suffix = '.so' 
    2731 
    2832# if we have to built static version 
    29 if build['Static']: 
    30         library = build.StaticLibrary ('luaScripting', fileList, LIBS=libs, LIBPATH=libpaths) 
     33if env['Static']: 
     34        library = env.StaticLibrary ('luaScripting', fileList, LIBS=libs, LIBPATH=libpaths) 
    3135        suffix = '.a' 
    3236 
    33 # Now check for installing feature 
    34 instLocation = build['libdir'] + '/nrEngine/' + 'luaScripting' + suffix 
     37# Create install location 
     38instLocation = env['libdir'] + '/nrEngine/' + 'luaScripting' + suffix 
    3539 
    36 build.InstallAs(instLocation, library) 
    37 il = build.Alias('install-lib', instLocation) 
     40# Create new alias for installing into this location 
     41il = build.Alias('install-lib', build.InstallAs(instLocation, library)) 
    3842build.Alias('install', [il]) 
    3943 
  • SConstruct

    r2 r4  
    2727# We define the default build environment 
    2828# -------------------------------------------------- 
    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) 
     29env = Environment(CC = COMPILER, CCFLAGS = CPPFLAGS, PROGPREFIX=BIN_DIR, OBJPREFIX=OBJ_DIR) 
    3430 
    3531# -------------------------------------------------- 
    3632# Check for default Libraries and headers 
    3733# -------------------------------------------------- 
     34# Check for libraries and header files 
     35conf = Configure(env) 
     36 
    3837# Check for vector and map header to find STL library 
    3938if not conf.CheckCXXHeader('vector') or not conf.CheckCXXHeader('map'): 
     
    5655 
    5756# 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) 
    6160 
    6261# Check for dl-library 
     
    6766 
    6867env = conf.Finish() 
    69  
    70  
    7168 
    7269# -------------------------------------------------- 
     
    139136build.Append(options = opts) 
    140137 
     138 
     139 
    141140# Include building files from subdirectories 
    142141BuildDir('nrEngine/build', 'nrEngine/src', duplicate=0) 
    143142 
    144 build.SConscript('nrEngine/SConstruct','build') 
    145 build.SConscript('Bindings/glfw/SConstruct','build') 
    146 build.SConscript('Plugins/luaScripting/SConstruct', 'build') 
    147143 
     144SConscript('nrEngine/SConstruct', 'build') 
     145#SConscript('Bindings/glfw/SConstruct', 'build') 
     146 
     147#if 'luaScriptin' in COMMAND_LINE_TARGETS: 
     148SConscript('Plugins/luaScripting/SConstruct', 'build') 
     149 
  • nrEngine/SConstruct

    r1 r4  
    22Import('build') 
    33 
     4env = build.Copy() 
     5 
    46# define include directory 
    5 include = "include" 
    6 build.Append(INCDIR = include, CPPPATH=[include]) 
     7include = ['include', env['prefix'] + '/include/'] 
     8env.Append(CPPPATH = include, CCFLAGS=' -pthread ') 
    79 
    810# file list of files to be build 
     
    106108 
    107109# Specify the library path where to search and the libraries to which to link 
    108 libpaths = ['.', '/usr/local/lib', '/usr/lib'] 
     110libpaths = ['.', env['prefix'] + '/lib/', '/usr/local/lib', '/usr/lib'] 
    109111libs = ['dl', 'boost_thread'] 
    110112 
    111113# if we have to build shared version 
    112 if build['Shared']: 
    113         library = build.SharedLibrary ('nrEngine', fileList, LIBS=libs, LIBPATH=libpaths) 
     114if env['Shared']: 
     115        library = env.SharedLibrary ('nrEngine', fileList, LIBS=libs, LIBPATH=libpaths) 
    114116 
    115117# if we have to built static version 
    116 if build['Static']: 
    117         library = build.StaticLibrary ('nrEngine', fileList, LIBS=libs, LIBPATH=libpaths) 
     118if env['Static']: 
     119        library = env.StaticLibrary ('nrEngine', fileList, LIBS=libs, LIBPATH=libpaths) 
    118120 
    119121# compute the directory names where to store the include files 
    120 incdir = build['incdir'] + '/nrEngine/' 
    121 incdirev = build['incdir'] + '/nrEngine/events/' 
     122incdir = env['incdir'] + '/nrEngine/' 
     123incdirev = env['incdir'] + '/nrEngine/events/' 
    122124 
    123125# Now check for installing feature 
    124 build.Install(build['libdir'], library) 
     126build.Install(env['libdir'], library) 
    125127build.Install(incdir, fileListInc) 
    126128build.Install(incdirev, fileListIncEvents) 
    127 il = build.Alias('install-lib', build['libdir']) 
     129il = build.Alias('install-lib', env['libdir']) 
    128130ih = build.Alias('install-inc', [incdir, incdirev]) 
    129131build.Alias('install', [il, ih]) 
Note: See TracChangeset for help on using the changeset viewer.