xref: /freebsd-14.2/sys/contrib/zstd/lib/Makefile (revision 0f743729)
10c16b537SWarner Losh# ################################################################
20c16b537SWarner Losh# Copyright (c) Yann Collet, Facebook, Inc.
30c16b537SWarner Losh# All rights reserved.
40c16b537SWarner Losh#
50c16b537SWarner Losh# This source code is licensed under both the BSD-style license (found in the
60c16b537SWarner Losh# LICENSE file in the root directory of this source tree) and the GPLv2 (found
70c16b537SWarner Losh# in the COPYING file in the root directory of this source tree).
80c16b537SWarner Losh# You may select, at your option, one of the above-listed licenses.
90c16b537SWarner Losh# ################################################################
100c16b537SWarner Losh
110c16b537SWarner Losh# Modules
120c16b537SWarner LoshZSTD_LIB_COMPRESSION ?= 1
130c16b537SWarner LoshZSTD_LIB_DECOMPRESSION ?= 1
140c16b537SWarner LoshZSTD_LIB_DICTBUILDER ?= 1
150c16b537SWarner LoshZSTD_LIB_DEPRECATED ?= 0
160c16b537SWarner Losh
170c16b537SWarner Losh# Input variables for libzstd.mk
180c16b537SWarner Loshifeq ($(ZSTD_LIB_COMPRESSION), 0)
190c16b537SWarner Losh  ZSTD_LIB_DICTBUILDER = 0
200c16b537SWarner Losh  ZSTD_LIB_DEPRECATED = 0
210c16b537SWarner Loshendif
22*0f743729SConrad Meyer
23*0f743729SConrad Meyerifeq ($(ZSTD_LIB_DECOMPRESSION), 0)
24*0f743729SConrad Meyer  ZSTD_LEGACY_SUPPORT = 0
250c16b537SWarner Losh  ZSTD_LIB_DEPRECATED = 0
260c16b537SWarner Loshendif
270c16b537SWarner Losh
280c16b537SWarner Loshinclude libzstd.mk
290c16b537SWarner Losh
30*0f743729SConrad MeyerZSTD_FILES := $(ZSTD_COMMON_FILES) $(ZSTD_LEGACY_FILES)
310c16b537SWarner Losh
320c16b537SWarner Loshifneq ($(ZSTD_LIB_COMPRESSION), 0)
330c16b537SWarner Losh  ZSTD_FILES += $(ZSTD_COMPRESS_FILES)
34*0f743729SConrad Meyerendif
350c16b537SWarner Losh
36*0f743729SConrad Meyerifneq ($(ZSTD_LIB_DECOMPRESSION), 0)
37*0f743729SConrad Meyer  ZSTD_FILES += $(ZSTD_DECOMPRESS_FILES)
38*0f743729SConrad Meyerendif
39*0f743729SConrad Meyer
40*0f743729SConrad Meyerifneq ($(ZSTD_LIB_DEPRECATED), 0)
41*0f743729SConrad Meyer  ZSTD_FILES += $(ZSTD_DEPRECATED_FILES)
420c16b537SWarner Loshendif
43*0f743729SConrad Meyer
44*0f743729SConrad Meyerifneq ($(ZSTD_LIB_DICTBUILDER), 0)
45*0f743729SConrad Meyer  ZSTD_FILES += $(ZSTD_DICTBUILDER_FILES)
46*0f743729SConrad Meyerendif
47*0f743729SConrad Meyer
48*0f743729SConrad MeyerZSTD_LOCAL_SRC := $(notdir $(ZSTD_FILES))
49*0f743729SConrad MeyerZSTD_LOCAL_OBJ0 := $(ZSTD_LOCAL_SRC:.c=.o)
50*0f743729SConrad MeyerZSTD_LOCAL_OBJ := $(ZSTD_LOCAL_OBJ0:.S=.o)
51*0f743729SConrad Meyer
52*0f743729SConrad MeyerVERSION := $(ZSTD_VERSION)
53*0f743729SConrad Meyer
54*0f743729SConrad Meyer# Note: by default, the static library is built single-threaded and dynamic library is built
55*0f743729SConrad Meyer# multi-threaded. It is possible to force multi or single threaded builds by appending
56*0f743729SConrad Meyer# -mt or -nomt to the build target (like lib-mt for multi-threaded, lib-nomt for single-threaded).
57*0f743729SConrad Meyer.PHONY: default
58*0f743729SConrad Meyerdefault: lib-release
59*0f743729SConrad Meyer
60*0f743729SConrad MeyerCPPFLAGS_DYNLIB  += -DZSTD_MULTITHREAD # dynamic library build defaults to multi-threaded
61*0f743729SConrad MeyerLDFLAGS_DYNLIB   += -pthread
62*0f743729SConrad MeyerCPPFLAGS_STATLIB +=                    # static library build defaults to single-threaded
63*0f743729SConrad Meyer
64*0f743729SConrad Meyer
65*0f743729SConrad Meyerifeq ($(findstring GCC,$(CCVER)),GCC)
66*0f743729SConrad Meyerdecompress/zstd_decompress_block.o : CFLAGS+=-fno-tree-vectorize
67*0f743729SConrad Meyerendif
68*0f743729SConrad Meyer
69*0f743729SConrad Meyer
70*0f743729SConrad Meyer# macOS linker doesn't support -soname, and use different extension
71*0f743729SConrad Meyer# see : https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html
72*0f743729SConrad Meyerifeq ($(UNAME), Darwin)
73*0f743729SConrad Meyer  SHARED_EXT = dylib
740c16b537SWarner Losh  SHARED_EXT_MAJOR = $(LIBVER_MAJOR).$(SHARED_EXT)
750c16b537SWarner Losh  SHARED_EXT_VER = $(LIBVER).$(SHARED_EXT)
760c16b537SWarner Losh  SONAME_FLAGS = -install_name $(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) -compatibility_version $(LIBVER_MAJOR) -current_version $(LIBVER)
77*0f743729SConrad Meyerelse
780c16b537SWarner Losh  ifeq ($(UNAME), AIX)
790c16b537SWarner Losh    SONAME_FLAGS =
800c16b537SWarner Losh  else
810c16b537SWarner Losh    SONAME_FLAGS = -Wl,-soname=libzstd.$(SHARED_EXT).$(LIBVER_MAJOR)
820c16b537SWarner Losh  endif
830c16b537SWarner Losh  SHARED_EXT = so
840c16b537SWarner Losh  SHARED_EXT_MAJOR = $(SHARED_EXT).$(LIBVER_MAJOR)
85*0f743729SConrad Meyer  SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER)
860c16b537SWarner Loshendif
870c16b537SWarner Losh
880c16b537SWarner Losh
890c16b537SWarner Losh.PHONY: all
900c16b537SWarner Loshall: lib
910c16b537SWarner Losh
920c16b537SWarner Losh
930c16b537SWarner Losh.PHONY: libzstd.a  # must be run every time
940c16b537SWarner Loshlibzstd.a: CPPFLAGS += $(CPPFLAGS_STATLIB)
950c16b537SWarner Losh
960c16b537SWarner LoshSET_CACHE_DIRECTORY = \
970c16b537SWarner Losh   +$(MAKE) --no-print-directory $@ \
980c16b537SWarner Losh    BUILD_DIR=obj/$(HASH_DIR) \
990c16b537SWarner Losh    CPPFLAGS="$(CPPFLAGS)" \
1000c16b537SWarner Losh    CFLAGS="$(CFLAGS)" \
1010c16b537SWarner Losh    LDFLAGS="$(LDFLAGS)"
1020c16b537SWarner Losh
1030c16b537SWarner Loshifndef BUILD_DIR
1040c16b537SWarner Losh# determine BUILD_DIR from compilation flags
1050c16b537SWarner Losh
1060c16b537SWarner Loshlibzstd.a:
1070c16b537SWarner Losh	$(SET_CACHE_DIRECTORY)
1080c16b537SWarner Losh
1090c16b537SWarner Loshelse
1100c16b537SWarner Losh# BUILD_DIR is defined
1110c16b537SWarner Losh
1120c16b537SWarner LoshZSTD_STATLIB_DIR := $(BUILD_DIR)/static
1130c16b537SWarner LoshZSTD_STATLIB := $(ZSTD_STATLIB_DIR)/libzstd.a
114*0f743729SConrad MeyerZSTD_STATLIB_OBJ := $(addprefix $(ZSTD_STATLIB_DIR)/,$(ZSTD_LOCAL_OBJ))
115*0f743729SConrad Meyer$(ZSTD_STATLIB): ARFLAGS = rcs
116*0f743729SConrad Meyer$(ZSTD_STATLIB): | $(ZSTD_STATLIB_DIR)
117*0f743729SConrad Meyer$(ZSTD_STATLIB): $(ZSTD_STATLIB_OBJ)
118*0f743729SConrad Meyer  # Check for multithread flag at target execution time
119*0f743729SConrad Meyer	$(if $(filter -DZSTD_MULTITHREAD,$(CPPFLAGS)),\
120*0f743729SConrad Meyer    @echo compiling multi-threaded static library $(LIBVER),\
121*0f743729SConrad Meyer    @echo compiling single-threaded static library $(LIBVER))
122*0f743729SConrad Meyer	$(AR) $(ARFLAGS) $@ $^
123*0f743729SConrad Meyer
124*0f743729SConrad Meyerlibzstd.a: $(ZSTD_STATLIB)
1250c16b537SWarner Losh	cp -f $< $@
1260c16b537SWarner Losh
1270c16b537SWarner Loshendif
1280c16b537SWarner Losh
1290c16b537SWarner Loshifneq (,$(filter Windows%,$(TARGET_SYSTEM)))
1300c16b537SWarner Losh
1310c16b537SWarner LoshLIBZSTD = dll/libzstd.dll
132*0f743729SConrad Meyer$(LIBZSTD): $(ZSTD_FILES)
1330c16b537SWarner Losh	@echo compiling dynamic library $(LIBVER)
1340c16b537SWarner Losh	$(CC) $(FLAGS) -DZSTD_DLL_EXPORT=1 -Wl,--out-implib,dll/libzstd.dll.a -shared $^ -o $@
135*0f743729SConrad Meyer
1360c16b537SWarner Loshelse  # not Windows
1370c16b537SWarner Losh
1380c16b537SWarner LoshLIBZSTD = libzstd.$(SHARED_EXT_VER)
1390c16b537SWarner Losh.PHONY: $(LIBZSTD)  # must be run every time
1400c16b537SWarner Losh$(LIBZSTD): CPPFLAGS += $(CPPFLAGS_DYNLIB)
1410c16b537SWarner Losh$(LIBZSTD): CFLAGS   += -fPIC -fvisibility=hidden
1420c16b537SWarner Losh$(LIBZSTD): LDFLAGS  += -shared $(LDFLAGS_DYNLIB)
1430c16b537SWarner Losh
1440c16b537SWarner Loshifndef BUILD_DIR
1450c16b537SWarner Losh# determine BUILD_DIR from compilation flags
1460c16b537SWarner Losh
1470c16b537SWarner Losh$(LIBZSTD):
1480c16b537SWarner Losh	$(SET_CACHE_DIRECTORY)
1490c16b537SWarner Losh
1500c16b537SWarner Loshelse
1510c16b537SWarner Losh# BUILD_DIR is defined
1520c16b537SWarner Losh
1530c16b537SWarner LoshZSTD_DYNLIB_DIR := $(BUILD_DIR)/dynamic
1540c16b537SWarner LoshZSTD_DYNLIB := $(ZSTD_DYNLIB_DIR)/$(LIBZSTD)
1550c16b537SWarner LoshZSTD_DYNLIB_OBJ := $(addprefix $(ZSTD_DYNLIB_DIR)/,$(ZSTD_LOCAL_OBJ))
1560c16b537SWarner Losh
1570c16b537SWarner Losh$(ZSTD_DYNLIB): | $(ZSTD_DYNLIB_DIR)
1580c16b537SWarner Losh$(ZSTD_DYNLIB): $(ZSTD_DYNLIB_OBJ)
1590c16b537SWarner Losh# Check for multithread flag at target execution time
160*0f743729SConrad Meyer	$(if $(filter -DZSTD_MULTITHREAD,$(CPPFLAGS)),\
1610c16b537SWarner Losh    @echo compiling multi-threaded dynamic library $(LIBVER),\
1620c16b537SWarner Losh    @echo compiling single-threaded dynamic library $(LIBVER))
1630c16b537SWarner Losh	$(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@
1640c16b537SWarner Losh	@echo creating versioned links
1650c16b537SWarner Losh	ln -sf $@ libzstd.$(SHARED_EXT_MAJOR)
1660c16b537SWarner Losh	ln -sf $@ libzstd.$(SHARED_EXT)
167*0f743729SConrad Meyer
1680c16b537SWarner Losh$(LIBZSTD): $(ZSTD_DYNLIB)
169*0f743729SConrad Meyer	cp -f $< $@
1700c16b537SWarner Losh
1710c16b537SWarner Loshendif  # ifndef BUILD_DIR
1720c16b537SWarner Loshendif  # if windows
1730c16b537SWarner Losh
1740c16b537SWarner Losh.PHONY: libzstd
1750c16b537SWarner Loshlibzstd : $(LIBZSTD)
1760c16b537SWarner Losh
1770c16b537SWarner Losh.PHONY: lib
1780c16b537SWarner Loshlib : libzstd.a libzstd
1790c16b537SWarner Losh
1800c16b537SWarner Losh
1810c16b537SWarner Losh# note : do not define lib-mt or lib-release as .PHONY
1820c16b537SWarner Losh# make does not consider implicit pattern rule for .PHONY target
183*0f743729SConrad Meyer
1840c16b537SWarner Losh%-mt : CPPFLAGS_DYNLIB  := -DZSTD_MULTITHREAD
1850c16b537SWarner Losh%-mt : CPPFLAGS_STATLIB := -DZSTD_MULTITHREAD
1860c16b537SWarner Losh%-mt : LDFLAGS_DYNLIB   := -pthread
1870c16b537SWarner Losh%-mt : %
1880c16b537SWarner Losh	@echo multi-threaded build completed
1890c16b537SWarner Losh
1900c16b537SWarner Losh%-nomt : CPPFLAGS_DYNLIB  :=
1910c16b537SWarner Losh%-nomt : LDFLAGS_DYNLIB   :=
1920c16b537SWarner Losh%-nomt : CPPFLAGS_STATLIB :=
1930c16b537SWarner Losh%-nomt : %
1940c16b537SWarner Losh	@echo single-threaded build completed
1950c16b537SWarner Losh
1960c16b537SWarner Losh%-release : DEBUGFLAGS :=
1970c16b537SWarner Losh%-release : %
1980c16b537SWarner Losh	@echo release build completed
1990c16b537SWarner Losh
2000c16b537SWarner Losh
2010c16b537SWarner Losh# Generate .h dependencies automatically
2020c16b537SWarner Losh
2030c16b537SWarner LoshDEPFLAGS = -MT $@ -MMD -MP -MF
2040c16b537SWarner Losh
2050c16b537SWarner Losh$(ZSTD_DYNLIB_DIR)/%.o : %.c $(ZSTD_DYNLIB_DIR)/%.d | $(ZSTD_DYNLIB_DIR)
2060c16b537SWarner Losh	@echo CC $@
2070c16b537SWarner Losh	$(COMPILE.c) $(DEPFLAGS) $(ZSTD_DYNLIB_DIR)/$*.d $(OUTPUT_OPTION) $<
208*0f743729SConrad Meyer
209*0f743729SConrad Meyer$(ZSTD_STATLIB_DIR)/%.o : %.c $(ZSTD_STATLIB_DIR)/%.d | $(ZSTD_STATLIB_DIR)
210*0f743729SConrad Meyer	@echo CC $@
211*0f743729SConrad Meyer	$(COMPILE.c) $(DEPFLAGS) $(ZSTD_STATLIB_DIR)/$*.d $(OUTPUT_OPTION) $<
212*0f743729SConrad Meyer
2130c16b537SWarner Losh$(ZSTD_DYNLIB_DIR)/%.o : %.S | $(ZSTD_DYNLIB_DIR)
214*0f743729SConrad Meyer	@echo AS $@
215*0f743729SConrad Meyer	$(COMPILE.S) $(OUTPUT_OPTION) $<
216*0f743729SConrad Meyer
217*0f743729SConrad Meyer$(ZSTD_STATLIB_DIR)/%.o : %.S | $(ZSTD_STATLIB_DIR)
2180c16b537SWarner Losh	@echo AS $@
219*0f743729SConrad Meyer	$(COMPILE.S) $(OUTPUT_OPTION) $<
220*0f743729SConrad Meyer
221*0f743729SConrad MeyerMKDIR ?= mkdir
222*0f743729SConrad Meyer$(BUILD_DIR) $(ZSTD_DYNLIB_DIR) $(ZSTD_STATLIB_DIR):
2230c16b537SWarner Losh	$(MKDIR) -p $@
2240c16b537SWarner Losh
2250c16b537SWarner LoshDEPFILES := $(ZSTD_DYNLIB_OBJ:.o=.d) $(ZSTD_STATLIB_OBJ:.o=.d)
226*0f743729SConrad Meyer$(DEPFILES):
227*0f743729SConrad Meyer
2280c16b537SWarner Loshinclude $(wildcard $(DEPFILES))
229*0f743729SConrad Meyer
2300c16b537SWarner Losh
2310c16b537SWarner Losh# Special case : building library in single-thread mode _and_ without zstdmt_compress.c
2320c16b537SWarner LoshZSTDMT_FILES = compress/zstdmt_compress.c
2330c16b537SWarner LoshZSTD_NOMT_FILES = $(filter-out $(ZSTDMT_FILES),$(ZSTD_FILES))
2340c16b537SWarner Loshlibzstd-nomt: CFLAGS += -fPIC -fvisibility=hidden
2350c16b537SWarner Loshlibzstd-nomt: LDFLAGS += -shared
2360c16b537SWarner Loshlibzstd-nomt: $(ZSTD_NOMT_FILES)
2370c16b537SWarner Losh	@echo compiling single-thread dynamic library $(LIBVER)
2380c16b537SWarner Losh	@echo files : $(ZSTD_NOMT_FILES)
2390c16b537SWarner Losh	$(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@
2400c16b537SWarner Losh
2410c16b537SWarner Losh.PHONY: clean
2420c16b537SWarner Loshclean:
2430c16b537SWarner Losh	$(RM) -r *.dSYM   # macOS-specific
2440c16b537SWarner Losh	$(RM) core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc
2450c16b537SWarner Losh	$(RM) dll/libzstd.dll dll/libzstd.lib libzstd-nomt*
2460c16b537SWarner Losh	$(RM) -r obj/*
2470c16b537SWarner Losh	@echo Cleaning library completed
248
249#-----------------------------------------------------------------------------
250# make install is validated only for below listed environments
251#-----------------------------------------------------------------------------
252ifneq (,$(filter $(UNAME),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku AIX))
253
254lib: libzstd.pc
255
256HAS_EXPLICIT_EXEC_PREFIX := $(if $(or $(EXEC_PREFIX),$(exec_prefix)),1,)
257
258DESTDIR     ?=
259# directory variables : GNU conventions prefer lowercase
260# see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html
261# support both lower and uppercase (BSD), use uppercase in script
262prefix      ?= /usr/local
263PREFIX      ?= $(prefix)
264exec_prefix ?= $(PREFIX)
265EXEC_PREFIX ?= $(exec_prefix)
266libdir      ?= $(EXEC_PREFIX)/lib
267LIBDIR      ?= $(libdir)
268includedir  ?= $(PREFIX)/include
269INCLUDEDIR  ?= $(includedir)
270
271PCINCDIR := $(patsubst $(PREFIX)%,%,$(INCLUDEDIR))
272PCLIBDIR := $(patsubst $(EXEC_PREFIX)%,%,$(LIBDIR))
273
274# If we successfully stripped off a prefix, we'll add a reference to the
275# relevant pc variable.
276PCINCPREFIX := $(if $(findstring $(INCLUDEDIR),$(PCINCDIR)),,$${prefix})
277PCLIBPREFIX := $(if $(findstring $(LIBDIR),$(PCLIBDIR)),,$${exec_prefix})
278
279# If no explicit EXEC_PREFIX was set by the caller, write it out as a reference
280# to PREFIX, rather than as a resolved value.
281PCEXEC_PREFIX := $(if $(HAS_EXPLICIT_EXEC_PREFIX),$(EXEC_PREFIX),$${prefix})
282
283ifneq (,$(filter $(UNAME),FreeBSD NetBSD DragonFly))
284  PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig
285else
286  PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig
287endif
288
289ifneq (,$(filter $(UNAME),SunOS))
290  INSTALL ?= ginstall
291else
292  INSTALL ?= install
293endif
294
295INSTALL_PROGRAM ?= $(INSTALL)
296INSTALL_DATA    ?= $(INSTALL) -m 644
297
298
299libzstd.pc: libzstd.pc.in
300	@echo creating pkgconfig
301	@sed $(SED_ERE_OPT) \
302	        -e 's|@PREFIX@|$(PREFIX)|' \
303	        -e 's|@EXEC_PREFIX@|$(PCEXEC_PREFIX)|' \
304	        -e 's|@INCLUDEDIR@|$(PCINCPREFIX)$(PCINCDIR)|' \
305	        -e 's|@LIBDIR@|$(PCLIBPREFIX)$(PCLIBDIR)|' \
306	        -e 's|@VERSION@|$(VERSION)|' \
307	        -e 's|@LIBS_PRIVATE@|$(LDFLAGS_DYNLIB)|' \
308	        $< >$@
309
310.PHONY: install
311install: install-pc install-static install-shared install-includes
312	@echo zstd static and shared library installed
313
314.PHONY: install-pc
315install-pc: libzstd.pc
316	[ -e $(DESTDIR)$(PKGCONFIGDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/
317	$(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/
318
319.PHONY: install-static
320install-static:
321	# only generate libzstd.a if it's not already present
322	[ -e libzstd.a ] || $(MAKE) libzstd.a-release
323	[ -e $(DESTDIR)$(LIBDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/
324	@echo Installing static library
325	$(INSTALL_DATA) libzstd.a $(DESTDIR)$(LIBDIR)
326
327.PHONY: install-shared
328install-shared:
329	# only generate libzstd.so if it's not already present
330	[ -e $(LIBZSTD) ] || $(MAKE) libzstd-release
331	[ -e $(DESTDIR)$(LIBDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/
332	@echo Installing shared library
333	$(INSTALL_PROGRAM) $(LIBZSTD) $(DESTDIR)$(LIBDIR)
334	ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR)
335	ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT)
336
337.PHONY: install-includes
338install-includes:
339	[ -e $(DESTDIR)$(INCLUDEDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/
340	@echo Installing includes
341	$(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR)
342	$(INSTALL_DATA) zstd_errors.h $(DESTDIR)$(INCLUDEDIR)
343	$(INSTALL_DATA) zdict.h $(DESTDIR)$(INCLUDEDIR)
344
345.PHONY: uninstall
346uninstall:
347	$(RM) $(DESTDIR)$(LIBDIR)/libzstd.a
348	$(RM) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT)
349	$(RM) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR)
350	$(RM) $(DESTDIR)$(LIBDIR)/$(LIBZSTD)
351	$(RM) $(DESTDIR)$(PKGCONFIGDIR)/libzstd.pc
352	$(RM) $(DESTDIR)$(INCLUDEDIR)/zstd.h
353	$(RM) $(DESTDIR)$(INCLUDEDIR)/zstd_errors.h
354	$(RM) $(DESTDIR)$(INCLUDEDIR)/zdict.h
355	@echo zstd libraries successfully uninstalled
356
357endif
358