1 # ################################################################
2 # Copyright (c) 2016-2020, Yann Collet, Facebook, Inc.
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 # ################################################################
16 CFLAGS ?
= -O3
# can select custom flags. For example : CFLAGS="-O2 -g" make
17 CFLAGS
+= -Wall
-Wextra
-Wundef
-Wcast-qual
-Wcast-align
-Wshadow
-Wswitch-enum \
18 -Wdeclaration-after-statement
-Wstrict-prototypes \
19 -Wpointer-arith
-Wstrict-aliasing
=1
20 CFLAGS
+= $(MOREFLAGS
)
21 CPPFLAGS
:= -I
$(ZSTDDIR
) -DXXH_NAMESPACE
=ZSTD_
22 FLAGS
:= $(CFLAGS
) $(CPPFLAGS
) $(LDFLAGS
)
25 # Define *.exe as extension for Windows systems
26 ifneq (,$(filter Windows
%,$(OS
)))
32 .PHONY
: default fullbench-dll fullbench-lib
37 all: fullbench-dll fullbench-lib
40 fullbench-lib
: fullbench.c datagen.c
41 $(CC
) $(FLAGS
) $^
-o
$@
$(EXT
) $(LIBDIR
)/libzstd_static.lib
43 fullbench-dll
: fullbench.c datagen.c
44 $(CC
) $(FLAGS
) $^
-o
$@
$(EXT
) -DZSTD_DLL_IMPORT
=1 $(DLLDIR
)/libzstd.dll
47 @
$(RM
) fullbench-dll
$(EXT
) fullbench-lib
$(EXT
) \
48 @echo Cleaning completed