Gav Wood
11 years ago
7 changed files with 124 additions and 13 deletions
@ -0,0 +1,51 @@ |
|||||
|
cmake_policy(SET CMP0015 NEW) |
||||
|
|
||||
|
aux_source_directory(. SRC_LIST) |
||||
|
|
||||
|
include_directories(..) |
||||
|
|
||||
|
set(EXECUTABLE exp) |
||||
|
|
||||
|
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) |
||||
|
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} 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} ethereum) |
||||
|
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LS}) |
||||
|
target_link_libraries(${EXECUTABLE} ${LEVELDB_LS}) |
||||
|
target_link_libraries(${EXECUTABLE} gmp) |
||||
|
|
||||
|
install( TARGETS ${EXECUTABLE} DESTINATION bin ) |
||||
|
|
@ -0,0 +1,44 @@ |
|||||
|
/*
|
||||
|
This file is part of cpp-ethereum. |
||||
|
|
||||
|
cpp-ethereum is free software: you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation, either version 3 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
cpp-ethereum is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License |
||||
|
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
/** @file main.cpp
|
||||
|
* @author Gav Wood <i@gavwood.com> |
||||
|
* @date 2014 |
||||
|
* Ethereum client. |
||||
|
*/ |
||||
|
|
||||
|
#include <libethsupport/Log.h> |
||||
|
#include <libethsupport/Common.h> |
||||
|
#include <libethsupport/CommonData.h> |
||||
|
#include "BuildInfo.h" |
||||
|
using namespace std; |
||||
|
using namespace eth; |
||||
|
|
||||
|
int main(int, char**) |
||||
|
{ |
||||
|
u256 z = 0; |
||||
|
u256 s = 7; |
||||
|
u256 ms = z - s; |
||||
|
s256 ams = -7; |
||||
|
s256 sms = u2s(ms); |
||||
|
cnote << sms; |
||||
|
cnote << ams; |
||||
|
cnote << ms; |
||||
|
u256 t = 3; |
||||
|
s256 st = u2s(t); |
||||
|
cnote << ms << t << (sms % t) << sms << st << (s2u(sms % st) + 70); |
||||
|
return 0; |
||||
|
} |
Loading…
Reference in new issue