diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:40:55 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:40:55 +0100 |
| commit | 5d8dfe892a2ea89f706ee140c3bdcfd89fe03fda (patch) | |
| tree | 1acdfa5220cd13b7be43a2a01368e80d306473ca /examples/redis-unstable/deps/xxhash/Makefile | |
| parent | c7ab12bba64d9c20ccd79b132dac475f7bc3923e (diff) | |
| download | crep-5d8dfe892a2ea89f706ee140c3bdcfd89fe03fda.tar.gz | |
Add Redis source code for testing
Diffstat (limited to 'examples/redis-unstable/deps/xxhash/Makefile')
| -rw-r--r-- | examples/redis-unstable/deps/xxhash/Makefile | 687 |
1 files changed, 687 insertions, 0 deletions
diff --git a/examples/redis-unstable/deps/xxhash/Makefile b/examples/redis-unstable/deps/xxhash/Makefile new file mode 100644 index 0000000..a9fa95a --- /dev/null +++ b/examples/redis-unstable/deps/xxhash/Makefile | |||
| @@ -0,0 +1,687 @@ | |||
| 1 | # ################################################################ | ||
| 2 | # xxHash Makefile | ||
| 3 | # Copyright (C) 2012-2024 Yann Collet | ||
| 4 | # | ||
| 5 | # GPL v2 License | ||
| 6 | # | ||
| 7 | # This program is free software; you can redistribute it and/or modify | ||
| 8 | # it under the terms of the GNU General Public License as published by | ||
| 9 | # the Free Software Foundation; either version 2 of the License, or | ||
| 10 | # (at your option) any later version. | ||
| 11 | # | ||
| 12 | # This program is distributed in the hope that it will be useful, | ||
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | # GNU General Public License for more details. | ||
| 16 | # | ||
| 17 | # You should have received a copy of the GNU General Public License along | ||
| 18 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
| 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 20 | # | ||
| 21 | # You can contact the author at: | ||
| 22 | # - xxHash homepage: https://www.xxhash.com | ||
| 23 | # - xxHash source repository: https://github.com/Cyan4973/xxHash | ||
| 24 | # ################################################################ | ||
| 25 | # xxhsum: provides 32/64 bits hash of one or multiple files, or stdin | ||
| 26 | # ################################################################ | ||
| 27 | |||
| 28 | # Version numbers | ||
| 29 | SED ?= sed | ||
| 30 | SED_ERE_OPT ?= -E | ||
| 31 | LIBVER_MAJOR_SCRIPT:=`$(SED) -n '/define XXH_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < xxhash.h` | ||
| 32 | LIBVER_MINOR_SCRIPT:=`$(SED) -n '/define XXH_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < xxhash.h` | ||
| 33 | LIBVER_PATCH_SCRIPT:=`$(SED) -n '/define XXH_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < xxhash.h` | ||
| 34 | LIBVER_MAJOR := $(shell echo $(LIBVER_MAJOR_SCRIPT)) | ||
| 35 | LIBVER_MINOR := $(shell echo $(LIBVER_MINOR_SCRIPT)) | ||
| 36 | LIBVER_PATCH := $(shell echo $(LIBVER_PATCH_SCRIPT)) | ||
| 37 | LIBVER := $(LIBVER_MAJOR).$(LIBVER_MINOR).$(LIBVER_PATCH) | ||
| 38 | |||
| 39 | MAKEFLAGS += --no-print-directory | ||
| 40 | CFLAGS ?= -O3 | ||
| 41 | DEBUGFLAGS+=-Wall -Wextra -Wconversion -Wcast-qual -Wcast-align -Wshadow \ | ||
| 42 | -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ | ||
| 43 | -Wstrict-prototypes -Wundef -Wpointer-arith -Wformat-security \ | ||
| 44 | -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ | ||
| 45 | -Wredundant-decls -Wstrict-overflow=2 | ||
| 46 | CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) | ||
| 47 | FLAGS = $(CFLAGS) $(CPPFLAGS) | ||
| 48 | XXHSUM_VERSION = $(LIBVER) | ||
| 49 | |||
| 50 | # Define *.exe as extension for Windows systems | ||
| 51 | ifneq (,$(filter Windows%,$(OS))) | ||
| 52 | EXT =.exe | ||
| 53 | else | ||
| 54 | EXT = | ||
| 55 | endif | ||
| 56 | |||
| 57 | # automatically enable runtime vector dispatch on x86/64 targets | ||
| 58 | detect_x86_arch = $(shell $(CC) -dumpmachine | grep -E 'i[3-6]86|x86_64') | ||
| 59 | ifneq ($(strip $(call detect_x86_arch)),) | ||
| 60 | #note: can be overridden at compile time, by setting DISPATCH=0 | ||
| 61 | DISPATCH ?= 1 | ||
| 62 | else | ||
| 63 | ifeq ($(DISPATCH),1) | ||
| 64 | $(info "Note: DISPATCH=1 is only supported on x86/x64 targets") | ||
| 65 | endif | ||
| 66 | override DISPATCH := 0 | ||
| 67 | endif | ||
| 68 | |||
| 69 | ifeq ($(NODE_JS),1) | ||
| 70 | # Link in unrestricted filesystem support | ||
| 71 | LDFLAGS += -sNODERAWFS | ||
| 72 | # Set flag to fix isatty() support | ||
| 73 | CPPFLAGS += -DXSUM_NODE_JS=1 | ||
| 74 | endif | ||
| 75 | |||
| 76 | # OS X linker doesn't support -soname, and use different extension | ||
| 77 | # see: https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html | ||
| 78 | UNAME ?= $(shell uname) | ||
| 79 | ifeq ($(UNAME), Darwin) | ||
| 80 | SHARED_EXT = dylib | ||
| 81 | SHARED_EXT_MAJOR = $(LIBVER_MAJOR).$(SHARED_EXT) | ||
| 82 | SHARED_EXT_VER = $(LIBVER).$(SHARED_EXT) | ||
| 83 | SONAME_FLAGS = -install_name $(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR) -compatibility_version $(LIBVER_MAJOR) -current_version $(LIBVER) | ||
| 84 | else | ||
| 85 | SONAME_FLAGS = -Wl,-soname=libxxhash.$(SHARED_EXT).$(LIBVER_MAJOR) | ||
| 86 | SHARED_EXT = so | ||
| 87 | SHARED_EXT_MAJOR = $(SHARED_EXT).$(LIBVER_MAJOR) | ||
| 88 | SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER) | ||
| 89 | endif | ||
| 90 | |||
| 91 | LIBXXH = libxxhash.$(SHARED_EXT_VER) | ||
| 92 | |||
| 93 | CLI_DIR = cli | ||
| 94 | CLI_SRCS = $(wildcard $(CLI_DIR)/*.c) | ||
| 95 | CLI_OBJS = $(CLI_SRCS:.c=.o) | ||
| 96 | |||
| 97 | ## define default before including multiconf.make | ||
| 98 | ## generate CLI and libraries in release mode (default for `make`) | ||
| 99 | .PHONY: default | ||
| 100 | default: DEBUGFLAGS= | ||
| 101 | default: lib xxhsum_and_links | ||
| 102 | |||
| 103 | C_SRCDIRS = . $(CLI_DIR) fuzz | ||
| 104 | include build/make/multiconf.make | ||
| 105 | |||
| 106 | .PHONY: all | ||
| 107 | all: lib xxhsum xxhsum_inlinedXXH | ||
| 108 | |||
| 109 | ## xxhsum is the command line interface (CLI) | ||
| 110 | ifeq ($(DISPATCH),1) | ||
| 111 | xxhsum: CPPFLAGS += -DXXHSUM_DISPATCH=1 | ||
| 112 | XXHSUM_ADD_O = xxh_x86dispatch.o | ||
| 113 | endif | ||
| 114 | $(eval $(call c_program,xxhsum,xxhash.o $(CLI_OBJS) $(XXHSUM_ADD_O))) | ||
| 115 | |||
| 116 | .PHONY: xxhsum_and_links | ||
| 117 | xxhsum_and_links: xxhsum xxh32sum xxh64sum xxh128sum xxh3sum | ||
| 118 | |||
| 119 | LN ?= ln | ||
| 120 | |||
| 121 | xxh32sum xxh64sum xxh128sum xxh3sum: xxhsum | ||
| 122 | $(LN) -sf $<$(EXT) $@$(EXT) | ||
| 123 | |||
| 124 | ## generate CLI in 32-bits mode | ||
| 125 | xxhsum32: CFLAGS += -m32 | ||
| 126 | ifeq ($(DISPATCH),1) | ||
| 127 | xxhsum32: CPPFLAGS += -DXXHSUM_DISPATCH=1 | ||
| 128 | endif | ||
| 129 | $(eval $(call c_program,xxhsum32,xxhash.o $(CLI_OBJS) $(XXHSUM_ADD_O))) | ||
| 130 | |||
| 131 | ## Warning: dispatch only works for x86/x64 systems | ||
| 132 | dispatch: CPPFLAGS += -DXXHSUM_DISPATCH=1 | ||
| 133 | $(eval $(call c_program,dispatch,xxhash.o xxh_x86dispatch.o $(CLI_OBJS))) | ||
| 134 | |||
| 135 | xxhsum_inlinedXXH: CPPFLAGS += -DXXH_INLINE_ALL | ||
| 136 | $(eval $(call c_program,xxhsum_inlinedXXH,$(CLI_OBJS))) | ||
| 137 | |||
| 138 | |||
| 139 | # ================================================= | ||
| 140 | # library | ||
| 141 | |||
| 142 | libxxhash.a: | ||
| 143 | $(eval $(call static_library,libxxhash.a,xxhash.o)) | ||
| 144 | |||
| 145 | $(LIBXXH): LDFLAGS += $(SONAME_FLAGS) | ||
| 146 | ifeq (,$(filter Windows%,$(OS))) | ||
| 147 | $(LIBXXH): CFLAGS += -fPIC | ||
| 148 | endif | ||
| 149 | LIBXXHASH_OBJS := xxhash.o $(if $(filter 1,$(LIBXXH_DISPATCH)),xxh_x86dispatch.o) | ||
| 150 | $(eval $(call c_dynamic_library,$(LIBXXH),$(LIBXXHASH_OBJS))) | ||
| 151 | |||
| 152 | libxxhash.$(SHARED_EXT_MAJOR): $(LIBXXH) | ||
| 153 | $(LN) -sf $< $@ | ||
| 154 | |||
| 155 | libxxhash.$(SHARED_EXT): libxxhash.$(SHARED_EXT_MAJOR) | ||
| 156 | $(LN) -sf $< $@ | ||
| 157 | |||
| 158 | .PHONY: libxxhash ## generate dynamic xxhash library | ||
| 159 | libxxhash: $(LIBXXH) libxxhash.$(SHARED_EXT_MAJOR) libxxhash.$(SHARED_EXT) | ||
| 160 | |||
| 161 | .PHONY: lib ## generate static and dynamic xxhash libraries | ||
| 162 | lib: libxxhash.a libxxhash | ||
| 163 | |||
| 164 | |||
| 165 | # helper targets | ||
| 166 | |||
| 167 | AWK ?= awk | ||
| 168 | GREP ?= grep | ||
| 169 | SORT ?= sort | ||
| 170 | NM ?= nm | ||
| 171 | |||
| 172 | .PHONY: list | ||
| 173 | list: ## list all Makefile targets | ||
| 174 | $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | $(AWK) -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | $(SORT) | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs | ||
| 175 | |||
| 176 | .PHONY: help | ||
| 177 | help: ## list documented targets | ||
| 178 | $(GREP) -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \ | ||
| 179 | $(SORT) | \ | ||
| 180 | $(AWK) 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
| 181 | |||
| 182 | .PHONY: clean | ||
| 183 | clean: | ||
| 184 | $(RM) -r *.dSYM # Mac OS-X specific | ||
| 185 | $(RM) core *.o *.obj *.$(SHARED_EXT) *.$(SHARED_EXT).* *.a libxxhash.pc | ||
| 186 | $(RM) xxhsum.wasm xxhsum.js xxhsum.html | ||
| 187 | $(RM) xxh32sum$(EXT) xxh64sum$(EXT) xxh128sum$(EXT) xxh3sum$(EXT) | ||
| 188 | $(RM) fuzzer | ||
| 189 | $(MAKE) -C tests clean | ||
| 190 | $(MAKE) -C tests/bench clean | ||
| 191 | $(MAKE) -C tests/collisions clean | ||
| 192 | @echo cleaning completed | ||
| 193 | |||
| 194 | |||
| 195 | # ================================================= | ||
| 196 | # tests | ||
| 197 | # ================================================= | ||
| 198 | |||
| 199 | # make check can be run with cross-compiled binaries on emulated environments (qemu user mode) | ||
| 200 | # by setting $(RUN_ENV) to the target emulation environment | ||
| 201 | .PHONY: check | ||
| 202 | check: xxhsum test_sanity ## basic tests for xxhsum CLI, set RUN_ENV for emulated environments | ||
| 203 | # stdin | ||
| 204 | # If you get "Wrong parameters" on Emscripten+Node.js, recompile with `NODE_JS=1` | ||
| 205 | $(RUN_ENV) ./xxhsum$(EXT) < xxhash.c | ||
| 206 | # multiple files | ||
| 207 | $(RUN_ENV) ./xxhsum$(EXT) xxhash.* | ||
| 208 | # internal bench | ||
| 209 | $(RUN_ENV) ./xxhsum$(EXT) -bi0 | ||
| 210 | # long bench command | ||
| 211 | $(RUN_ENV) ./xxhsum$(EXT) --benchmark-all -i0 | ||
| 212 | # bench multiple variants | ||
| 213 | $(RUN_ENV) ./xxhsum$(EXT) -b1,2,3 -i0 | ||
| 214 | # file bench | ||
| 215 | $(RUN_ENV) ./xxhsum$(EXT) -bi0 xxhash.c | ||
| 216 | # 32-bit | ||
| 217 | $(RUN_ENV) ./xxhsum$(EXT) -H0 xxhash.c | ||
| 218 | # 128-bit | ||
| 219 | $(RUN_ENV) ./xxhsum$(EXT) -H2 xxhash.c | ||
| 220 | # XXH3 (enforce BSD style) | ||
| 221 | $(RUN_ENV) ./xxhsum$(EXT) -H3 xxhash.c | grep "XXH3" | ||
| 222 | # request incorrect variant | ||
| 223 | $(RUN_ENV) ./xxhsum$(EXT) -H9 xxhash.c ; test $$? -eq 1 | ||
| 224 | @printf "\n ....... checks completed successfully ....... \n" | ||
| 225 | |||
| 226 | .PHONY: test-unicode | ||
| 227 | test-unicode: | ||
| 228 | $(MAKE) -C tests test_unicode | ||
| 229 | |||
| 230 | .PHONY: test_sanity | ||
| 231 | test_sanity: | ||
| 232 | $(MAKE) -C tests test_sanity | ||
| 233 | |||
| 234 | .PHONY: test-mem | ||
| 235 | VALGRIND = valgrind --leak-check=yes --error-exitcode=1 | ||
| 236 | test-mem: RUN_ENV = $(VALGRIND) | ||
| 237 | test-mem: xxhsum check | ||
| 238 | |||
| 239 | .PHONY: test32 | ||
| 240 | test32: xxhsum32 | ||
| 241 | @echo ---- test 32-bit ---- | ||
| 242 | ./xxhsum32 -bi0 xxhash.c | ||
| 243 | |||
| 244 | TEST_FILES = xxhsum$(EXT) xxhash.c xxhash.h | ||
| 245 | .PHONY: test-xxhsum-c | ||
| 246 | test-xxhsum-c: xxhsum | ||
| 247 | # xxhsum to/from pipe | ||
| 248 | ./xxhsum $(TEST_FILES) | ./xxhsum -c - | ||
| 249 | ./xxhsum -H0 $(TEST_FILES) | ./xxhsum -c - | ||
| 250 | # xxhsum -c is unable to verify checksum of file from STDIN (#470) | ||
| 251 | ./xxhsum < README.md > .test.README.md.xxh | ||
| 252 | ./xxhsum -c .test.README.md.xxh < README.md | ||
| 253 | # xxhsum -q does not display "Loading" message into stderr (#251) | ||
| 254 | ! ./xxhsum -q $(TEST_FILES) 2>&1 | grep Loading | ||
| 255 | # xxhsum does not display "Loading" message into stderr either | ||
| 256 | ! ./xxhsum $(TEST_FILES) 2>&1 | grep Loading | ||
| 257 | # Check that xxhsum do display filename that it failed to open. | ||
| 258 | LC_ALL=C ./xxhsum nonexistent 2>&1 | grep "Error: Could not open 'nonexistent'" | ||
| 259 | # xxhsum to/from file, shell redirection | ||
| 260 | ./xxhsum $(TEST_FILES) > .test.xxh64 | ||
| 261 | ./xxhsum --tag $(TEST_FILES) > .test.xxh64_tag | ||
| 262 | ./xxhsum --little-endian $(TEST_FILES) > .test.le_xxh64 | ||
| 263 | ./xxhsum --tag --little-endian $(TEST_FILES) > .test.le_xxh64_tag | ||
| 264 | ./xxhsum -H0 $(TEST_FILES) > .test.xxh32 | ||
| 265 | ./xxhsum -H0 --tag $(TEST_FILES) > .test.xxh32_tag | ||
| 266 | ./xxhsum -H0 --little-endian $(TEST_FILES) > .test.le_xxh32 | ||
| 267 | ./xxhsum -H0 --tag --little-endian $(TEST_FILES) > .test.le_xxh32_tag | ||
| 268 | ./xxhsum -H2 $(TEST_FILES) > .test.xxh128 | ||
| 269 | ./xxhsum -H2 --tag $(TEST_FILES) > .test.xxh128_tag | ||
| 270 | ./xxhsum -H2 --little-endian $(TEST_FILES) > .test.le_xxh128 | ||
| 271 | ./xxhsum -H2 --tag --little-endian $(TEST_FILES) > .test.le_xxh128_tag | ||
| 272 | ./xxhsum -H3 $(TEST_FILES) > .test.xxh3 | ||
| 273 | ./xxhsum -H3 --tag $(TEST_FILES) > .test.xxh3_tag | ||
| 274 | ./xxhsum -H3 --little-endian $(TEST_FILES) > .test.le_xxh3 | ||
| 275 | ./xxhsum -H3 --tag --little-endian $(TEST_FILES) > .test.le_xxh3_tag | ||
| 276 | ./xxhsum -c .test.xxh* | ||
| 277 | ./xxhsum -c --little-endian .test.le_xxh* | ||
| 278 | ./xxhsum -c .test.*_tag | ||
| 279 | # read list of files from stdin | ||
| 280 | ./xxhsum -c < .test.xxh32 | ||
| 281 | ./xxhsum -c < .test.xxh64 | ||
| 282 | ./xxhsum -c < .test.xxh128 | ||
| 283 | ./xxhsum -c < .test.xxh3 | ||
| 284 | cat .test.xxh* | ./xxhsum -c - | ||
| 285 | # check variant with '*' marker as second separator | ||
| 286 | $(SED) 's/ / \*/' .test.xxh32 | ./xxhsum -c | ||
| 287 | # bsd-style output | ||
| 288 | ./xxhsum --tag xxhsum* | $(GREP) XXH64 | ||
| 289 | ./xxhsum --tag -H0 xxhsum* | $(GREP) XXH32 | ||
| 290 | ./xxhsum --tag -H1 xxhsum* | $(GREP) XXH64 | ||
| 291 | ./xxhsum --tag -H2 xxhsum* | $(GREP) XXH128 | ||
| 292 | ./xxhsum --tag -H3 xxhsum* | $(GREP) XXH3 | ||
| 293 | ./xxhsum -H3 xxhsum* | $(GREP) XXH3_ # prefix for GNU format | ||
| 294 | ./xxhsum --tag -H32 xxhsum* | $(GREP) XXH32 | ||
| 295 | ./xxhsum --tag -H64 xxhsum* | $(GREP) XXH64 | ||
| 296 | ./xxhsum --tag -H128 xxhsum* | $(GREP) XXH128 | ||
| 297 | ./xxhsum --tag -H0 --little-endian xxhsum* | $(GREP) XXH32_LE | ||
| 298 | ./xxhsum --tag -H1 --little-endian xxhsum* | $(GREP) XXH64_LE | ||
| 299 | ./xxhsum --tag -H2 --little-endian xxhsum* | $(GREP) XXH128_LE | ||
| 300 | ./xxhsum --tag -H3 --little-endian xxhsum* | $(GREP) XXH3_LE | ||
| 301 | ./xxhsum --tag -H32 --little-endian xxhsum* | $(GREP) XXH32_LE | ||
| 302 | ./xxhsum --tag -H64 --little-endian xxhsum* | $(GREP) XXH64_LE | ||
| 303 | ./xxhsum --tag -H128 --little-endian xxhsum* | $(GREP) XXH128_LE | ||
| 304 | # check bsd-style | ||
| 305 | ./xxhsum --tag xxhsum* | ./xxhsum -c | ||
| 306 | ./xxhsum --tag -H32 --little-endian xxhsum* | ./xxhsum -c | ||
| 307 | # xxhsum -c warns improperly format lines. | ||
| 308 | echo '12345678 ' >>.test.xxh32 | ||
| 309 | ./xxhsum -c .test.xxh32 | $(GREP) improperly | ||
| 310 | echo '123456789 file' >>.test.xxh64 | ||
| 311 | ./xxhsum -c .test.xxh64 | $(GREP) improperly | ||
| 312 | # Expects "FAILED" | ||
| 313 | echo "0000000000000000 LICENSE" | ./xxhsum -c -; test $$? -eq 1 | ||
| 314 | echo "00000000 LICENSE" | ./xxhsum -c -; test $$? -eq 1 | ||
| 315 | # Expects "FAILED open or read" | ||
| 316 | echo "0000000000000000 test-expects-file-not-found" | ./xxhsum -c -; test $$? -eq 1 | ||
| 317 | echo "00000000 test-expects-file-not-found" | ./xxhsum -c -; test $$? -eq 1 | ||
| 318 | # --filelist | ||
| 319 | echo xxhash.c > .test.filenames | ||
| 320 | $(RUN_ENV) ./xxhsum$(EXT) --filelist .test.filenames | ||
| 321 | # --filelist from stdin | ||
| 322 | cat .test.filenames | $(RUN_ENV) ./xxhsum$(EXT) --filelist | ||
| 323 | @$(RM) .test.* | ||
| 324 | |||
| 325 | CC_VERSION := $(shell $(CC) --version 2>/dev/null) | ||
| 326 | ifneq (,$(findstring clang,$(CC_VERSION))) | ||
| 327 | fuzzer: CFLAGS += -fsanitize=fuzzer | ||
| 328 | $(eval $(call c_program,fuzzer, fuzz/fuzzer.o xxhash.o)) | ||
| 329 | else | ||
| 330 | fuzzer: this_target_requires_clang # intentional fail | ||
| 331 | endif | ||
| 332 | |||
| 333 | .PHONY: test-filename-escape | ||
| 334 | test-filename-escape: | ||
| 335 | $(MAKE) -C tests test_filename_escape | ||
| 336 | |||
| 337 | .PHONY: test-cli-comment-line | ||
| 338 | test-cli-comment-line: | ||
| 339 | $(MAKE) -C tests test_cli_comment_line | ||
| 340 | |||
| 341 | .PHONY: test-cli-ignore-missing | ||
| 342 | test-cli-ignore-missing: | ||
| 343 | $(MAKE) -C tests test_cli_ignore_missing | ||
| 344 | |||
| 345 | .PHONY: armtest | ||
| 346 | armtest: | ||
| 347 | @echo ---- test ARM compilation ---- | ||
| 348 | CC=arm-linux-gnueabi-gcc MOREFLAGS="-Werror -static" $(MAKE) xxhsum | ||
| 349 | |||
| 350 | .PHONY: arm64test | ||
| 351 | arm64test: | ||
| 352 | @echo ---- test ARM64 compilation ---- | ||
| 353 | CC=aarch64-linux-gnu-gcc MOREFLAGS="-Werror -static" $(MAKE) xxhsum | ||
| 354 | |||
| 355 | .PHONY: clangtest | ||
| 356 | clangtest: | ||
| 357 | @echo ---- test clang compilation ---- | ||
| 358 | CC=clang MOREFLAGS="-Werror -Wconversion -Wno-sign-conversion" $(MAKE) all | ||
| 359 | |||
| 360 | .PHONY: gcc-og-test | ||
| 361 | gcc-og-test: | ||
| 362 | @echo ---- test gcc -Og compilation ---- | ||
| 363 | CFLAGS="-Og -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror -fPIC" CPPFLAGS="-DXXH_NO_INLINE_HINTS" MOREFLAGS="-Werror" $(MAKE) all | ||
| 364 | |||
| 365 | .PHONY: cxxtest | ||
| 366 | cxxtest: | ||
| 367 | @echo ---- test C++ compilation ---- | ||
| 368 | CC="$(CXX) -Wno-deprecated" $(MAKE) all CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror -fPIC" | ||
| 369 | |||
| 370 | # In strict C90 mode, there is no `long long` type support, | ||
| 371 | # consequently, only XXH32 can be compiled. | ||
| 372 | .PHONY: c90test | ||
| 373 | ifeq ($(NO_C90_TEST),true) | ||
| 374 | c90test: | ||
| 375 | @echo no c90 compatibility test | ||
| 376 | else | ||
| 377 | c90test: CPPFLAGS += -DXXH_NO_LONG_LONG | ||
| 378 | c90test: CFLAGS += -std=c90 -Werror -pedantic | ||
| 379 | c90test: xxhash.c | ||
| 380 | @echo ---- test strict C90 compilation [xxh32 only] ---- | ||
| 381 | $(RM) xxhash.o | ||
| 382 | $(CC) $(FLAGS) $^ -c | ||
| 383 | $(NM) xxhash.o | $(GREP) XXH64 ; test $$? -eq 1 | ||
| 384 | $(RM) xxhash.o | ||
| 385 | endif | ||
| 386 | |||
| 387 | .PHONY: noxxh3test | ||
| 388 | noxxh3test: CPPFLAGS += -DXXH_NO_XXH3 | ||
| 389 | noxxh3test: CFLAGS += -Werror -pedantic -Wno-long-long # XXH64 requires long long support | ||
| 390 | noxxh3test: OFILE = xxh_noxxh3.o | ||
| 391 | noxxh3test: xxhash.c | ||
| 392 | @echo ---- test compilation without XXH3 ---- | ||
| 393 | $(CC) $(FLAGS) -c $^ -o $(OFILE) | ||
| 394 | $(NM) $(OFILE) | $(GREP) XXH3_ ; test $$? -eq 1 | ||
| 395 | $(RM) $(OFILE) | ||
| 396 | |||
| 397 | .PHONY: nostreamtest | ||
| 398 | nostreamtest: CPPFLAGS += -DXXH_NO_STREAM | ||
| 399 | nostreamtest: CFLAGS += -Werror -pedantic -Wno-long-long # XXH64 requires long long support | ||
| 400 | nostreamtest: OFILE = xxh_nostream.o | ||
| 401 | nostreamtest: xxhash.c | ||
| 402 | @echo ---- test compilation without streaming ---- | ||
| 403 | $(CC) $(FLAGS) -c $^ -o $(OFILE) | ||
| 404 | $(NM) $(OFILE) | $(GREP) update ; test $$? -eq 1 | ||
| 405 | $(RM) $(OFILE) | ||
| 406 | |||
| 407 | .PHONY: nostdlibtest | ||
| 408 | nostdlibtest: CPPFLAGS += -DXXH_NO_STDLIB | ||
| 409 | nostdlibtest: CFLAGS += -Werror -pedantic -Wno-long-long # XXH64 requires long long support | ||
| 410 | nostdlibtest: OFILE = xxh_nostdlib.o | ||
| 411 | nostdlibtest: xxhash.c | ||
| 412 | @echo ---- test compilation without \<stdlib.h\> ---- | ||
| 413 | $(CC) $(FLAGS) -c $^ -o $(OFILE) | ||
| 414 | $(NM) $(OFILE) | $(GREP) "U _free\|U free" ; test $$? -eq 1 | ||
| 415 | $(RM) $(OFILE) | ||
| 416 | |||
| 417 | .PHONY: usan | ||
| 418 | usan: CC=clang | ||
| 419 | usan: CXX=clang++ | ||
| 420 | usan: ## check CLI runtime for undefined behavior, using clang's sanitizer | ||
| 421 | @echo ---- check undefined behavior - sanitize ---- | ||
| 422 | $(MAKE) test CC=$(CC) CXX=$(CXX) MOREFLAGS="-g -fsanitize=undefined -fno-sanitize-recover=all" | ||
| 423 | |||
| 424 | .PHONY: staticAnalyze | ||
| 425 | SCANBUILD ?= scan-build | ||
| 426 | staticAnalyze: clean ## check C source files using $(SCANBUILD) static analyzer | ||
| 427 | @echo ---- static analyzer - $(SCANBUILD) ---- | ||
| 428 | CFLAGS="-g -Werror" $(SCANBUILD) --status-bugs -v $(MAKE) all | ||
| 429 | |||
| 430 | CPPCHECK ?= cppcheck | ||
| 431 | .PHONY: cppcheck | ||
| 432 | cppcheck: ## check C source files using $(CPPCHECK) static analyzer | ||
| 433 | @echo ---- static analyzer - $(CPPCHECK) ---- | ||
| 434 | $(CPPCHECK) . --force --enable=warning,portability,performance,style --error-exitcode=1 > /dev/null | ||
| 435 | |||
| 436 | .PHONY: namespaceTest | ||
| 437 | namespaceTest: ## ensure XXH_NAMESPACE redefines all public symbols | ||
| 438 | $(CC) -c xxhash.c | ||
| 439 | $(CC) -DXXH_NAMESPACE=TEST_ -c xxhash.c -o xxhash2.o | ||
| 440 | $(CC) xxhash.o xxhash2.o $(CLI_SRCS) -o xxhsum2 # will fail if one namespace missing (symbol collision) | ||
| 441 | $(RM) *.o xxhsum2 # clean | ||
| 442 | |||
| 443 | MAN = $(CLI_DIR)/xxhsum.1 | ||
| 444 | MD2ROFF ?= ronn | ||
| 445 | MD2ROFF_FLAGS ?= --roff --warnings --manual="User Commands" --organization="xxhsum $(XXHSUM_VERSION)" | ||
| 446 | $(MAN): $(CLI_DIR)/xxhsum.1.md xxhash.h | ||
| 447 | cat $< | $(MD2ROFF) $(MD2ROFF_FLAGS) | $(SED) -n '/^\.\\\".*/!p' > $@ | ||
| 448 | |||
| 449 | .PHONY: man | ||
| 450 | man: $(MAN) ## generate man page from markdown source | ||
| 451 | |||
| 452 | .PHONY: clean-man | ||
| 453 | clean-man: | ||
| 454 | $(RM) xxhsum.1 | ||
| 455 | |||
| 456 | .PHONY: preview-man | ||
| 457 | preview-man: man | ||
| 458 | man ./xxhsum.1 | ||
| 459 | |||
| 460 | .PHONY: test | ||
| 461 | test: DEBUGFLAGS += -DXXH_DEBUGLEVEL=1 | ||
| 462 | test: all namespaceTest check test-xxhsum-c c90test test-tools noxxh3test nostdlibtest | ||
| 463 | |||
| 464 | # this test checks that including "xxhash.h" multiple times and with different directives still compiles properly | ||
| 465 | .PHONY: test-multiInclude | ||
| 466 | test-multiInclude: | ||
| 467 | $(MAKE) -C tests test_multiInclude | ||
| 468 | |||
| 469 | .PHONY: test-inline-notexposed | ||
| 470 | test-inline-notexposed: xxhsum_inlinedXXH | ||
| 471 | $(NM) xxhsum_inlinedXXH | $(GREP) "t _XXH32_" ; test $$? -eq 1 # no XXH32 symbol should be left | ||
| 472 | $(NM) xxhsum_inlinedXXH | $(GREP) "t _XXH64_" ; test $$? -eq 1 # no XXH64 symbol should be left | ||
| 473 | |||
| 474 | .PHONY: test-inline | ||
| 475 | test-inline: test-inline-notexposed test-multiInclude | ||
| 476 | |||
| 477 | |||
| 478 | .PHONY: test-all | ||
| 479 | test-all: CFLAGS += -Werror | ||
| 480 | test-all: test test32 test-unicode clangtest gcc-og-test cxxtest usan test-inline listL120 trailingWhitespace test-xxh-nnn-sums | ||
| 481 | |||
| 482 | .PHONY: test-tools | ||
| 483 | test-tools: | ||
| 484 | CFLAGS=-Werror $(MAKE) -C tests/bench | ||
| 485 | CFLAGS=-Werror $(MAKE) -C tests/collisions check | ||
| 486 | |||
| 487 | .PHONY: test-xxh-nnn-sums | ||
| 488 | test-xxh-nnn-sums: xxhsum_and_links | ||
| 489 | ./xxhsum README.md > tmp.xxhsum.out # xxhsum outputs xxh64 | ||
| 490 | ./xxh32sum README.md > tmp.xxh32sum.out | ||
| 491 | ./xxh64sum README.md > tmp.xxh64sum.out | ||
| 492 | ./xxh128sum README.md > tmp.xxh128sum.out | ||
| 493 | ./xxh3sum README.md > tmp.xxh3sum.out | ||
| 494 | cat tmp.xxhsum.out | ||
| 495 | cat tmp.xxh32sum.out | ||
| 496 | cat tmp.xxh64sum.out | ||
| 497 | cat tmp.xxh128sum.out | ||
| 498 | cat tmp.xxh3sum.out | ||
| 499 | ./xxhsum -c tmp.xxhsum.out | ||
| 500 | ./xxhsum -c tmp.xxh32sum.out | ||
| 501 | ./xxhsum -c tmp.xxh64sum.out | ||
| 502 | ./xxhsum -c tmp.xxh128sum.out | ||
| 503 | ./xxhsum -c tmp.xxh3sum.out | ||
| 504 | ./xxh32sum -c tmp.xxhsum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 505 | ./xxh32sum -c tmp.xxh32sum.out | ||
| 506 | ./xxh32sum -c tmp.xxh64sum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 507 | ./xxh32sum -c tmp.xxh128sum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 508 | ./xxh32sum -c tmp.xxh3sum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 509 | ./xxh64sum -c tmp.xxhsum.out | ||
| 510 | ./xxh64sum -c tmp.xxh32sum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 511 | ./xxh64sum -c tmp.xxh64sum.out | ||
| 512 | ./xxh64sum -c tmp.xxh128sum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 513 | ./xxh64sum -c tmp.xxh3sum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 514 | ./xxh128sum -c tmp.xxhsum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 515 | ./xxh128sum -c tmp.xxh32sum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 516 | ./xxh128sum -c tmp.xxh64sum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 517 | ./xxh128sum -c tmp.xxh128sum.out | ||
| 518 | ./xxh128sum -c tmp.xxh3sum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 519 | ./xxh3sum -c tmp.xxhsum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 520 | ./xxh3sum -c tmp.xxh32sum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 521 | ./xxh3sum -c tmp.xxh64sum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 522 | ./xxh3sum -c tmp.xxh128sum.out ; test $$? -eq 1 # expects "no properly formatted" | ||
| 523 | ./xxh3sum -c tmp.xxh3sum.out | ||
| 524 | |||
| 525 | .PHONY: listL120 | ||
| 526 | listL120: # extract lines >= 120 characters in *.{c,h}, by Takayuki Matsuoka (note: $$, for Makefile compatibility) | ||
| 527 | find . -type f -name '*.c' -o -name '*.h' | while read -r filename; do awk 'length > 120 {print FILENAME "(" FNR "): " $$0}' $$filename; done | ||
| 528 | |||
| 529 | .PHONY: trailingWhitespace | ||
| 530 | trailingWhitespace: | ||
| 531 | ! $(GREP) -E "`printf '[ \\t]$$'`" cli/*.c cli/*.h cli/*.1 *.c *.h LICENSE Makefile build/cmake/CMakeLists.txt | ||
| 532 | |||
| 533 | .PHONY: lint-unicode | ||
| 534 | lint-unicode: | ||
| 535 | ./tests/unicode_lint.sh | ||
| 536 | |||
| 537 | # ========================================================= | ||
| 538 | # make install is validated only for the following targets | ||
| 539 | # ========================================================= | ||
| 540 | ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU Haiku OpenBSD FreeBSD NetBSD DragonFly SunOS CYGWIN% , $(UNAME))) | ||
| 541 | |||
| 542 | DESTDIR ?= | ||
| 543 | # directory variables: GNU conventions prefer lowercase | ||
| 544 | # see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html | ||
| 545 | # support both lower and uppercase (BSD), use uppercase in script | ||
| 546 | prefix ?= /usr/local | ||
| 547 | PREFIX ?= $(prefix) | ||
| 548 | exec_prefix ?= $(PREFIX) | ||
| 549 | EXEC_PREFIX ?= $(exec_prefix) | ||
| 550 | libdir ?= $(EXEC_PREFIX)/lib | ||
| 551 | LIBDIR ?= $(libdir) | ||
| 552 | includedir ?= $(PREFIX)/include | ||
| 553 | INCLUDEDIR ?= $(includedir) | ||
| 554 | bindir ?= $(EXEC_PREFIX)/bin | ||
| 555 | BINDIR ?= $(bindir) | ||
| 556 | datarootdir ?= $(PREFIX)/share | ||
| 557 | mandir ?= $(datarootdir)/man | ||
| 558 | man1dir ?= $(mandir)/man1 | ||
| 559 | |||
| 560 | ifneq (,$(filter $(UNAME),FreeBSD NetBSD DragonFly)) | ||
| 561 | PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig | ||
| 562 | else | ||
| 563 | PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig | ||
| 564 | endif | ||
| 565 | |||
| 566 | ifneq (,$(filter $(UNAME),OpenBSD NetBSD DragonFly SunOS)) | ||
| 567 | MANDIR ?= $(PREFIX)/man/man1 | ||
| 568 | else | ||
| 569 | MANDIR ?= $(man1dir) | ||
| 570 | endif | ||
| 571 | |||
| 572 | ifneq (,$(filter $(UNAME),SunOS)) | ||
| 573 | INSTALL ?= ginstall | ||
| 574 | else | ||
| 575 | INSTALL ?= install | ||
| 576 | endif | ||
| 577 | |||
| 578 | INSTALL_PROGRAM ?= $(INSTALL) | ||
| 579 | INSTALL_DATA ?= $(INSTALL) -m 644 | ||
| 580 | MAKE_DIR ?= $(INSTALL) -d -m 755 | ||
| 581 | |||
| 582 | |||
| 583 | # Escape special symbols by putting each character into its separate class | ||
| 584 | EXEC_PREFIX_REGEX ?= $(shell echo "$(EXEC_PREFIX)" | $(SED) $(SED_ERE_OPT) -e "s/([^^])/[\1]/g" -e "s/\\^/\\\\^/g") | ||
| 585 | PREFIX_REGEX ?= $(shell echo "$(PREFIX)" | $(SED) $(SED_ERE_OPT) -e "s/([^^])/[\1]/g" -e "s/\\^/\\\\^/g") | ||
| 586 | |||
| 587 | PCLIBDIR ?= $(shell echo "$(LIBDIR)" | $(SED) -n $(SED_ERE_OPT) -e "s@^$(EXEC_PREFIX_REGEX)(/|$$)@@p") | ||
| 588 | PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | $(SED) -n $(SED_ERE_OPT) -e "s@^$(PREFIX_REGEX)(/|$$)@@p") | ||
| 589 | PCEXECDIR?= $(if $(filter $(PREFIX),$(EXEC_PREFIX)),$$\{prefix\},$(EXEC_PREFIX)) | ||
| 590 | |||
| 591 | ifeq (,$(PCLIBDIR)) | ||
| 592 | # Additional prefix check is required, since the empty string is technically a | ||
| 593 | # valid PCLIBDIR | ||
| 594 | ifeq (,$(shell echo "$(LIBDIR)" | $(SED) -n $(SED_ERE_OPT) -e "\\@^$(EXEC_PREFIX_REGEX)(/|$$)@ p")) | ||
| 595 | $(error configured libdir ($(LIBDIR)) is outside of exec_prefix ($(EXEC_PREFIX)), can't generate pkg-config file) | ||
| 596 | endif | ||
| 597 | endif | ||
| 598 | |||
| 599 | ifeq (,$(PCINCDIR)) | ||
| 600 | # Additional prefix check is required, since the empty string is technically a | ||
| 601 | # valid PCINCDIR | ||
| 602 | ifeq (,$(shell echo "$(INCLUDEDIR)" | $(SED) -n $(SED_ERE_OPT) -e "\\@^$(PREFIX_REGEX)(/|$$)@ p")) | ||
| 603 | $(error configured includedir ($(INCLUDEDIR)) is outside of prefix ($(PREFIX)), can't generate pkg-config file) | ||
| 604 | endif | ||
| 605 | endif | ||
| 606 | |||
| 607 | libxxhash.pc: libxxhash.pc.in | ||
| 608 | @echo creating pkgconfig | ||
| 609 | $(SED) $(SED_ERE_OPT) -e 's|@PREFIX@|$(PREFIX)|' \ | ||
| 610 | -e 's|@EXECPREFIX@|$(PCEXECDIR)|' \ | ||
| 611 | -e 's|@LIBDIR@|$$\{exec_prefix\}/$(PCLIBDIR)|' \ | ||
| 612 | -e 's|@INCLUDEDIR@|$$\{prefix\}/$(PCINCDIR)|' \ | ||
| 613 | -e 's|@VERSION@|$(LIBVER)|' \ | ||
| 614 | $< > $@ | ||
| 615 | |||
| 616 | |||
| 617 | install_libxxhash.a: libxxhash.a | ||
| 618 | @echo Installing libxxhash.a | ||
| 619 | $(MAKE_DIR) $(DESTDIR)$(LIBDIR) | ||
| 620 | $(INSTALL_DATA) libxxhash.a $(DESTDIR)$(LIBDIR) | ||
| 621 | |||
| 622 | install_libxxhash: libxxhash | ||
| 623 | @echo Installing libxxhash | ||
| 624 | $(MAKE_DIR) $(DESTDIR)$(LIBDIR) | ||
| 625 | $(INSTALL_PROGRAM) $(LIBXXH) $(DESTDIR)$(LIBDIR) | ||
| 626 | ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR) | ||
| 627 | ln -sf libxxhash.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT) | ||
| 628 | |||
| 629 | install_libxxhash.includes: | ||
| 630 | $(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR) # includes | ||
| 631 | $(INSTALL_DATA) xxhash.h $(DESTDIR)$(INCLUDEDIR) | ||
| 632 | $(INSTALL_DATA) xxh3.h $(DESTDIR)$(INCLUDEDIR) # for compatibility, will be removed in v0.9.0 | ||
| 633 | ifeq ($(LIBXXH_DISPATCH),1) | ||
| 634 | $(INSTALL_DATA) xxh_x86dispatch.h $(DESTDIR)$(INCLUDEDIR) | ||
| 635 | endif | ||
| 636 | |||
| 637 | install_libxxhash.pc: libxxhash.pc | ||
| 638 | @echo Installing pkgconfig | ||
| 639 | $(MAKE_DIR) $(DESTDIR)$(PKGCONFIGDIR)/ | ||
| 640 | $(INSTALL_DATA) libxxhash.pc $(DESTDIR)$(PKGCONFIGDIR)/ | ||
| 641 | |||
| 642 | install_xxhsum: xxhsum | ||
| 643 | @echo Installing xxhsum | ||
| 644 | $(MAKE_DIR) $(DESTDIR)$(BINDIR)/ | ||
| 645 | $(INSTALL_PROGRAM) xxhsum$(EXT) $(DESTDIR)$(BINDIR)/xxhsum$(EXT) | ||
| 646 | ln -sf xxhsum$(EXT) $(DESTDIR)$(BINDIR)/xxh32sum$(EXT) | ||
| 647 | ln -sf xxhsum$(EXT) $(DESTDIR)$(BINDIR)/xxh64sum$(EXT) | ||
| 648 | ln -sf xxhsum$(EXT) $(DESTDIR)$(BINDIR)/xxh128sum$(EXT) | ||
| 649 | ln -sf xxhsum$(EXT) $(DESTDIR)$(BINDIR)/xxh3sum$(EXT) | ||
| 650 | |||
| 651 | install_man: | ||
| 652 | @echo Installing man pages | ||
| 653 | $(MAKE_DIR) $(DESTDIR)$(MANDIR)/ | ||
| 654 | $(INSTALL_DATA) $(MAN) $(DESTDIR)$(MANDIR)/xxhsum.1 | ||
| 655 | ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh32sum.1 | ||
| 656 | ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh64sum.1 | ||
| 657 | ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh128sum.1 | ||
| 658 | ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh3sum.1 | ||
| 659 | |||
| 660 | .PHONY: install | ||
| 661 | ## install libraries, CLI, links and man pages | ||
| 662 | install: install_libxxhash.a install_libxxhash install_libxxhash.includes install_libxxhash.pc install_xxhsum install_man | ||
| 663 | @echo xxhash installation completed | ||
| 664 | |||
| 665 | .PHONY: uninstall | ||
| 666 | uninstall: ## uninstall libraries, CLI, links and man page | ||
| 667 | $(RM) $(DESTDIR)$(LIBDIR)/libxxhash.a | ||
| 668 | $(RM) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT) | ||
| 669 | $(RM) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR) | ||
| 670 | $(RM) $(DESTDIR)$(LIBDIR)/$(LIBXXH) | ||
| 671 | $(RM) $(DESTDIR)$(INCLUDEDIR)/xxhash.h | ||
| 672 | $(RM) $(DESTDIR)$(INCLUDEDIR)/xxh3.h | ||
| 673 | $(RM) $(DESTDIR)$(INCLUDEDIR)/xxh_x86dispatch.h | ||
| 674 | $(RM) $(DESTDIR)$(PKGCONFIGDIR)/libxxhash.pc | ||
| 675 | $(RM) $(DESTDIR)$(BINDIR)/xxh32sum | ||
| 676 | $(RM) $(DESTDIR)$(BINDIR)/xxh64sum | ||
| 677 | $(RM) $(DESTDIR)$(BINDIR)/xxh128sum | ||
| 678 | $(RM) $(DESTDIR)$(BINDIR)/xxh3sum | ||
| 679 | $(RM) $(DESTDIR)$(BINDIR)/xxhsum | ||
| 680 | $(RM) $(DESTDIR)$(MANDIR)/xxh32sum.1 | ||
| 681 | $(RM) $(DESTDIR)$(MANDIR)/xxh64sum.1 | ||
| 682 | $(RM) $(DESTDIR)$(MANDIR)/xxh128sum.1 | ||
| 683 | $(RM) $(DESTDIR)$(MANDIR)/xxh3sum.1 | ||
| 684 | $(RM) $(DESTDIR)$(MANDIR)/xxhsum.1 | ||
| 685 | @echo xxhsum successfully uninstalled | ||
| 686 | |||
| 687 | endif | ||
