summaryrefslogtreecommitdiffstats
path: root/lib/Makefile
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2018-11-17 13:17:15 (GMT)
committerVincent Torri <vincent.torri@gmail.com>2018-11-17 13:17:15 (GMT)
commitb5e106220ba253fb212670e37d873f7916a88f49 (patch)
tree571403afff2cab622a2c3860b4d02f5cc0c1c89b /lib/Makefile
parentc910db3a41eb654182f1af86dbe4ecd89d53b58c (diff)
downloadlz4-b5e106220ba253fb212670e37d873f7916a88f49.zip
lz4-b5e106220ba253fb212670e37d873f7916a88f49.tar.gz
lz4-b5e106220ba253fb212670e37d873f7916a88f49.tar.bz2
Add DLLTOOL variable so that one can override dlltool binary
This fix cross compilation on linux for Windows
Diffstat (limited to 'lib/Makefile')
-rw-r--r--lib/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Makefile b/lib/Makefile
index f7bd439..f535435 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -54,6 +54,8 @@ DEBUGFLAGS:= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \
CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS)
FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
+DLLTOOL ?= dlltool
+
SRCFILES := $(sort $(wildcard *.c))
@@ -104,7 +106,7 @@ ifeq ($(BUILD_SHARED),yes) # can be disabled on command line
@echo compiling dynamic library $(LIBVER)
ifneq (,$(filter Windows%,$(OS)))
$(Q)$(CC) $(FLAGS) -DLZ4_DLL_EXPORT=1 -shared $^ -o dll/$@.dll
- dlltool -D dll/liblz4.dll -d dll/liblz4.def -l dll/liblz4.lib
+ $(DLLTOOL) -D dll/liblz4.dll -d dll/liblz4.def -l dll/liblz4.lib
else
$(Q)$(CC) $(FLAGS) -shared $^ -fPIC -fvisibility=hidden $(SONAME_FLAGS) -o $@
@echo creating versioned links