]> git.proxmox.com Git - ceph.git/blob - ceph/src/zstd/lib/dll/example/Makefile
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / zstd / lib / dll / example / Makefile
1 # ##########################################################################
2 # Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
3 # All rights reserved.
4 #
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 # ##########################################################################
9
10 VOID := /dev/null
11 ZSTDDIR := ../include
12 LIBDIR := ../static
13 DLLDIR := ../dll
14
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)
22
23
24 # Define *.exe as extension for Windows systems
25 ifneq (,$(filter Windows%,$(OS)))
26 EXT =.exe
27 else
28 EXT =
29 endif
30
31 .PHONY: default fullbench-dll fullbench-lib
32
33
34 default: all
35
36 all: fullbench-dll fullbench-lib
37
38
39 fullbench-lib: fullbench.c datagen.c
40 $(CC) $(FLAGS) $^ -o $@$(EXT) $(LIBDIR)/libzstd_static.lib
41
42 fullbench-dll: fullbench.c datagen.c
43 $(CC) $(FLAGS) $^ -o $@$(EXT) -DZSTD_DLL_IMPORT=1 $(DLLDIR)/libzstd.dll
44
45 clean:
46 @$(RM) fullbench-dll$(EXT) fullbench-lib$(EXT) \
47 @echo Cleaning completed