Browse Source

Fix Xcode/cmake 3.19 build + cleaning

master
Johan Pascal 4 years ago
parent
commit
0bd56f5a17
3 changed files with 13 additions and 10 deletions
  1. +7
    -3
      src/generator/curve25519/CMakeLists.txt
  2. +6
    -3
      src/generator/ed448goldilocks/CMakeLists.txt
  3. +0
    -4
      src/include/word.h

+ 7
- 3
src/generator/curve25519/CMakeLists.txt View File

@@ -75,10 +75,13 @@ add_custom_command(
COMMENT "Generating code for include/decaf/ed255.hxx"
)

add_custom_target(generatorCurve25519AndGenTablesCommon DEPENDS
${GSOURCE_PATH}/c/curve25519/decaf.c
${GSOURCE_PATH}/c/curve25519/scalar.c
)
add_custom_target(generatorCurve25519 DEPENDS
generatorP25519
${GSOURCE_PATH}/c/curve25519/scalar.c
${GSOURCE_PATH}/c/curve25519/decaf.c
generatorCurve25519AndGenTablesCommon
${GSOURCE_PATH}/c/curve25519/elligator.c
${GSOURCE_PATH}/c/curve25519/eddsa.c
${GSOURCE_PATH}/include/decaf/point_255.hxx
@@ -91,10 +94,11 @@ include_directories(
)

add_executable(decaf_gen_tables_curve25519 EXCLUDE_FROM_ALL ${GSOURCE_PATH}/c/curve25519/decaf_gen_tables.c
${GSOURCE_PATH}/c/curve25519/decaf.c
${GSOURCE_PATH}/c/curve25519/decaf.c
${GSOURCE_PATH}/c/curve25519/scalar.c
${PROJECT_SOURCE_DIR}/src/utils.c
$<TARGET_OBJECTS:p25519>)
add_dependencies(decaf_gen_tables_curve25519 generatorCurve25519AndGenTablesCommon)

add_custom_target(decaf_tables_curve25519
COMMAND decaf_gen_tables_curve25519 > ${PROJECT_SOURCE_DIR}/src/curve25519/decaf_tables.c


+ 6
- 3
src/generator/ed448goldilocks/CMakeLists.txt View File

@@ -82,11 +82,13 @@ add_custom_command(
COMMENT "Generating code for include/decaf/ed448.hxx"
)


add_custom_target(generatorEd448AndGenTablesCommon DEPENDS
${GSOURCE_PATH}/c/ed448goldilocks/scalar.c
${GSOURCE_PATH}/c/ed448goldilocks/decaf.c
)
add_custom_target(generatorEd448goldilocks DEPENDS
generatorP448
${GSOURCE_PATH}/c/ed448goldilocks/scalar.c
${GSOURCE_PATH}/c/ed448goldilocks/decaf.c
generatorEd448AndGenTablesCommon
${GSOURCE_PATH}/c/ed448goldilocks/elligator.c
${GSOURCE_PATH}/c/ed448goldilocks/eddsa.c
${GSOURCE_PATH}/include/decaf/point_448.hxx
@@ -103,6 +105,7 @@ add_executable(decaf_gen_tables_ed448goldilocks EXCLUDE_FROM_ALL ${GSOURCE_PATH}
${GSOURCE_PATH}/c/ed448goldilocks/scalar.c
${PROJECT_SOURCE_DIR}/src/utils.c
$<TARGET_OBJECTS:p448>)
add_dependencies(decaf_gen_tables_ed448goldilocks generatorEd448AndGenTablesCommon)

add_custom_target(decaf_tables_ed448goldilocks
COMMAND decaf_gen_tables_ed448goldilocks > ${PROJECT_SOURCE_DIR}/src/ed448goldilocks/decaf_tables.c


+ 0
- 4
src/include/word.h View File

@@ -50,16 +50,12 @@ extern int posix_memalign(void **, size_t, size_t);

#if (ARCH_WORD_BITS == 64)
typedef uint64_t word_t, mask_t;
static const mask_t DECAF_MASK_ALL_SET = (mask_t)0xFFFFFFFFFFFFFFFF;
static const mask_t DECAF_MASK_ALL_UNSET = (mask_t)0x0;
typedef __uint128_t dword_t;
typedef int32_t hsword_t;
typedef int64_t sword_t;
typedef __int128_t dsword_t;
#elif (ARCH_WORD_BITS == 32)
typedef uint32_t word_t, mask_t;
static const mask_t DECAF_MASK_ALL_SET = (mask_t)0xFFFFFFFF;
static const mask_t DECAF_MASK_ALL_UNSET = (mask_t)0x0;
typedef uint64_t dword_t;
typedef int16_t hsword_t;
typedef int32_t sword_t;


Loading…
Cancel
Save