1 # ##########################################################################
2 # Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
5 # This source code is licensed under the BSD-style license found in the
6 # LICENSE file in the root directory of this source tree. An additional grant
7 # of patent rights can be found in the PATENTS file in the same directory.
8 # ##########################################################################
15 CFLAGS ?
= -O3
# can select custom flags. For example : CFLAGS="-O2 -g" make
16 CFLAGS
+= -Wall
-Wextra
-Wundef
-Wcast-qual
-Wcast-align
-Wshadow
-Wswitch-enum \
17 -Wdeclaration-after-statement
-Wstrict-prototypes \
18 -Wpointer-arith
-Wstrict-aliasing
=1
19 CFLAGS
+= $(MOREFLAGS
)
20 CPPFLAGS
:= -I
$(ZSTDDIR
) -DXXH_NAMESPACE
=ZSTD_
21 FLAGS
:= $(CFLAGS
) $(CPPFLAGS
) $(LDFLAGS
)
24 # Define *.exe as extension for Windows systems
25 ifneq (,$(filter Windows
%,$(OS
)))
31 .PHONY
: default fullbench-dll fullbench-lib
36 all: fullbench-dll fullbench-lib
39 fullbench-lib
: fullbench.c datagen.c
40 $(CC
) $(FLAGS
) $^
-o
$@
$(EXT
) $(LIBDIR
)/libzstd_static.lib
42 fullbench-dll
: fullbench.c datagen.c
43 $(CC
) $(FLAGS
) $^
-o
$@
$(EXT
) -DZSTD_DLL_IMPORT
=1 $(DLLDIR
)/libzstd.dll
46 @
$(RM
) fullbench-dll
$(EXT
) fullbench-lib
$(EXT
) \
47 @echo Cleaning completed