minor Makefile updates

This commit is contained in:
Yann Collet 2016-08-30 13:33:20 -07:00
parent 309f113028
commit 599c69d917
3 changed files with 30 additions and 91 deletions

View File

@ -1,33 +1,10 @@
# ################################################################ # ################################################################
# zstd - Makefile # Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
# Copyright (C) Yann Collet 2014-2016
# All rights reserved. # All rights reserved.
# #
# BSD license # This source code is licensed under the BSD-style license found in the
# # LICENSE file in the root directory of this source tree. An additional grant
# Redistribution and use in source and binary forms, with or without modification, # of patent rights can be found in the PATENTS file in the same directory.
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice, this
# list of conditions and the following disclaimer in the documentation and/or
# other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# You can contact the author at :
# - zstd homepage : http://www.zstd.net/
# ################################################################ # ################################################################
PRGDIR = programs PRGDIR = programs

View File

@ -1,33 +1,10 @@
# ################################################################ # ################################################################
# ZSTD library - Makefile # Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
# Copyright (C) Yann Collet 2015-2016
# All rights reserved. # All rights reserved.
# #
# BSD license # This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# Redistribution and use in source and binary forms, with or without modification, # of patent rights can be found in the PATENTS file in the same directory.
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice, this
# list of conditions and the following disclaimer in the documentation and/or
# other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# You can contact the author at :
# - ZSTD homepage : http://www.zstd.net
# ################################################################ # ################################################################
# Version numbers # Version numbers
@ -125,14 +102,14 @@ install: libzstd libzstd.pc
@echo zstd static and shared library installed @echo zstd static and shared library installed
uninstall: uninstall:
@rm -f $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT) $(RM) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT)
@rm -f $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) $(RM) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR)
@rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/libzstd.pc $(RM) $(DESTDIR)$(LIBDIR)/pkgconfig/libzstd.pc
@[ -x $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER) ] && rm -f $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER) [ -x $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER) ] && $(RM) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER)
@[ -f $(DESTDIR)$(LIBDIR)/libzstd.a ] && rm -f $(DESTDIR)$(LIBDIR)/libzstd.a @[ -f $(DESTDIR)$(LIBDIR)/libzstd.a ] && $(RM) $(DESTDIR)$(LIBDIR)/libzstd.a
@[ -f $(DESTDIR)$(INCLUDEDIR)/zstd.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/zstd.h @[ -f $(DESTDIR)$(INCLUDEDIR)/zstd.h ] && $(RM) $(DESTDIR)$(INCLUDEDIR)/zstd.h
@[ -f $(DESTDIR)$(INCLUDEDIR)/zbuff.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/zbuff.h @[ -f $(DESTDIR)$(INCLUDEDIR)/zbuff.h ] && $(RM) $(DESTDIR)$(INCLUDEDIR)/zbuff.h
@[ -f $(DESTDIR)$(INCLUDEDIR)/zdict.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/zdict.h @[ -f $(DESTDIR)$(INCLUDEDIR)/zdict.h ] && $(RM) $(DESTDIR)$(INCLUDEDIR)/zdict.h
@echo zstd libraries successfully uninstalled @echo zstd libraries successfully uninstalled
endif endif

View File

@ -1,25 +1,10 @@
# ########################################################################## # ##########################################################################
# ZSTD programs - Makefile # Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
# Copyright (C) Yann Collet 2015-2016 # All rights reserved.
# #
# GPL v2 License # This source code is licensed under the BSD-style license found in the
# # LICENSE file in the root directory of this source tree. An additional grant
# This program is free software; you can redistribute it and/or modify # of patent rights can be found in the PATENTS file in the same directory.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# You can contact the author at :
# - zstd homepage : http://www.zstd.net/
# ########################################################################## # ##########################################################################
# zstd : Command Line Utility, supporting gzip-like arguments # zstd : Command Line Utility, supporting gzip-like arguments
# zstd32 : Same as zstd, but forced to compile in 32-bits mode # zstd32 : Same as zstd, but forced to compile in 32-bits mode
@ -111,7 +96,7 @@ zstd-pgo : clean zstd
./zstd -b $(PROFILE_WITH) ./zstd -b $(PROFILE_WITH)
./zstd -b7i2 $(PROFILE_WITH) ./zstd -b7i2 $(PROFILE_WITH)
./zstd -b5 $(PROFILE_WITH) ./zstd -b5 $(PROFILE_WITH)
rm zstd $(RM) zstd
$(MAKE) zstd MOREFLAGS=-fprofile-use $(MAKE) zstd MOREFLAGS=-fprofile-use
zstd-frugal: $(ZSTDDECOMP_O) $(ZSTD_FILES) zstdcli.c fileio.c zstd-frugal: $(ZSTDDECOMP_O) $(ZSTD_FILES) zstdcli.c fileio.c
@ -131,8 +116,8 @@ zstd-small: clean
clean: clean:
$(MAKE) -C ../lib clean $(MAKE) -C ../lib clean
@rm -f ../lib/decompress/*.o @$(RM) ../lib/decompress/*.o
@rm -f core *.o tmp* result* *.gcda dictionary *.zst \ @$(RM) core *.o tmp* result* *.gcda dictionary *.zst \
zstd$(EXT) zstd32$(EXT) zstd-compress$(EXT) zstd-decompress$(EXT) zstd$(EXT) zstd32$(EXT) zstd-compress$(EXT) zstd-decompress$(EXT)
@echo Cleaning completed @echo Cleaning completed
@ -154,11 +139,11 @@ install: zstd
@echo zstd installation completed @echo zstd installation completed
uninstall: uninstall:
rm -f $(DESTDIR)$(BINDIR)/zstdcat $(RM) $(DESTDIR)$(BINDIR)/zstdcat
rm -f $(DESTDIR)$(BINDIR)/unzstd $(RM) $(DESTDIR)$(BINDIR)/unzstd
[ -x $(DESTDIR)$(BINDIR)/zstd$(EXT) ] && rm -f $(DESTDIR)$(BINDIR)/zstd$(EXT) [ -x $(DESTDIR)$(BINDIR)/zstd$(EXT) ] && $(RM) $(DESTDIR)$(BINDIR)/zstd$(EXT)
rm -f $(DESTDIR)$(MANDIR)/zstdcat.1 $(RM) $(DESTDIR)$(MANDIR)/zstdcat.1
rm -f $(DESTDIR)$(MANDIR)/unzstd.1 $(RM) $(DESTDIR)$(MANDIR)/unzstd.1
[ -f $(DESTDIR)$(MANDIR)/zstd.1 ] && rm -f $(DESTDIR)$(MANDIR)/zstd.1 [ -f $(DESTDIR)$(MANDIR)/zstd.1 ] && $(RM) $(DESTDIR)$(MANDIR)/zstd.1
@echo zstd programs successfully uninstalled @echo zstd programs successfully uninstalled
endif endif