commit 9656eb836d021be15e48d06a9d75ae210131185a
parent 893ee1895fb91a98344ba68192d2e9ad678bc203
Author: sin <sin@2f30.org>
Date: Thu, 21 Feb 2019 10:58:28 +0000
Add config.h
Diffstat:
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
@@ -4,7 +4,16 @@ MANPREFIX = $(PREFIX)/man
BIN = dedup
SRC = $(BIN).c chunker.c hash.c pack.c unpack.c
OBJ = $(BIN).o chunker.o hash.o pack.o unpack.o
-DISTFILES = $(SRC) LICENSE Makefile README arg.h $(BIN).1 dedup.h tree.h
+DISTFILES = \
+ $(SRC) \
+ LICENSE \
+ Makefile \
+ README \
+ arg.h \
+ config.h \
+ $(BIN).1 \
+ dedup.h \
+ tree.h
CFLAGS = -g -Wall
CPPFLAGS = -I/usr/local/include -D_FILE_OFFSET_BITS=64
@@ -13,7 +22,7 @@ LDLIBS = -lcrypto -llz4
all: $(BIN)
-$(OBJ): arg.h tree.h dedup.h
+$(OBJ): arg.h config.h tree.h dedup.h
clean:
rm -f $(OBJ) $(BIN) $(BIN)-$(VERSION).tar.gz
diff --git a/config.h b/config.h
@@ -0,0 +1,3 @@
+#define BLKSIZE 4096
+#define WINSIZE 511
+#define HASHMSK ((1ul << 10) - 1)
diff --git a/dedup.h b/dedup.h
@@ -1,6 +1,4 @@
-#define BLKSIZE 4096
-#define WINSIZE 511
-#define HASHMSK ((1ul << 10) - 1)
+#include "config.h"
struct chunker;