From bc581492c48516104941728d4549d8279f7a9136 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Fri, 29 Jul 2016 02:30:58 +0200 Subject: [PATCH] stratum: move blake2s to component algos folder --- stratum/algos/blake2.c | 2 +- stratum/algos/makefile | 2 +- stratum/{algos => sha3}/blake2s.c | 2 +- stratum/{algos => sha3}/blake2s.h | 2 +- stratum/sha3/makefile | 8 ++++++-- 5 files changed, 10 insertions(+), 6 deletions(-) rename stratum/{algos => sha3}/blake2s.c (99%) rename stratum/{algos => sha3}/blake2s.h (99%) diff --git a/stratum/algos/blake2.c b/stratum/algos/blake2.c index 9e5ff66..966d08f 100644 --- a/stratum/algos/blake2.c +++ b/stratum/algos/blake2.c @@ -6,7 +6,7 @@ #include #include -#include "blake2s.h" +#include void blake2s_hash(const char* input, char* output, uint32_t len) { diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 8c269d1..467d06f 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -11,7 +11,7 @@ LDFLAGS=-O2 -lgmp SOURCES=lyra2re.c lyra2v2.c Lyra2.c Sponge.c blake.c scrypt.c c11.c x11.c x13.c sha256.c keccak.c \ x14.c x15.c x17.c nist5.c fresh.c quark.c neoscrypt.c scryptn.c qubit.c skein.c groestl.c \ skein2.c zr5.c bmw.c luffa.c pentablake.c whirlpool.c whirlpoolx.c blakecoin.c \ - blake2.c blake2s.c \ + blake2.c \ yescrypt.c yescrypt-opt.c sha256_Y.c lbry.c \ m7m.c magimath.cpp velvet.c \ argon2a.c ar2/blake2b.c ar2/argon2.c ar2/ref.c ar2/cores.c ar2/ar2-scrypt-jane.c \ diff --git a/stratum/algos/blake2s.c b/stratum/sha3/blake2s.c similarity index 99% rename from stratum/algos/blake2s.c rename to stratum/sha3/blake2s.c index 06f222d..57cae90 100644 --- a/stratum/algos/blake2s.c +++ b/stratum/sha3/blake2s.c @@ -15,7 +15,7 @@ #include #include -#include +#include "sph_types.h" #include "blake2s.h" diff --git a/stratum/algos/blake2s.h b/stratum/sha3/blake2s.h similarity index 99% rename from stratum/algos/blake2s.h rename to stratum/sha3/blake2s.h index 7917e56..23f8d90 100644 --- a/stratum/algos/blake2s.h +++ b/stratum/sha3/blake2s.h @@ -25,7 +25,7 @@ #define ALIGN(x) __attribute__((aligned(x))) #endif -#if defined(_MSC_VER) || defined(__x86_64__) || defined(__x86__) +#if defined(_MSC_VER) || defined(__x86_64__) || defined(__x86__) #define NATIVE_LITTLE_ENDIAN #endif diff --git a/stratum/sha3/makefile b/stratum/sha3/makefile index cd924eb..1d3f69f 100644 --- a/stratum/sha3/makefile +++ b/stratum/sha3/makefile @@ -6,7 +6,8 @@ LDFLAGS=-O2 SOURCES=sph_jh.c sph_blake.c sph_bmw.c sph_groestl.c sph_skein.c sph_keccak.c sph_luffa.c sph_cubehash.c sph_shavite.c \ sph_simd.c sph_echo.c sph_fugue.c sph_hamsi.c sph_shabal.c sph_whirlpool.c \ - sph_haval.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c + sph_haval.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c \ + blake2s.c OBJECTS=$(SOURCES:.c=.o) OUTPUT=libhash.a @@ -19,10 +20,13 @@ $(OUTPUT): $(OBJECTS) .cpp.o: $(CC) $(CFLAGS) -c $< - + .c.o: $(CC) $(CFLAGS) -c $< +blake2s.o: blake2s.c + $(CC) $(CFLAGS) -std=gnu99 -c $< + clean: rm *.o