The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/zstd/doc/educational_decoder/Makefile

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 # ################################################################
    2 # Copyright (c) Yann Collet, Facebook, Inc.
    3 # All rights reserved.
    4 #
    5 # This source code is licensed under both the BSD-style license (found in the
    6 # LICENSE file in the root directory of this source tree) and the GPLv2 (found
    7 # in the COPYING file in the root directory of this source tree).
    8 # You may select, at your option, one of the above-listed licenses.
    9 # ################################################################
   10 
   11 ZSTD ?= zstd   # note: requires zstd installation on local system
   12 
   13 UNAME?= $(shell uname)
   14 ifeq ($(UNAME), SunOS)
   15 DIFF ?= gdiff
   16 else
   17 DIFF ?= diff
   18 endif
   19 
   20 HARNESS_FILES=*.c
   21 
   22 MULTITHREAD_LDFLAGS = -pthread
   23 DEBUGFLAGS= -g -DZSTD_DEBUG=1
   24 CPPFLAGS += -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/compress \
   25             -I$(ZSTDDIR)/dictBuilder -I$(ZSTDDIR)/deprecated -I$(PRGDIR)
   26 CFLAGS   ?= -O2
   27 CFLAGS   += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow                 \
   28             -Wstrict-aliasing=1 -Wswitch-enum                               \
   29             -Wredundant-decls -Wstrict-prototypes -Wundef                   \
   30             -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings      \
   31             -std=c99
   32 CFLAGS   += $(DEBUGFLAGS)
   33 CFLAGS   += $(MOREFLAGS)
   34 FLAGS     = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MULTITHREAD_LDFLAGS)
   35 
   36 harness: $(HARNESS_FILES)
   37         $(CC) $(FLAGS) $^ -o $@
   38 
   39 clean:
   40         @$(RM) harness *.o
   41         @$(RM) -rf harness.dSYM  # MacOS specific
   42 
   43 test: harness
   44         #
   45         # Testing single-file decompression with educational decoder
   46         #
   47         @$(ZSTD) -f README.md -o tmp.zst
   48         @./harness tmp.zst tmp
   49         @$(DIFF) -s tmp README.md
   50         @$(RM) tmp*
   51         #
   52         # Testing dictionary decompression with education decoder
   53         #
   54         # note : files are presented multiple for training, to reach minimum threshold
   55         @$(ZSTD) --train harness.c zstd_decompress.c zstd_decompress.h README.md \
   56                   harness.c zstd_decompress.c zstd_decompress.h README.md \
   57                   harness.c zstd_decompress.c zstd_decompress.h README.md \
   58                   -o dictionary
   59         @$(ZSTD) -f README.md -D dictionary -o tmp.zst
   60         @./harness tmp.zst tmp dictionary
   61         @$(DIFF) -s tmp README.md
   62         @$(RM) tmp* dictionary

Cache object: fbbdba14a5676ae2768b17f6f92f55cb


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.