Skip to content

heropan/Elastos.ELA.SPV.Cpp

 
 

Repository files navigation

Elastos SPV C++

Ubuntu & macOS GitHub license GitHub Releases

Summary

This repository is a basic library aimed to provide serials of wallet-related interfaces.

Build Guide

Make sure your computer has installed the required packages below:

Download this repository using Git:

$ git clone git@github.com:elastos/Elastos.ELA.SPV.Cpp.git

Build on Ubuntu/MacOS

For MacOS, you need to run command below to use toolchain of xcode

$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
$ xcrun -find clang
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang

And then, build

$ cd YOUR-PATH/Elastos.ELA.SPV.Cpp
$ cd Build
$ mkdir host && cd host
$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=YOUR-INSTALL-PATH ../..
$ make -j NCPU && make install

Build for IOS

  1. Architecture (arm64)

     $ cd YOUR-PATH/Elastos.ELA.SPV.Cpp
     $ cd Build
     $ mkdir iphoneos && cd iphoneos
     $ cmake -IOS_PLATFORM=iphoneos -DCMAKE_TOOLCHAIN_FILE=../../CMake/iOSToolchain.cmake -DCMAKE_INSTALL_PREFIX=YOUR-INSTALL-PATH ../..
     $ make -j NCPU && make install
  2. Simulator (x86_64)

    $ cd YOUR-PATH/Elastos.ELA.SPV.Cpp
    $ cd Build
    $ mkdir iphonesimulator && cd iphonesimulator
    $ cmake -IOS_PLATFORM=iphonesimulator -DCMAKE_TOOLCHAIN_FILE=../../CMake/iOSToolchain.cmake -DCMAKE_INSTALL_PREFIX=YOUR-INSTALL-PATH ../..
    $ make -j NCPU && make install

Build for Android

NDK version: r16+

To generate the required Makefile in the current directory, please make sure to first replace 'YOUR-TARGET-ARCHITECTURE' and 'YOUR-ANDROID-NDK-HOME' with the correct option and path.

-DANDROID_ABI accepts the following target architecture options:

  • armeabi-v7a
  • arm64-v8a
  • x86
  • x86_64
$ cd YOUR-PATH/Elastos.ELA.SPV.Cpp
$ cd Build
$ mkdir android
$ cd android
$ cmake -DANDROID_ABI=YOUR-TARGET-ARCHITECTURE -DANDROID_NDK_HOME=YOUR-ANDROID-NDK-HOME -DCMAKE_TOOLCHAIN_FILE=../../CMake/AndroidToolchain.cmake -DCMAKE_INSTALL_PREFIX=YOUR-INSTALL-PATH ../..
$ make -j NCPU && make install

Interface Document

$ cd /Users/xxx/dev/Elastos.ELA.SPV.Cpp
$ ./doxygen.sh

The documents will generate in the doc/ directory.

Development

Patches are welcome. Please submit pull requests against the dev branch.

More

Learn more about this repository please refer to the following links:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 96.9%
  • C 1.4%
  • CMake 1.4%
  • Shell 0.3%