xref: /freebsd-12.1/sys/contrib/zstd/doc/educational_decoder/Makefile (revision 0c16b537)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1HARNESS_FILES=*.c
2
3MULTITHREAD_LDFLAGS = -pthread
4DEBUGFLAGS= -g -DZSTD_DEBUG=1
5CPPFLAGS += -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/compress \
6            -I$(ZSTDDIR)/dictBuilder -I$(ZSTDDIR)/deprecated -I$(PRGDIR)
7CFLAGS   ?= -O3
8CFLAGS   += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow                 \
9            -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \
10            -Wstrict-prototypes -Wundef -Wformat-security                   \
11            -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings      \
12            -Wredundant-decls
13CFLAGS   += $(DEBUGFLAGS)
14CFLAGS   += $(MOREFLAGS)
15FLAGS     = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MULTITHREAD_LDFLAGS)
16
17harness: $(HARNESS_FILES)
18	$(CC) $(FLAGS) $^ -o $@
19
20clean:
21	@$(RM) -f harness
22	@$(RM) -rf harness.dSYM
23
24test: harness
25	@zstd README.md -o tmp.zst
26	@./harness tmp.zst tmp
27	@diff -s tmp README.md
28	@$(RM) -f tmp*
29	@zstd --train harness.c zstd_decompress.c zstd_decompress.h README.md
30	@zstd -D dictionary README.md -o tmp.zst
31	@./harness tmp.zst tmp dictionary
32	@diff -s tmp README.md
33	@$(RM) -f tmp* dictionary
34	@make clean
35

served by {OpenGrok

Last Index Update: Tue Oct 21 18:42:31 GMT 2025