- Timestamp:
- 10/05/08 16:29:09 (5 years ago)
- Location:
- lang/cplusplus/llv8call/trunk
- Files:
-
- 2 modified
-
Sconstruct (modified) (1 diff)
-
v8ext/v8ext.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/cplusplus/llv8call/trunk/Sconstruct
r20778 r20783 50 50 51 51 env.Append( 52 CCFLAGS=['-DUSING_V8_SHARED'], 52 CCFLAGS=[ 53 '-DUSING_V8_SHARED', 54 ["-D"+x+'''='"'''+env.subst(env[x])+""""'""" for x in ['SHLIBSUFFIX', 'SHLIBPREFIX']], 55 '''-DDIRSEP='"''' + os.sep + """"'""" 56 ], 53 57 CPPPATH=[os.getcwd() + '/vendor/v8/include/', os.getcwd() + '/v8ext/', '/opt/local/include/'], 54 58 LIBPATH=[os.getcwd() + '/vendor/v8/', '/opt/local/lib/'], -
lang/cplusplus/llv8call/trunk/v8ext/v8ext.cc
r20781 r20783 51 51 using namespace v8; 52 52 53 #ifdef _WIN3254 # define DIRECTORY_SEPARATOR "\\"55 # define DLL_PREFIX ""56 # define DLL_SUFFIX ".dll"57 #elif defined(__APPLE__)58 # define DIRECTORY_SEPARATOR "/"59 # define DLL_PREFIX "lib"60 # define DLL_SUFFIX ".dylib"61 #else62 # define DIRECTORY_SEPARATOR "/"63 # define DLL_PREFIX "lib"64 # define DLL_SUFFIX ".so"65 #endif66 67 53 static inline Handle<Object> _find_or_create_target(Handle<Object> &target, const char *name) { 68 54 Handle<String> key = String::New(name); … … 99 85 static inline void mmmm(const char *libpath, const char*libname, std::string & dirbuf, std::string & basenamebuf) { 100 86 dirbuf = libpath; 101 dirbuf += DIR ECTORY_SEPARATOR;87 dirbuf += DIRSEP; 102 88 dirbuf += libname; 103 89 … … 109 95 unsigned int pos = 0; 110 96 while ((pos = dirbuf.find(".", pos+1)) != std::string::npos) { 111 dirbuf.replace(pos, 1, DIR ECTORY_SEPARATOR);97 dirbuf.replace(pos, 1, DIRSEP); 112 98 } 113 99 } … … 118 104 mmmm(libpath, libname, dir, basename); 119 105 120 std::string npath(dir + DIR ECTORY_SEPARATOR);121 if (basename.find( DLL_PREFIX) != 0) {122 npath += DLL_PREFIX;123 } 124 npath += basename + DLL_SUFFIX;106 std::string npath(dir + DIRSEP); 107 if (basename.find(SHLIBPREFIX) != 0) { 108 npath += SHLIBPREFIX; 109 } 110 npath += basename + SHLIBSUFFIX; 125 111 char * buf = new char [npath.length()+1]; 126 112 strcpy(buf, npath.c_str()); … … 183 169 std::string path; 184 170 path = dir.c_str(); 185 path += DIR ECTORY_SEPARATOR;171 path += DIRSEP; 186 172 path += basename.c_str(); 187 173 path += ".js";
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)