Changeset 19835

Show
Ignore:
Timestamp:
09/24/08 23:21:25 (5 years ago)
Author:
tokuhirom
Message:

change ext/ directory structure.

Location:
lang/cplusplus/llv8call/trunk
Files:
12 added
2 modified
9 moved

Legend:

Unmodified
Added
Removed
  • lang/cplusplus/llv8call/trunk/ext/SConscript

    r19827 r19835  
    11import platform 
    2 from distutils import sysconfig 
     2import os 
     3import stat 
    34 
    45Import("env") 
    56Import("conf") 
    67 
    7 def GuessOS(): 
    8   id = platform.system() 
    9   if id == 'Linux': 
    10     return 'linux' 
    11   elif id == 'Darwin': 
    12     return 'macos' 
    13   elif id == 'Windows': 
    14     return 'win32' 
    15   else: 
    16     return None 
    17  
    18 OS_GUESS = GuessOS() 
    19  
    208env.Append( 
    219    CCFLAGS = ['-DUSING_V8_SHARED'], 
    22     CPPPATH = ['../../v8/include/', '../src/', '/opt/local/include/', sysconfig.get_python_inc()], 
     10    CPPPATH = ['../../v8/include/', '../../src/', '/opt/local/include/'], 
    2311    LIBPATH = ['../../v8/'], 
    2412) 
    2513 
    26 if conf.CheckCHeader("Python.h"): 
    27     env.SharedLibrary( 
    28         "python", 
    29         ['python.cc'], 
    30         LIBS=['v8', 'python' + sysconfig.get_config_var('VERSION')], 
    31     ) 
     14for d in os.listdir( os.getcwd() ): 
     15    if stat.S_ISDIR( os.stat(d)[stat.ST_MODE] ): 
     16        print d 
     17        env.SConscript(d + '/SConscript', exports=['env','conf']) 
    3218 
    33 # libmemcached 
    34 if conf.CheckLib('memcached'): 
    35     env.SharedLibrary( 
    36         "libmemcached", 
    37         ['libmemcached.cc'], 
    38         LIBS=['v8', 'memcached'], 
    39     ) 
    40 elif OS_GUESS == 'win32': 
    41     env.SharedLibrary( 
    42         "memcached", 
    43         ['libmemcached-win32.cc'], 
    44         LIBS=['v8', 'ws2_32'], 
    45     ) 
    46  
    47 if OS_GUESS == 'linux' or OS_GUESS == 'macos': 
    48     env.SharedLibrary( 
    49         "posix", 
    50         ['posix.cc'], 
    51         LIBS=['v8'], 
    52     ) 
    53  
    54 # curl 
    55 if conf.CheckLib('curl'): 
    56     libs = ['v8', 'curl'] 
    57     if conf.CheckLib('iconv') or OS_GUESS == 'macos': 
    58         libs.append('iconv') 
    59     env.SharedLibrary( 
    60         "curl", 
    61         ['curl.cc'], 
    62         LIBS=libs, 
    63     ) 
    64  
    65 # fcgi 
    66 if conf.CheckLib('fcgi'): 
    67     env.SharedLibrary( 
    68         "fcgi", 
    69         ['fcgi.cc'], 
    70         LIBS=['v8', 'fcgi'], 
    71     ) 
    72  
    73 # sqlite3 
    74 env.SharedLibrary( 
    75     "sqlite3", 
    76     ["sqlite3-amalgamination.c", 'sqlite3.cc'], 
    77     LIBS=['v8'], 
    78 ) 
  • lang/cplusplus/llv8call/trunk/t/util.js

    r19519 r19835  
    1313    }; 
    1414} 
    15 DLL.SetLibraryPath("ext/"); 
    1615function check_lib(libname) { 
     16    DLL.SetLibraryPath("ext/" + libname); 
    1717    if (File.Access(DLL.GetLibraryName(DLL.GetLibraryPath(), libname), File.ACCESS_EXISTS)) { 
    1818        DLL.LoadLibrary(DLL.GetLibraryName(DLL.GetLibraryPath(), libname));