From cb8c910a0c76900df4c076cca226b56d28820f69 Mon Sep 17 00:00:00 2001 From: "Peter D. Gray" Date: Fri, 12 Jan 2018 11:24:47 -0500 Subject: [PATCH] Makefile: simplify include path, move subdirs to where used in C files --- Makefile | 5 +---- bip32.c | 8 ++++---- bip32.h | 2 +- nem.c | 2 +- nem.h | 2 +- test_check.c | 6 +++--- test_speed.c | 2 +- 7 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index ae23e4456..b1b90259c 100644 --- a/Makefile +++ b/Makefile @@ -24,9 +24,6 @@ CFLAGS += $(OPTFLAGS) \ -Werror CFLAGS += -I. -CFLAGS += -Iaes -CFLAGS += -Ichacha20poly1305 -CFLAGS += -Ied25519-donna CFLAGS += -DUSE_ETHEREUM=1 CFLAGS += -DUSE_GRAPHENE=1 CFLAGS += -DUSE_NEM=1 @@ -56,7 +53,7 @@ SRCS += segwit_addr.c OBJS = $(SRCS:.c=.o) -TESTLIBS = $(shell pkg-config --libs check) -lrt -lpthread -lm +TESTLIBS = $(shell pkg-config --libs check) -lpthread -lm TESTSSLLIBS = -lcrypto all: test_check test_openssl test_speed aes/aestst tools libtrezor-crypto.so diff --git a/bip32.c b/bip32.c index 97588bdda..e6ac015b5 100644 --- a/bip32.c +++ b/bip32.c @@ -25,7 +25,7 @@ #include #include -#include "aes.h" +#include "aes/aes.h" #include "address.h" #include "bignum.h" #include "hmac.h" @@ -39,10 +39,10 @@ #include "curves.h" #include "secp256k1.h" #include "nist256p1.h" -#include "ed25519.h" -#include "ed25519-sha3.h" +#include "ed25519-donna/ed25519.h" +#include "ed25519-donna/ed25519-sha3.h" #if USE_KECCAK -#include "ed25519-keccak.h" +#include "ed25519-donna/ed25519-keccak.h" #endif #if USE_NEM #include "nem.h" diff --git a/bip32.h b/bip32.h index 980f5c850..9e73d75ca 100644 --- a/bip32.h +++ b/bip32.h @@ -28,7 +28,7 @@ #include #include #include "ecdsa.h" -#include "ed25519.h" +#include "ed25519-donna/ed25519.h" #include "options.h" typedef struct { diff --git a/nem.c b/nem.c index 9b0150ea7..f70076498 100644 --- a/nem.c +++ b/nem.c @@ -25,7 +25,7 @@ #include #include "base32.h" -#include "ed25519-keccak.h" +#include "ed25519-donna/ed25519-keccak.h" #include "macros.h" #include "ripemd160.h" #include "sha3.h" diff --git a/nem.h b/nem.h index 14e3203c5..fe7f7b68f 100644 --- a/nem.h +++ b/nem.h @@ -28,7 +28,7 @@ #include #include "bip32.h" -#include "ed25519.h" +#include "ed25519-donna/ed25519.h" #define NEM_LEVY_PERCENTILE_DIVISOR 4 #define NEM_MAX_DIVISIBILITY 6 diff --git a/test_check.c b/test_check.c index 64813e70b..918cd0540 100644 --- a/test_check.c +++ b/test_check.c @@ -36,7 +36,7 @@ #include "options.h" -#include "aes.h" +#include "aes/aes.h" #include "bignum.h" #include "base32.h" #include "base58.h" @@ -53,8 +53,8 @@ #include "curves.h" #include "secp256k1.h" #include "nist256p1.h" -#include "ed25519.h" -#include "ed25519-keccak.h" +#include "ed25519-donna/ed25519.h" +#include "ed25519-donna/ed25519-keccak.h" #include "script.h" #include "rfc6979.h" #include "address.h" diff --git a/test_speed.c b/test_speed.c index 1140b84c8..cff4aee2a 100644 --- a/test_speed.c +++ b/test_speed.c @@ -8,7 +8,7 @@ #include "bip32.h" #include "secp256k1.h" #include "nist256p1.h" -#include "ed25519.h" +#include "ed25519-donna/ed25519.h" #include "hasher.h" static uint8_t msg[256];