From c8187e92af1b56eb53b232eb9171c39853d21a59 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 19 Sep 2013 03:50:20 -0700 Subject: [PATCH] Consolidate beast unity sources into 2 ripple sources --- Builds/QtCreator/rippled.pro | 9 ++--- Builds/VisualStudio2012/RippleD.vcxproj | 14 ++++---- .../VisualStudio2012/RippleD.vcxproj.filters | 36 +++++++------------ SConstruct | 12 ++----- src/ripple/beast/ripple_beast.cpp | 26 ++++++++++++++ src/ripple/beast/ripple_beastc.c | 20 +++++++++++ src/ripple/beast/ripple_beastobjc.mm | 18 ++++++++++ 7 files changed, 89 insertions(+), 46 deletions(-) create mode 100644 src/ripple/beast/ripple_beast.cpp create mode 100644 src/ripple/beast/ripple_beastc.c create mode 100644 src/ripple/beast/ripple_beastobjc.mm diff --git a/Builds/QtCreator/rippled.pro b/Builds/QtCreator/rippled.pro index 58709dedec..b2e467429e 100644 --- a/Builds/QtCreator/rippled.pro +++ b/Builds/QtCreator/rippled.pro @@ -63,13 +63,8 @@ UI_HEADERS_DIR += ../../src/ripple_basics # Beast # SOURCES += \ - ../../src/beast/modules/beast_asio/beast_asio.cpp \ - ../../src/beast/modules/beast_core/beast_core.cpp \ - ../../src/beast/modules/beast_crypto/beast_crypto.cpp \ - ../../src/beast/modules/beast_db/beast_db.cpp \ - ../../src/beast/modules/beast_extras/beast_extras.cpp \ - ../../src/beast/modules/beast_sqdb/beast_sqdb.cpp \ - ../../src/beast/modules/beast_sqlite/beast_sqlite.c + ../../src/ripple/beast/ripple_beast.cpp \ + ../../src/ripple/beast/ripple_beastc.c # --------- # Old style diff --git a/Builds/VisualStudio2012/RippleD.vcxproj b/Builds/VisualStudio2012/RippleD.vcxproj index 85e1e29d82..ca85291c6a 100644 --- a/Builds/VisualStudio2012/RippleD.vcxproj +++ b/Builds/VisualStudio2012/RippleD.vcxproj @@ -20,12 +20,8 @@ - - - - - - + + true true @@ -1718,6 +1714,12 @@ + + true + true + true + true + diff --git a/Builds/VisualStudio2012/RippleD.vcxproj.filters b/Builds/VisualStudio2012/RippleD.vcxproj.filters index 46b50e94ec..d650bac435 100644 --- a/Builds/VisualStudio2012/RippleD.vcxproj.filters +++ b/Builds/VisualStudio2012/RippleD.vcxproj.filters @@ -121,9 +121,6 @@ {ddf42dfe-eaad-4275-8cb7-5c02be627366} - - {f669c93c-60da-4674-a693-9eebcddacb6f} - {3debb18d-0f76-4208-accb-f96cb9ce6dab} @@ -175,6 +172,9 @@ {824b1f04-7313-4abb-a3db-6241c7c8a356} + + {458b9099-fcf6-49fe-b3fb-a27beb2ee070} + @@ -732,9 +732,6 @@ [1] Ripple\ripple_net\basics - - [1] Ripple\ripple_app - [1] Ripple\ripple_app\rpc @@ -795,24 +792,6 @@ [0] Libraries\protobuf - - [0] Libraries\beast - - - [0] Libraries\beast - - - [0] Libraries\beast - - - [0] Libraries\beast - - - [0] Libraries\beast - - - [0] Libraries\beast - [1] Ripple\ripple_core\peerfinder @@ -924,6 +903,12 @@ [1] Ripple\ripple_leveldb + + [2] Ripple %28New%29\beast + + + [2] Ripple %28New%29\beast + @@ -1855,6 +1840,9 @@ + + [2] Ripple %28New%29\beast + diff --git a/SConstruct b/SConstruct index a83230810f..74249e688f 100644 --- a/SConstruct +++ b/SConstruct @@ -134,18 +134,12 @@ COMPILED_FILES = [] # ------------------- # Beast unity sources # -COMPILED_FILES.extend([ - 'src/beast/modules/beast_asio/beast_asio.cpp', - 'src/beast/modules/beast_crypto/beast_crypto.cpp', - 'src/beast/modules/beast_db/beast_db.cpp', - 'src/beast/modules/beast_sqdb/beast_sqdb.cpp', - 'src/beast/modules/beast_sqlite/beast_sqlite.c' - ]) if OSX: # OSX: Use the Objective C++ version of beast_core - COMPILED_FILES.extend (['src/beast/modules/beast_core/beast_core.mm']) + COMPILED_FILES.extend (['src/ripple/beast/ripple_beastobjc.mm']) else: - COMPILED_FILES.extend (['src/beast/modules/beast_core/beast_core.cpp']) + COMPILED_FILES.extend (['src/ripple/beast/ripple_beast.cpp']) +COMPILED_FILES.extend (['src/ripple/beast/ripple_beastc.c']) # ------------------------------ # Old-style Ripple unity sources diff --git a/src/ripple/beast/ripple_beast.cpp b/src/ripple/beast/ripple_beast.cpp new file mode 100644 index 0000000000..17b247ed23 --- /dev/null +++ b/src/ripple/beast/ripple_beast.cpp @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +/* + Copyright (c) 2011-2013, OpenCoin, Inc. +*/ +//============================================================================== + +/* This file includes all of the beast sources needed to link. + By including them here, we avoid having to muck with the SConstruct + Makefile, Project file, or whatever. +*/ + +// MUST come first! +#include "BeastConfig.h" + +// Include this to get all the basic includes included, to prevent errors +#include "../beast/modules/beast_core/beast_core.h" + +// Mac builds use ripple_beastobjc.mm +#ifndef BEAST_MAC +# include "../beast/modules/beast_core/beast_core.cpp" +#endif + +#include "../beast/modules/beast_asio/beast_asio.cpp" +#include "../beast/modules/beast_crypto/beast_crypto.cpp" +#include "../beast/modules/beast_db/beast_db.cpp" +#include "../beast/modules/beast_sqdb/beast_sqdb.cpp" diff --git a/src/ripple/beast/ripple_beastc.c b/src/ripple/beast/ripple_beastc.c new file mode 100644 index 0000000000..0a12046c44 --- /dev/null +++ b/src/ripple/beast/ripple_beastc.c @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +/* + Copyright (c) 2011-2013, OpenCoin, Inc. +*/ +//============================================================================== + +/* This file includes all of the C-language beast sources needed to link. + By including them here, we avoid having to muck with the SConstruct + Makefile, Project file, or whatever. + + Note that these sources must be compiled using the C compiler. +*/ + +#include "BeastConfig.h" + +#ifdef __cplusplus +#error "Whoops! This file must be compiled with a C compiler!" +#endif + +#include "../beast/modules/beast_sqlite/beast_sqlite.c" diff --git a/src/ripple/beast/ripple_beastobjc.mm b/src/ripple/beast/ripple_beastobjc.mm new file mode 100644 index 0000000000..a39237e903 --- /dev/null +++ b/src/ripple/beast/ripple_beastobjc.mm @@ -0,0 +1,18 @@ +//------------------------------------------------------------------------------ +/* + Copyright (c) 2011-2013, OpenCoin, Inc. +*/ +//============================================================================== + +/* This file includes all of the beast sources needed to link. + By including them here, we avoid having to muck with the SConstruct + Makefile, Project file, or whatever. +*/ + +// MUST come first! +#include "BeastConfig.h" + +// Include this to get all the basic includes included, to prevent errors +#include "../beast/modules/beast_core/beast_core.h" + +#include "../beast/modules/beast_core/beast_core.cpp"