mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
CityHash64 appears to be the fastest available block hashing algorithm that is good enough for dedupe. It takes much less CPU than the CRC64 function, and avoids hash-collision problems with file formats that use CRC64 as an integrity check on 4K block boundaries. Extracted from git://github.com/google/cityhash with the "CRC" hash functions (which require Intel/AMD CPU support) removed. We don't need those, and they introduce a new (if only theoretical) build-time dependency. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
52 lines
952 B
Makefile
52 lines
952 B
Makefile
TAG ?= $(shell git describe --always --dirty || echo UNKNOWN)
|
|
|
|
default: libcrucible.a
|
|
%.a: Makefile
|
|
|
|
CRUCIBLE_OBJS = \
|
|
chatter.o \
|
|
city.o \
|
|
cleanup.o \
|
|
crc64.o \
|
|
error.o \
|
|
extentwalker.o \
|
|
fd.o \
|
|
fs.o \
|
|
ntoa.o \
|
|
path.o \
|
|
process.o \
|
|
string.o \
|
|
task.o \
|
|
time.o \
|
|
uuid.o \
|
|
|
|
include ../makeflags
|
|
include ../Defines.mk
|
|
|
|
BEES_LDFLAGS = $(LDFLAGS)
|
|
|
|
configure.h: configure.h.in
|
|
$(TEMPLATE_COMPILER)
|
|
|
|
.depends:
|
|
mkdir -p $@
|
|
|
|
.depends/%.dep: %.cc configure.h Makefile | .depends
|
|
$(CXX) $(BEES_CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
|
|
|
|
depends.mk: $(CRUCIBLE_OBJS:%.o=.depends/%.dep)
|
|
cat $^ > $@.new
|
|
mv -f $@.new $@
|
|
|
|
.version.cc: configure.h Makefile ../makeflags $(CRUCIBLE_OBJS:.o=.cc) ../include/crucible/*.h
|
|
echo "namespace crucible { const char *VERSION = \"$(TAG)\"; }" > $@.new
|
|
mv -f $@.new $@
|
|
|
|
include depends.mk
|
|
|
|
%.o: %.cc ../makeflags
|
|
$(CXX) $(BEES_CXXFLAGS) -o $@ -c $<
|
|
|
|
libcrucible.a: $(CRUCIBLE_OBJS) .version.o
|
|
$(AR) rcs $@ $^
|