diff --git a/.travis.yml b/.travis.yml index a0c49916..8413daae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,11 +4,11 @@ os: - linux env: - - ENV="-DBUILD_TYPE=test -DUSE_UECC_LIB=ON" TEST=yes - - ENV="-DBUILD_TYPE=test -DUSE_UECC_LIB=OFF" TEST=yes - - ENV="-DBUILD_TYPE=firmware -DUSE_UECC_LIB=ON" TEST=no - - ENV="-DBUILD_TYPE=bootloader -DUSE_UECC_LIB=ON" TEST=no -# - ENV="-DBUILD_TYPE=firmware -DUSE_UECC_LIB=OFF" TEST=no # secp lib too big at the moment + - ENV="-DBUILD_TYPE=test -DUSE_UECC_LIB=ON" TEST=yes + - ENV="-DBUILD_TYPE=test -DUSE_UECC_LIB=OFF" TEST=yes + - ENV="-DBUILD_TYPE=bootloader -DUSE_UECC_LIB=ON" TEST=no # use the smaller ecc lib + - ENV="-DBUILD_TYPE=firmware -DUSE_UECC_LIB=OFF" TEST=no +# - ENV="-DBUILD_TYPE=firmware -DUSE_UECC_LIB=ON" TEST=no compiler: - clang diff --git a/CMakeLists.txt b/CMakeLists.txt index b1487845..9fc9f5d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,11 @@ project(${MYPROJECT} C) #----------------------------------------------------------------------------- # Options for building +if(BUILD_TYPE STREQUAL "bootloader") option(USE_UECC_LIB "Use micro ECC instead bitcoin's secp256k1 library." ON) +else() +option(USE_UECC_LIB "Use micro ECC instead bitcoin's secp256k1 library." OFF) +endif() option(BUILD_COVERAGE "Compile with test coverage flags." OFF) option(BUILD_VALGRIND "Compile with debug symbols." OFF) option(BUILD_DOCUMENTATION "Build the Doxygen documentation." OFF) @@ -90,6 +94,8 @@ endif() if(USE_UECC_LIB) add_definitions(-DECC_USE_UECC_LIB) +else() + add_definitions(-DSECP256K1_BUILD=1) endif() diff --git a/src/secp256k1 b/src/secp256k1 index e1b9c302..d2226dc5 160000 --- a/src/secp256k1 +++ b/src/secp256k1 @@ -1 +1 @@ -Subproject commit e1b9c302d84d3b730f3102b55ae00a4cba754418 +Subproject commit d2226dc5ddef244a31f0707861736d609df02de7