"Fossies" - the Fresh Open Source Software Archive

Member "xxHash-0.8.0/tests/bench/Makefile" (27 Jul 2020, 2143 Bytes) of package /linux/misc/xxHash-0.8.0.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Makefile": 0.7.3_vs_0.7.4.

    1 # ################################################################
    2 # xxHash benchHash Makefile
    3 # Copyright (C) 2019-2020 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 # benchHash: A generic benchmark for hash algorithms
   26 #            measuring throughput, latency and bandwidth
   27 # ################################################################
   28 
   29 
   30 CPPFLAGS += -I../..   # directory of xxHash source files
   31 CFLAGS   ?= -O3
   32 CFLAGS   += -std=c99 -Wall -Wextra -Wstrict-aliasing=1
   33 CFLAGS   += $(MOREFLAGS)   # custom way to add flags
   34 CXXFLAGS ?= -O3
   35 LDFLAGS  += $(MOREFLAGS)
   36 
   37 
   38 OBJ_LIST  = main.o bhDisplay.o benchHash.o benchfn.o timefn.o
   39 
   40 
   41 default: benchHash
   42 
   43 all: benchHash
   44 
   45 benchHash32: CFLAGS   += -m32
   46 benchHash32: CXXFLAGS += -m32
   47 
   48 benchHash_avx2: CFLAGS   += -mavx2
   49 benchHash_avx2: CXXFLAGS += -mavx2
   50 
   51 benchHash_hw: CPPFLAGS += -DHARDWARE_SUPPORT
   52 benchHash_hw: CFLAGS   += -mavx2 -maes
   53 benchHash_hw: CXXFLAGS += -mavx2 -mpclmul -std=c++14
   54 
   55 benchHash benchHash32 benchHash_avx2 benchHash_nosimd benchHash_hw: $(OBJ_LIST)
   56 	$(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ $(LDFLAGS) -o $@
   57 
   58 
   59 main.o: bhDisplay.h hashes.h
   60 
   61 bhDisplay.o: bhDisplay.h benchHash.h
   62 
   63 benchHash.o: benchHash.h
   64 
   65 
   66 clean:
   67 	$(RM) *.o benchHash benchHash32 benchHash_avx2 benchHash_hw