@@ -550,7 +548,8 @@ void Main::refreshBlockChain()
for (auto h = bc.currentHash(); h != bc.genesisHash() && i; h = bc.details(h).parent, --i)
{
auto d = bc.details(h);
- if (blockMatch(filter, d, h, bc))
+ auto bm = blockMatch(filter, d, h, bc);
+ if (bm)
{
QListWidgetItem* blockItem = new QListWidgetItem(QString("#%1 %2").arg(d.number).arg(h.abridged().c_str()), ui->blocks);
auto hba = QByteArray((char const*)h.data(), h.size);
@@ -562,7 +561,7 @@ void Main::refreshBlockChain()
for (auto const& i: RLP(bc.block(h))[1])
{
Transaction t(i[0].data());
- if (transactionMatch(filter, t))
+ if (bm || transactionMatch(filter, t))
{
QString s = t.receiveAddress ?
QString(" %2 %5> %3: %1 [%4]")
@@ -855,9 +854,9 @@ void Main::on_blocks_currentItemChanged()
s << " #" << tx.nonce << "";
s << "
Gas price: " << formatBalance(tx.gasPrice) << "";
s << "
Gas: " << tx.gas << "";
- s << "
V: " << hex << (int)tx.vrs.v << "";
- s << "
R: " << hex << tx.vrs.r << "";
- s << "
S: " << hex << tx.vrs.s << "";
+ s << "
V: " << hex << nouppercase << (int)tx.vrs.v << "";
+ s << "
R: " << hex << nouppercase << tx.vrs.r << "";
+ s << "
S: " << hex << nouppercase << tx.vrs.s << "";
s << "
Msg: " << tx.sha3(false) << "";
if (tx.isCreation())
{
@@ -982,7 +981,6 @@ void Main::on_data_textChanged()
auto asmcode = eth::compileLLLToAsm(src, false);
auto asmcodeopt = eth::compileLLLToAsm(ui->data->toPlainText().toStdString(), true);
m_data = eth::compileLLL(ui->data->toPlainText().toStdString(), true, &errors);
-#ifdef ETH_SERPENT
if (errors.size())
{
try
@@ -997,7 +995,6 @@ void Main::on_data_textChanged()
}
}
else
-#endif
lll = "Opt
" + QString::fromStdString(asmcodeopt).toHtmlEscaped() + "
Pre
" + QString::fromStdString(asmcode).toHtmlEscaped() + "
";
}
QString errs;
diff --git a/libethcore/CMakeLists.txt b/libethcore/CMakeLists.txt
index d2ecdf0b0..925bfdb3b 100644
--- a/libethcore/CMakeLists.txt
+++ b/libethcore/CMakeLists.txt
@@ -1,19 +1,14 @@
cmake_policy(SET CMP0015 NEW)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")
-
aux_source_directory(. SRC_LIST)
set(EXECUTABLE ethcore)
-if(APPLE)
- # set(CMAKE_INSTALL_PREFIX ../lib)
- add_library(${EXECUTABLE} SHARED ${SRC_LIST})
-else()
- add_library(${EXECUTABLE} ${SRC_LIST})
-endif()
+# set(CMAKE_INSTALL_PREFIX ../lib)
+add_library(${EXECUTABLE} SHARED ${SRC_LIST})
+
if (UNIX)
- FIND_PACKAGE(Boost 1.53 REQUIRED COMPONENTS thread date_time system filesystem program_options signals serialization chrono unit_test_framework locale)
+ FIND_PACKAGE(Boost 1.53 REQUIRED COMPONENTS filesystem)
endif()
file(GLOB HEADERS "*.h")
diff --git a/libethential/CMakeLists.txt b/libethential/CMakeLists.txt
index 5ac121018..4a4d6294f 100644
--- a/libethential/CMakeLists.txt
+++ b/libethential/CMakeLists.txt
@@ -6,12 +6,9 @@ aux_source_directory(. SRC_LIST)
set(EXECUTABLE ethential)
-if(APPLE)
- # set(CMAKE_INSTALL_PREFIX ../lib)
- add_library(${EXECUTABLE} SHARED ${SRC_LIST})
-else()
- add_library(${EXECUTABLE} ${SRC_LIST})
-endif()
+# set(CMAKE_INSTALL_PREFIX ../lib)
+add_library(${EXECUTABLE} SHARED ${SRC_LIST})
+
file(GLOB HEADERS "*.h")
include_directories(..)
@@ -40,10 +37,6 @@ else ()
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
endif ()
-if (UNIX)
- FIND_PACKAGE(Boost 1.53 REQUIRED COMPONENTS thread date_time system filesystem program_options signals serialization chrono unit_test_framework locale)
-endif()
-
message("Installation path: ${CMAKE_INSTALL_PREFIX}")
install( TARGETS ${EXECUTABLE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib )
diff --git a/libethereum/CMakeLists.txt b/libethereum/CMakeLists.txt
index 3f73df2a7..80f25c085 100644
--- a/libethereum/CMakeLists.txt
+++ b/libethereum/CMakeLists.txt
@@ -6,15 +6,9 @@ aux_source_directory(. SRC_LIST)
set(EXECUTABLE ethereum)
-if(APPLE)
- # set(CMAKE_INSTALL_PREFIX ../lib)
- add_library(${EXECUTABLE} SHARED ${SRC_LIST})
-else()
- add_library(${EXECUTABLE} ${SRC_LIST})
-endif()
-if (UNIX)
- FIND_PACKAGE(Boost 1.53 REQUIRED COMPONENTS thread date_time system filesystem program_options signals serialization chrono unit_test_framework locale)
-endif()
+# set(CMAKE_INSTALL_PREFIX ../lib)
+add_library(${EXECUTABLE} SHARED ${SRC_LIST})
+
file(GLOB HEADERS "*.h")
include_directories(..)
diff --git a/libethereum/State.cpp b/libethereum/State.cpp
index 77f1088b8..48e16d2e5 100644
--- a/libethereum/State.cpp
+++ b/libethereum/State.cpp
@@ -1195,9 +1195,9 @@ std::ostream& eth::operator<<(std::ostream& _out, State const& _s)
for (auto const& j: mem)
if (j.second)
- contout << std::endl << (delta.count(j.first) ? back.count(j.first) ? " * " : " + " : cached.count(j.first) ? " . " : " ") << std::hex << std::setw(64) << j.first << ": " << std::setw(0) << j.second ;
+ contout << std::endl << (delta.count(j.first) ? back.count(j.first) ? " * " : " + " : cached.count(j.first) ? " . " : " ") << std::hex << nouppercase << std::setw(64) << j.first << ": " << std::setw(0) << j.second ;
else
- contout << std::endl << "XXX " << std::hex << std::setw(64) << j.first << "";
+ contout << std::endl << "XXX " << std::hex << nouppercase << std::setw(64) << j.first << "";
}
else
contout << " [SIMPLE]";
@@ -1239,14 +1239,14 @@ std::ostream& eth::operator<<(std::ostream& _out, AccountDiff const& _s)
_out << "(" << std::showpos << (((bigint)_s.balance.to()) - ((bigint)_s.balance.from())) << std::noshowpos << ") ";
}
if (_s.code)
- _out << "$" << std::hex << _s.code.to() << " (" << _s.code.from() << ") ";
+ _out << "$" << std::hex << nouppercase << _s.code.to() << " (" << _s.code.from() << ") ";
for (pair> const& i: _s.storage)
if (!i.second.from())
- _out << endl << " + " << (h256)i.first << ": " << std::hex << i.second.to();
+ _out << endl << " + " << (h256)i.first << ": " << std::hex << nouppercase << i.second.to();
else if (!i.second.to())
- _out << endl << "XXX " << (h256)i.first << " (" << std::hex << i.second.from() << ")";
+ _out << endl << "XXX " << (h256)i.first << " (" << std::hex << nouppercase << i.second.from() << ")";
else
- _out << endl << " * " << (h256)i.first << ": " << std::hex << i.second.to() << " (" << i.second.from() << ")";
+ _out << endl << " * " << (h256)i.first << ": " << std::hex << nouppercase << i.second.to() << " (" << i.second.from() << ")";
return _out;
}
diff --git a/libevm/CMakeLists.txt b/libevm/CMakeLists.txt
index 257710b56..c20ece1bb 100644
--- a/libevm/CMakeLists.txt
+++ b/libevm/CMakeLists.txt
@@ -6,15 +6,9 @@ aux_source_directory(. SRC_LIST)
set(EXECUTABLE evm)
-if(APPLE)
- # set(CMAKE_INSTALL_PREFIX ../lib)
- add_library(${EXECUTABLE} SHARED ${SRC_LIST})
-else()
- add_library(${EXECUTABLE} ${SRC_LIST})
-endif()
-if (UNIX)
- FIND_PACKAGE(Boost 1.53 REQUIRED COMPONENTS thread date_time system filesystem program_options signals serialization chrono unit_test_framework locale)
-endif()
+# set(CMAKE_INSTALL_PREFIX ../lib)
+add_library(${EXECUTABLE} SHARED ${SRC_LIST})
+
file(GLOB HEADERS "*.h")
include_directories(..)
diff --git a/libevmface/CMakeLists.txt b/libevmface/CMakeLists.txt
index 30091074d..7da6bf90c 100644
--- a/libevmface/CMakeLists.txt
+++ b/libevmface/CMakeLists.txt
@@ -6,12 +6,9 @@ aux_source_directory(. SRC_LIST)
set(EXECUTABLE evmface)
-if(APPLE)
- # set(CMAKE_INSTALL_PREFIX ../lib)
- add_library(${EXECUTABLE} SHARED ${SRC_LIST})
-else()
- add_library(${EXECUTABLE} ${SRC_LIST})
-endif()
+# set(CMAKE_INSTALL_PREFIX ../lib)
+add_library(${EXECUTABLE} SHARED ${SRC_LIST})
+
file(GLOB HEADERS "*.h")
include_directories(..)
@@ -40,10 +37,6 @@ else ()
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
endif ()
-if (UNIX)
- FIND_PACKAGE(Boost 1.53 REQUIRED COMPONENTS thread date_time system filesystem program_options signals serialization chrono unit_test_framework locale)
-endif()
-
message("Installation path: ${CMAKE_INSTALL_PREFIX}")
install( TARGETS ${EXECUTABLE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib )
diff --git a/liblll/Assembly.h b/liblll/Assembly.h
index 29f899c0e..3e8a83260 100644
--- a/liblll/Assembly.h
+++ b/liblll/Assembly.h
@@ -70,8 +70,8 @@ class Assembly
public:
AssemblyItem newTag() { return AssemblyItem(Tag, m_usedTags++); }
AssemblyItem newPushTag() { return AssemblyItem(PushTag, m_usedTags++); }
- AssemblyItem newData(bytes const& _data) { auto h = sha3(_data); m_data[h] = _data; return AssemblyItem(PushData, h); }
- AssemblyItem newPushString(std::string const& _data) { auto h = sha3(_data); m_strings[h] = _data; return AssemblyItem(PushString, h); }
+ AssemblyItem newData(bytes const& _data) { h256 h = (u256)std::hash()(asString(_data)); m_data[h] = _data; return AssemblyItem(PushData, h); }
+ AssemblyItem newPushString(std::string const& _data) { h256 h = (u256)std::hash()(_data); m_strings[h] = _data; return AssemblyItem(PushString, h); }
AssemblyItem append() { return append(newTag()); }
void append(Assembly const& _a);
diff --git a/liblll/CMakeLists.txt b/liblll/CMakeLists.txt
index 4117e6edc..2356b7d9d 100644
--- a/liblll/CMakeLists.txt
+++ b/liblll/CMakeLists.txt
@@ -6,27 +6,20 @@ aux_source_directory(. SRC_LIST)
set(EXECUTABLE lll)
-if(APPLE)
- # set(CMAKE_INSTALL_PREFIX ../lib)
- add_library(${EXECUTABLE} SHARED ${SRC_LIST})
-else()
- add_library(${EXECUTABLE} ${SRC_LIST})
-endif()
-if (UNIX)
- FIND_PACKAGE(Boost 1.53 REQUIRED COMPONENTS thread date_time system filesystem program_options signals serialization chrono unit_test_framework locale)
-endif()
+# set(CMAKE_INSTALL_PREFIX ../lib)
+add_library(${EXECUTABLE} SHARED ${SRC_LIST})
+
file(GLOB HEADERS "*.h")
include_directories(..)
-target_link_libraries(${EXECUTABLE} ethential)
+
target_link_libraries(${EXECUTABLE} evmface)
+target_link_libraries(${EXECUTABLE} ethential)
target_link_libraries(${EXECUTABLE} gmp)
+
if(${TARGET_PLATFORM} STREQUAL "w64")
- include_directories(/usr/x86_64-w64-mingw32/include/cryptopp)
- target_link_libraries(${EXECUTABLE} cryptopp)
target_link_libraries(${EXECUTABLE} boost_system-mt-s)
- target_link_libraries(${EXECUTABLE} boost_filesystem-mt-s)
target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)
target_link_libraries(${EXECUTABLE} iphlpapi)
target_link_libraries(${EXECUTABLE} ws2_32)
@@ -34,23 +27,16 @@ if(${TARGET_PLATFORM} STREQUAL "w64")
target_link_libraries(${EXECUTABLE} shlwapi)
elseif (APPLE)
# Latest mavericks boost libraries only come with -mt
- target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LIBRARIES})
target_link_libraries(${EXECUTABLE} boost_system-mt)
- target_link_libraries(${EXECUTABLE} boost_filesystem-mt)
target_link_libraries(${EXECUTABLE} boost_thread-mt)
find_package(Threads REQUIRED)
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
elseif (UNIX)
- target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${Boost_SYSTEM_LIBRARY})
- target_link_libraries(${EXECUTABLE} ${Boost_FILESYSTEM_LIBRARY})
target_link_libraries(${EXECUTABLE} ${Boost_THREAD_LIBRARY})
- target_link_libraries(${EXECUTABLE} ${Boost_DATE_TIME_LIBRARY})
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
else ()
- target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LIBRARIES})
target_link_libraries(${EXECUTABLE} boost_system)
- target_link_libraries(${EXECUTABLE} boost_filesystem)
target_link_libraries(${EXECUTABLE} boost_thread)
find_package(Threads REQUIRED)
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp
index 2ad23471d..f0aeb860c 100644
--- a/liblll/CodeFragment.cpp
+++ b/liblll/CodeFragment.cpp
@@ -26,7 +26,6 @@
#include
#include
#include
-#include
#include "CompilerState.h"
using namespace std;
using namespace eth;
diff --git a/libpyserpent/CMakeLists.txt b/libpyserpent/CMakeLists.txt
new file mode 100644
index 000000000..5c4c9d165
--- /dev/null
+++ b/libpyserpent/CMakeLists.txt
@@ -0,0 +1,58 @@
+cmake_policy(SET CMP0015 NEW)
+
+aux_source_directory(. SRC_LIST)
+
+set(EXECUTABLE pyserpent)
+
+# set(CMAKE_INSTALL_PREFIX ../lib)
+add_library(${EXECUTABLE} SHARED ${SRC_LIST})
+
+if (UNIX)
+ FIND_PACKAGE(Boost 1.53 REQUIRED COMPONENTS python)
+endif()
+file(GLOB HEADERS "*.h")
+
+include_directories(..)
+
+add_definitions(-DETH_PYTHON)
+include_directories(${PYTHON_ID})
+target_link_libraries(${EXECUTABLE} ${PYTHON_LS})
+
+target_link_libraries(${EXECUTABLE} serpent)
+target_link_libraries(${EXECUTABLE} lll)
+target_link_libraries(${EXECUTABLE} evmface)
+target_link_libraries(${EXECUTABLE} ethential)
+target_link_libraries(${EXECUTABLE} gmp)
+target_link_libraries(${EXECUTABLE} gmp)
+
+#g++ $(CXXFLAGS) -shared $(PLATFORM_OPTS) $(TARGET).o -L$(BOOST_LIB) -lboost_python -L/usr/lib/python$(PYTHON_VERSION)/config -lpython$(PYTHON_VERSION) $(COMMON_OBJS) -o $(TARGET).so
+
+if(${TARGET_PLATFORM} STREQUAL "w64")
+ target_link_libraries(${EXECUTABLE} boost_python_win32-mt-s)
+ target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)
+ target_link_libraries(${EXECUTABLE} iphlpapi)
+ target_link_libraries(${EXECUTABLE} ws2_32)
+ target_link_libraries(${EXECUTABLE} mswsock)
+ target_link_libraries(${EXECUTABLE} shlwapi)
+elseif (APPLE)
+ # Latest mavericks boost libraries only come with -mt
+ target_link_libraries(${EXECUTABLE} boost_python-mt)
+ target_link_libraries(${EXECUTABLE} boost_thread-mt)
+ find_package(Threads REQUIRED)
+ target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
+elseif (UNIX)
+ target_link_libraries(${EXECUTABLE} ${Boost_PYTHON_LIBRARY})
+ target_link_libraries(${EXECUTABLE} ${Boost_THREAD_LIBRARY})
+ target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
+else ()
+ target_link_libraries(${EXECUTABLE} boost_python)
+ target_link_libraries(${EXECUTABLE} boost_thread)
+ find_package(Threads REQUIRED)
+ target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
+endif ()
+
+message("Installation path: ${CMAKE_INSTALL_PREFIX}")
+
+install( TARGETS ${EXECUTABLE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib )
+install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} )
+
diff --git a/libpyserpent/pyserpent.cpp b/libpyserpent/pyserpent.cpp
new file mode 100644
index 000000000..c8f5a38b9
--- /dev/null
+++ b/libpyserpent/pyserpent.cpp
@@ -0,0 +1,132 @@
+#include
+#include
+#include
+#include
+
+// Provide a python wrapper for the C++ functions
+
+using namespace boost::python;
+
+//std::vector to python list converter
+//http://stackoverflow.com/questions/5314319/how-to-export-stdvector
+template
+struct VecToList
+{
+ static PyObject* convert(const std::vector& vec)
+ {
+ boost::python::list* l = new boost::python::list();
+ for(size_t i = 0; i < vec.size(); i++)
+ (*l).append(vec[i]);
+
+ return l->ptr();
+ }
+};
+
+// python list to std::vector converter
+//http://code.activestate.com/lists/python-cplusplus-sig/16463/
+template
+struct Vector_from_python_list
+{
+
+ Vector_from_python_list()
+ {
+ using namespace boost::python;
+ using namespace boost::python::converter;
+ registry::push_back(&Vector_from_python_list::convertible,
+ &Vector_from_python_list::construct,
+ type_id
+>());
+
+ }
+
+ // Determine if obj_ptr can be converted in a std::vector
+ static void* convertible(PyObject* obj_ptr)
+ {
+ if (!PyList_Check(obj_ptr)){
+ return 0;
+ }
+ return obj_ptr;
+ }
+
+ // Convert obj_ptr into a std::vector
+ static void construct(
+ PyObject* obj_ptr,
+ boost::python::converter::rvalue_from_python_stage1_data* data)
+ {
+ using namespace boost::python;
+ // Extract the character data from the python string
+ // const char* value = PyString_AsString(obj_ptr);
+ list l(handle<>(borrowed(obj_ptr)));
+
+ // // Verify that obj_ptr is a string (should be ensured by convertible())
+ // assert(value);
+
+ // Grab pointer to memory into which to construct the new std::vector
+ void* storage = (
+ (boost::python::converter::rvalue_from_python_storage
+>*)
+
+ data)->storage.bytes;
+
+ // in-place construct the new std::vector using the character data
+ // extraced from the python object
+ std::vector& v = *(new (storage) std::vector());
+
+ // populate the vector from list contains !!!
+ int le = len(l);
+ v.resize(le);
+ for(int i = 0;i!=le;++i){
+ v[i] = extract(l[i]);
+ }
+
+ // Stash the memory chunk pointer for later use by boost.python
+ data->convertible = storage;
+ }
+};
+
+std::string printMetadata(Metadata m) {
+ return "["+m.file+" "+intToDecimal(m.ln)+" "+intToDecimal(m.ch)+"]";
+}
+
+BOOST_PYTHON_FUNCTION_OVERLOADS(tokenize_overloads, tokenize, 1, 2);
+BOOST_PYTHON_FUNCTION_OVERLOADS(printast_overloads, printAST, 1, 2);
+BOOST_PYTHON_FUNCTION_OVERLOADS(parselll_overloads, parseLLL, 1, 2);
+//BOOST_PYTHON_FUNCTION_OVERLOADS(metadata_overloads, Metadata, 0, 3);
+BOOST_PYTHON_MODULE(pyserpent)
+{
+ def("tokenize", tokenize, tokenize_overloads());
+ def("parse", parseSerpent);
+ def("parseLLL", parseLLL, parselll_overloads());
+ def("rewrite", rewrite);
+ def("compile_to_lll", compileToLLL);
+ def("encode_datalist", encodeDatalist);
+ def("decode_datalist", decodeDatalist);
+ def("compile_lll", compileLLL);
+ def("assemble", assemble);
+ def("deserialize", deserialize);
+ def("dereference", dereference);
+ def("flatten", flatten);
+ def("serialize", serialize);
+ def("compile", compile);
+ def("pretty_compile", prettyCompile);
+ def("pretty_assemble", prettyAssemble);
+ //class_("Node",init<>())
+ to_python_converter >,
+ VecToList >();
+ to_python_converter >,
+ VecToList >();
+ Vector_from_python_list();
+ Vector_from_python_list();
+ class_("Metadata",init<>())
+ .def(init())
+ .def("__str__", printMetadata)
+ .def("__repr__", printMetadata)
+ ;
+ class_("Node",init<>())
+ .def(init<>())
+ .def("__str__", printAST, printast_overloads())
+ .def("__repr__", printAST, printast_overloads())
+ ;
+ //class_("Vector",init<>())
+ // .def(init<>());
+}
diff --git a/libqethereum/CMakeLists.txt b/libqethereum/CMakeLists.txt
index 880aadb17..146ec2e60 100644
--- a/libqethereum/CMakeLists.txt
+++ b/libqethereum/CMakeLists.txt
@@ -50,12 +50,10 @@ if (APPLE)
set(MACOSX_BUNDLE_GUI_IDENTIFIER "${PROJECT_DOMAIN_SECOND}.${PROJECT_DOMAIN_FIRST}")
set(MACOSX_BUNDLE_BUNDLE_NAME ${EXECUTABLE})
include(BundleUtilities)
-
- add_library(${EXECUTABLE} SHARED ${RESOURCE_ADDED} ${SRC_LIST})
-else ()
- add_library(${EXECUTABLE} ${RESOURCE_ADDED} ${SRC_LIST})
endif ()
+add_library(${EXECUTABLE} SHARED ${RESOURCE_ADDED} ${SRC_LIST})
+
qt5_use_modules(${EXECUTABLE} Core Gui WebKit WebKitWidgets Widgets Network Quick Qml)
target_link_libraries(${EXECUTABLE} ethereum secp256k1 ${CRYPTOPP_LIBRARIES})
diff --git a/libserpent/CMakeLists.txt b/libserpent/CMakeLists.txt
index 0deb6f604..a0768c32f 100644
--- a/libserpent/CMakeLists.txt
+++ b/libserpent/CMakeLists.txt
@@ -6,30 +6,20 @@ aux_source_directory(. SRC_LIST)
set(EXECUTABLE serpent)
-if(APPLE)
- # set(CMAKE_INSTALL_PREFIX ../lib)
- add_library(${EXECUTABLE} SHARED ${SRC_LIST})
-else()
- add_library(${EXECUTABLE} ${SRC_LIST})
-endif()
-if (UNIX)
- FIND_PACKAGE(Boost 1.53 REQUIRED COMPONENTS thread date_time system filesystem program_options signals serialization chrono unit_test_framework locale)
-endif()
+# set(CMAKE_INSTALL_PREFIX ../lib)
+add_library(${EXECUTABLE} SHARED ${SRC_LIST})
+
file(GLOB HEADERS "*.h")
include_directories(..)
-target_link_libraries(${EXECUTABLE} ethential)
-target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} lll)
+target_link_libraries(${EXECUTABLE} evmface)
+target_link_libraries(${EXECUTABLE} ethential)
target_link_libraries(${EXECUTABLE} gmp)
if(${TARGET_PLATFORM} STREQUAL "w64")
- include_directories(/usr/x86_64-w64-mingw32/include/cryptopp)
- target_link_libraries(${EXECUTABLE} cryptopp)
- target_link_libraries(${EXECUTABLE} boost_system-mt-s)
- target_link_libraries(${EXECUTABLE} boost_filesystem-mt-s)
target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)
target_link_libraries(${EXECUTABLE} iphlpapi)
target_link_libraries(${EXECUTABLE} ws2_32)
@@ -37,23 +27,13 @@ if(${TARGET_PLATFORM} STREQUAL "w64")
target_link_libraries(${EXECUTABLE} shlwapi)
elseif (APPLE)
# Latest mavericks boost libraries only come with -mt
- target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LIBRARIES})
- target_link_libraries(${EXECUTABLE} boost_system-mt)
- target_link_libraries(${EXECUTABLE} boost_filesystem-mt)
target_link_libraries(${EXECUTABLE} boost_thread-mt)
find_package(Threads REQUIRED)
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
elseif (UNIX)
- target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LIBRARIES})
- target_link_libraries(${EXECUTABLE} ${Boost_SYSTEM_LIBRARY})
- target_link_libraries(${EXECUTABLE} ${Boost_FILESYSTEM_LIBRARY})
target_link_libraries(${EXECUTABLE} ${Boost_THREAD_LIBRARY})
- target_link_libraries(${EXECUTABLE} ${Boost_DATE_TIME_LIBRARY})
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
else ()
- target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LIBRARIES})
- target_link_libraries(${EXECUTABLE} boost_system)
- target_link_libraries(${EXECUTABLE} boost_filesystem)
target_link_libraries(${EXECUTABLE} boost_thread)
find_package(Threads REQUIRED)
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
diff --git a/lllc/CMakeLists.txt b/lllc/CMakeLists.txt
index 1188f1b5b..2146c192a 100644
--- a/lllc/CMakeLists.txt
+++ b/lllc/CMakeLists.txt
@@ -8,18 +8,6 @@ set(EXECUTABLE lllc)
add_executable(${EXECUTABLE} ${SRC_LIST})
-if (JSONRPC_LS)
- add_definitions(-DETH_JSONRPC)
- include_directories(${JSONRPC_ID})
- target_link_libraries(${EXECUTABLE} ${JSONRPC_LS})
-endif ()
-
-if (READLINE_LS)
- add_definitions(-DETH_READLINE)
- include_directories(${READLINE_ID})
- target_link_libraries(${EXECUTABLE} ${READLINE_LS})
-endif ()
-
if (${TARGET_PLATFORM} STREQUAL "w64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
target_link_libraries(${EXECUTABLE} gcc)
@@ -28,24 +16,17 @@ if (${TARGET_PLATFORM} STREQUAL "w64")
target_link_libraries(${EXECUTABLE} mswsock)
target_link_libraries(${EXECUTABLE} shlwapi)
target_link_libraries(${EXECUTABLE} iphlpapi)
- target_link_libraries(${EXECUTABLE} cryptopp)
- target_link_libraries(${EXECUTABLE} boost_system-mt-s)
- target_link_libraries(${EXECUTABLE} boost_filesystem-mt-s)
target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
elseif (UNIX)
else ()
- target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LIBRARIES})
- target_link_libraries(${EXECUTABLE} boost_system)
- target_link_libraries(${EXECUTABLE} boost_filesystem)
find_package(Threads REQUIRED)
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
endif ()
target_link_libraries(${EXECUTABLE} lll)
-target_link_libraries(${EXECUTABLE} ethcore)
-target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LS})
-target_link_libraries(${EXECUTABLE} ${LEVELDB_LS})
+target_link_libraries(${EXECUTABLE} evmface)
+target_link_libraries(${EXECUTABLE} ethential)
target_link_libraries(${EXECUTABLE} gmp)
install( TARGETS ${EXECUTABLE} DESTINATION bin )
diff --git a/sc/CMakeLists.txt b/sc/CMakeLists.txt
new file mode 100644
index 000000000..5b5024c40
--- /dev/null
+++ b/sc/CMakeLists.txt
@@ -0,0 +1,35 @@
+cmake_policy(SET CMP0015 NEW)
+
+aux_source_directory(. SRC_LIST)
+
+include_directories(..)
+
+set(EXECUTABLE sc)
+
+add_executable(${EXECUTABLE} ${SRC_LIST})
+
+if (${TARGET_PLATFORM} STREQUAL "w64")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
+ target_link_libraries(${EXECUTABLE} gcc)
+ target_link_libraries(${EXECUTABLE} gdi32)
+ target_link_libraries(${EXECUTABLE} ws2_32)
+ target_link_libraries(${EXECUTABLE} mswsock)
+ target_link_libraries(${EXECUTABLE} shlwapi)
+ target_link_libraries(${EXECUTABLE} iphlpapi)
+ target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)
+ set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
+elseif (UNIX)
+else ()
+ find_package(Threads REQUIRED)
+ target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
+endif ()
+
+target_link_libraries(${EXECUTABLE} serpent)
+target_link_libraries(${EXECUTABLE} lll)
+target_link_libraries(${EXECUTABLE} evmface)
+target_link_libraries(${EXECUTABLE} ethential)
+target_link_libraries(${EXECUTABLE} gmp)
+
+install( TARGETS ${EXECUTABLE} DESTINATION bin )
+
+cmake_policy(SET CMP0015 NEW)
diff --git a/sc/cmdline.cpp b/sc/cmdline.cpp
new file mode 100644
index 000000000..71d9928b2
--- /dev/null
+++ b/sc/cmdline.cpp
@@ -0,0 +1,106 @@
+#include
+#include
+#include
+#include