summaryrefslogtreecommitdiffstats
path: root/lib/dll/example/Makefile
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2016-11-16 16:55:16 (GMT)
committerGitHub <noreply@github.com>2016-11-16 16:55:16 (GMT)
commite9bec0fdcce0bdf68814bd03f1f0c03659494439 (patch)
tree3cd6d93f92a261e3db26ea2aa400440d9f42aa10 /lib/dll/example/Makefile
parent00fa1b9c018cf7dc80a07a1192555469577c675c (diff)
parentb1519f861c56db7623b23151dd986fef96f069c9 (diff)
downloadlz4-e9bec0fdcce0bdf68814bd03f1f0c03659494439.zip
lz4-e9bec0fdcce0bdf68814bd03f1f0c03659494439.tar.gz
lz4-e9bec0fdcce0bdf68814bd03f1f0c03659494439.tar.bz2
Merge pull request #271 from inikep/dev
lz4_x64.zip
Diffstat (limited to 'lib/dll/example/Makefile')
-rw-r--r--lib/dll/example/Makefile63
1 files changed, 63 insertions, 0 deletions
diff --git a/lib/dll/example/Makefile b/lib/dll/example/Makefile
new file mode 100644
index 0000000..e987956
--- /dev/null
+++ b/lib/dll/example/Makefile
@@ -0,0 +1,63 @@
+# ##########################################################################
+# LZ4 programs - Makefile
+# Copyright (C) Yann Collet 2016
+#
+# GPL v2 License
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# You can contact the author at :
+# - LZ4 homepage : http://www.lz4.org
+# - LZ4 source repository : https://github.com/lz4/lz4
+# ##########################################################################
+
+VOID := /dev/null
+LZ4DIR := ../include
+LIBDIR := ../static
+DLLDIR := ../dll
+
+CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make
+CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum \
+ -Wdeclaration-after-statement -Wstrict-prototypes \
+ -Wpointer-arith -Wstrict-aliasing=1
+CFLAGS += $(MOREFLAGS)
+CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
+FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+
+
+# Define *.exe as extension for Windows systems
+ifneq (,$(filter Windows%,$(OS)))
+EXT =.exe
+else
+EXT =
+endif
+
+.PHONY: default fullbench-dll fullbench-lib
+
+
+default: all
+
+all: fullbench-dll fullbench-lib
+
+
+fullbench-lib: fullbench.c xxhash.c
+ $(CC) $(FLAGS) $^ -o $@$(EXT) $(LIBDIR)/liblz4_static.lib
+
+fullbench-dll: fullbench.c xxhash.c
+ $(CC) $(FLAGS) $^ -o $@$(EXT) -DLZ4_DLL_IMPORT=1 $(DLLDIR)/liblz4.dll
+
+clean:
+ @$(RM) fullbench-dll$(EXT) fullbench-lib$(EXT) \
+ @echo Cleaning completed