mirror of
https://github.com/lz4/lz4.git
synced 2024-11-23 18:04:05 +08:00
Add DLLTOOL variable so that one can override dlltool binary
This fix cross compilation on linux for Windows
This commit is contained in:
parent
c910db3a41
commit
b5e106220b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user