diff options
| author | Quentin Carbonneaux | 2021-11-22 21:02:00 +0100 |
|---|---|---|
| committer | Quentin Carbonneaux | 2021-11-22 21:02:00 +0100 |
| commit | 2ad1fa26bd8803b1a8f4f3ccf4105708a8456a21 (patch) | |
| tree | f1c4d8fc19974cdae8946a46356f0bf6643037ef | |
| parent | 4449eb01936356d030342aedc55f1de3c9232f0b (diff) | |
shuffle some files
| -rw-r--r-- | Makefile | 10 | ||||
| -rw-r--r-- | sdar/gear.h (renamed from sdar/geartab.h) | 0 | ||||
| -rw-r--r-- | sdar/lib/crypto/scrypt.c (renamed from sdar/scrypt.c) | 2 | ||||
| -rw-r--r-- | sdar/lib/crypto/sha256.c (renamed from sdar/sha256.c) | 2 | ||||
| -rw-r--r-- | sdar/lib/crypto/smix.c (renamed from sdar/smix.c) | 2 | ||||
| -rw-r--r-- | sdar/writer.c | 2 |
6 files changed, 11 insertions, 7 deletions
@@ -15,6 +15,9 @@ LZ4INC = sdar/lib/lz4/lib LZ4LIB = sdar/lib/lz4/lib/liblz4.a BLAKE3INC = sdar/lib/BLAKE3/c BLAKE3LIB = obj/blake3.a +CRYPTOLIB = obj/crypto.a +CRYPTOSRC = $(wildcard sdar/lib/crypto/*.c) +CRYPTOOBJ = $(CRYPTOSRC:sdar/%.c=obj/%.o) V = @ @@ -23,21 +26,21 @@ OPT = sdar/sha256.c sdar/smix.c sdar/scrypt.c OBJ = $(SRC:sdar/%.c=obj/%.o) SANFLAGS = -fsanitize=address,undefined -OPTFLAGS = -O2 LDFLAGS += $(SANFLAGS) $(NACLLIB) $(LZ4LIB) $(BLAKE3LIB) CFLAGS += -fno-omit-frame-pointer -std=c11 -Wall -Wextra -pedantic -g CFLAGS += -I$(NACLINC) -I$(LZ4INC) -I$(BLAKE3INC) CFLAGS += -DMMH_KEYSZ=32 -DMMH_VALSZ=16 -DMMH_HDRSZ=8 B3FLAGS = -O3 -DBLAKE3_NO_SSE2 -DBLAKE3_NO_AVX512 +CRFLAGS = -O3 -I sdar -obj/$(BIN): $(OBJ) $(BLAKE3LIB) +obj/$(BIN): $(OBJ) $(BLAKE3LIB) $(CRYPTOOBJ) @test -z "$(V)" || echo "ld $@" $(V)$(CC) $^ -o $@ $(LDFLAGS) obj/%.o: sdar/%.c @test -z "$(V)" || echo "cc $<" $(V)$(CC) $(CFLAGS) \ - $(if $(findstring $<,$(OPT)),$(OPTFLAGS),$(SANFLAGS)) \ + $(if $(findstring $<,$(CRYPTOSRC)),$(CRFLAGS),$(SANFLAGS)) \ -c $< -o $@ $(BLAKE3LIB): obj/timestamp @@ -62,6 +65,7 @@ sdar/lib/timestamp: obj/timestamp: @mkdir -p obj + @mkdir -p obj/lib/crypto @touch $@ $(OBJ): sdar/all.h sdar/mmh.h diff --git a/sdar/geartab.h b/sdar/gear.h index 7f54efc..7f54efc 100644 --- a/sdar/geartab.h +++ b/sdar/gear.h diff --git a/sdar/scrypt.c b/sdar/lib/crypto/scrypt.c index ee3d9aa..3f53e0a 100644 --- a/sdar/scrypt.c +++ b/sdar/lib/crypto/scrypt.c @@ -26,7 +26,7 @@ * This file was originally written by Colin Percival as part of the Tarsnap * online backup system. */ -#include "all.h" +#include "../../all.h" #include <errno.h> #include <stdint.h> #include <stdlib.h> diff --git a/sdar/sha256.c b/sdar/lib/crypto/sha256.c index d0bd43b..edb9018 100644 --- a/sdar/sha256.c +++ b/sdar/lib/crypto/sha256.c @@ -1,4 +1,4 @@ -#include "all.h" +#include "../../all.h" #include <stdint.h> #include <string.h> diff --git a/sdar/smix.c b/sdar/lib/crypto/smix.c index 23e62e6..34068a1 100644 --- a/sdar/smix.c +++ b/sdar/lib/crypto/smix.c @@ -26,7 +26,7 @@ * This file was originally written by Colin Percival as part of the Tarsnap * online backup system. */ -#include "all.h" +#include "../../all.h" static void blkcpy(void *, const void *, size_t); static void blkxor(void *, const void *, size_t); diff --git a/sdar/writer.c b/sdar/writer.c index 2f45858..44cd81d 100644 --- a/sdar/writer.c +++ b/sdar/writer.c @@ -125,7 +125,7 @@ chunkdone(Writer *w, uchar *buf, int sz) return 0; } -#include "geartab.h" +#include "gear.h" static int chunker(Writer *w, int sz) |
