3 MULTITHREAD_LDFLAGS
= -pthread
4 DEBUGFLAGS
= -g
-DZSTD_DEBUG
=1
5 CPPFLAGS
+= -I
$(ZSTDDIR
) -I
$(ZSTDDIR
)/common
-I
$(ZSTDDIR
)/compress \
6 -I
$(ZSTDDIR
)/dictBuilder
-I
$(ZSTDDIR
)/deprecated
-I
$(PRGDIR
)
8 CFLAGS
+= -Wall
-Wextra
-Wcast-qual
-Wcast-align
-Wshadow \
9 -Wstrict-aliasing
=1 -Wswitch-enum
-Wdeclaration-after-statement \
10 -Wstrict-prototypes
-Wundef \
11 -Wvla
-Wformat
=2 -Winit-self
-Wfloat-equal
-Wwrite-strings \
13 CFLAGS
+= $(DEBUGFLAGS
)
14 CFLAGS
+= $(MOREFLAGS
)
15 FLAGS
= $(CPPFLAGS
) $(CFLAGS
) $(LDFLAGS
) $(MULTITHREAD_LDFLAGS
)
17 harness
: $(HARNESS_FILES
)
18 $(CC
) $(FLAGS
) $^
-o
$@
22 @
$(RM
) -rf harness.dSYM
25 @zstd README.md
-o tmp.zst
26 @.
/harness tmp.zst tmp
27 @diff
-s tmp README.md
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