Moved cpp code to src/cpp and js code to src/js.

This commit is contained in:
Stefan Thomas
2012-11-06 12:02:59 -08:00
parent 3c880b8301
commit fa3fab5816
214 changed files with 62 additions and 57 deletions

10
.gitignore vendored
View File

@@ -14,9 +14,13 @@
# Ignore object files.
*.o
obj/*
bin/rippled
rippled
build/obj/*
build/proto/*
build/bin/rippled
build/rippled
# Ignore JavaScript build targets
build/ripple.js
# Ignore locally installed node_modules
node_modules

12
.gitmodules vendored
View File

@@ -1,9 +1,9 @@
[submodule "websocketpp"]
path = websocketpp
[submodule "src/cpp/websocketpp"]
path = src/cpp/websocketpp
url = https://github.com/zaphoyd/websocketpp.git
[submodule "js/cryptojs"]
path = js/cryptojs
[submodule "src/js/cryptojs"]
path = src/js/cryptojs
url = git://github.com/gwjjeff/cryptojs.git
[submodule "js/sjcl"]
path = js/sjcl
[submodule "src/js/sjcl"]
path = src/js/sjcl
url = git://github.com/bitwiseshiftleft/sjcl.git

View File

@@ -1,5 +1,5 @@
#
# Newcoin - SConstruct
# Ripple - SConstruct
#
import glob
@@ -37,8 +37,8 @@ else:
#
# Put objects files in their own directory.
#
for dir in ['src', 'database', 'json', 'websocketpp']:
VariantDir('obj/'+dir, dir, duplicate=0)
for dir in ['ripple', 'database', 'json', 'websocketpp']:
VariantDir('build/obj/'+dir, 'src/cpp/'+dir, duplicate=0)
# Use openssl
env.ParseConfig('pkg-config --cflags --libs openssl')
@@ -68,22 +68,23 @@ if OSX:
env.Append(LINKFLAGS = ['-L/usr/local/Cellar/openssl/1.0.1c/lib'])
env.Append(CXXFLAGS = ['-I/usr/local/Cellar/openssl/1.0.1c/include'])
DB_SRCS = glob.glob('database/*.c') + glob.glob('database/*.cpp')
JSON_SRCS = glob.glob('json/*.cpp')
DB_SRCS = glob.glob('src/cpp/database/*.c') + glob.glob('src/cpp/database/*.cpp')
JSON_SRCS = glob.glob('src/cpp/json/*.cpp')
WEBSOCKETPP_SRCS = [
'websocketpp/src/base64/base64.cpp',
'websocketpp/src/md5/md5.c',
'websocketpp/src/messages/data.cpp',
'websocketpp/src/network_utilities.cpp',
'websocketpp/src/processors/hybi_header.cpp',
'websocketpp/src/processors/hybi_util.cpp',
'websocketpp/src/sha1/sha1.cpp',
'websocketpp/src/uri.cpp'
'src/cpp/websocketpp/src/base64/base64.cpp',
'src/cpp/websocketpp/src/md5/md5.c',
'src/cpp/websocketpp/src/messages/data.cpp',
'src/cpp/websocketpp/src/network_utilities.cpp',
'src/cpp/websocketpp/src/processors/hybi_header.cpp',
'src/cpp/websocketpp/src/processors/hybi_util.cpp',
'src/cpp/websocketpp/src/sha1/sha1.cpp',
'src/cpp/websocketpp/src/uri.cpp'
]
NEWCOIN_SRCS = glob.glob('src/*.cpp')
PROTO_SRCS = env.Protoc([], 'src/ripple.proto', PROTOCOUTDIR='obj', PROTOCPYTHONOUTDIR=None)
RIPPLE_SRCS = glob.glob('src/cpp/ripple/*.cpp')
PROTO_SRCS = env.Protoc([], 'src/cpp/ripple/ripple.proto', PROTOCOUTDIR='build/proto', PROTOCPYTHONOUTDIR=None)
env.Append(CXXFLAGS = ['-Ibuild/proto'])
env.Clean(PROTO_SRCS, 'site_scons/site_tools/protoc.pyc')
@@ -91,21 +92,21 @@ env.Clean(PROTO_SRCS, 'site_scons/site_tools/protoc.pyc')
UNUSED_SRCS = []
for file in UNUSED_SRCS:
NEWCOIN_SRCS.remove(file)
RIPPLE_SRCS.remove(file)
NEWCOIN_SRCS += DB_SRCS + JSON_SRCS + WEBSOCKETPP_SRCS
RIPPLE_SRCS += DB_SRCS + JSON_SRCS + WEBSOCKETPP_SRCS
# Derive the object files from the source files.
NEWCOIN_OBJS = []
RIPPLE_OBJS = []
for file in NEWCOIN_SRCS:
NEWCOIN_OBJS.append('obj/' + file)
RIPPLE_OBJS += PROTO_SRCS
NEWCOIN_OBJS += PROTO_SRCS
for file in RIPPLE_SRCS:
RIPPLE_OBJS.append('build/obj/' + file[8:])
rippled = env.Program('rippled', NEWCOIN_OBJS)
rippled = env.Program('build/rippled', RIPPLE_OBJS)
tags = env.CTags('obj/tags', NEWCOIN_SRCS)
tags = env.CTags('build/obj/tags', RIPPLE_SRCS)
Default(rippled, tags)

View File

@@ -40,7 +40,7 @@ def ProtocEmitter(target, source, env):
source = source_with_corrected_path
for src in source:
modulename = os.path.splitext(src)[0]
modulename = os.path.splitext(os.path.basename(src))[0]
if env['PROTOCOUTDIR']:
base = os.path.join(env['PROTOCOUTDIR'] , modulename)
@@ -56,8 +56,8 @@ def ProtocEmitter(target, source, env):
pass
# XXX KLUDGE: Force things to be right.
env['PROTOCOUTDIR'] = 'obj/src'
env['PROTOCPROTOPATH'] = ['src']
env['PROTOCOUTDIR'] = 'build/proto'
env['PROTOCPROTOPATH'] = ['src/cpp/ripple']
#~ print "PROTOC SOURCE:", [str(s) for s in source]
#~ print "PROTOC TARGET:", [str(s) for s in target]

View File

@@ -3,8 +3,8 @@
#include <string>
#include <vector>
#include "../src/types.h"
#include "../src/utils.h"
#include "../ripple/types.h"
#include "../ripple/utils.h"
#define SQL_FOREACH(_db, _strQuery) \
if ((_db)->executeSQL(_strQuery)) \

View File

@@ -10,7 +10,7 @@
#include "Application.h"
#include "Ledger.h"
#include "utils.h"
#include "../obj/src/ripple.pb.h"
#include "ripple.pb.h"
#include "PackedMessage.h"
#include "Config.h"
#include "BitcoinUtil.h"

View File

@@ -16,7 +16,7 @@
#include "Peer.h"
#include "TaggedCache.h"
#include "InstanceCounter.h"
#include "../obj/src/ripple.pb.h"
#include "ripple.pb.h"
DEFINE_INSTANCE(PeerSet);

Some files were not shown because too many files have changed in this diff Show More