diff options
author | Przemyslaw Skibinski <inikep@gmail.com> | 2016-11-09 14:19:29 (GMT) |
---|---|---|
committer | Przemyslaw Skibinski <inikep@gmail.com> | 2016-11-09 14:19:29 (GMT) |
commit | ca80a7c8f77f5405cba5b8a52abb1dda78602bf7 (patch) | |
tree | df9a1e400bd591cc8f7572fef2bc995d33c003e0 /lib/Makefile | |
parent | 67fd5dffd9769a3d7fe8436bd79e05df7afd7b05 (diff) | |
download | lz4-ca80a7c8f77f5405cba5b8a52abb1dda78602bf7.zip lz4-ca80a7c8f77f5405cba5b8a52abb1dda78602bf7.tar.gz lz4-ca80a7c8f77f5405cba5b8a52abb1dda78602bf7.tar.bz2 |
create DLL with MinGW/MSYS
Diffstat (limited to 'lib/Makefile')
-rw-r--r-- | lib/Makefile | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Makefile b/lib/Makefile index 3d251dc..6e58bb0 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -70,21 +70,27 @@ else SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER) endif -default: liblz4 +default: all -all: liblz4 +all: liblz4.a liblz4 -liblz4: *.c +liblz4.a: *.c ifeq ($(BUILD_STATIC),yes) @echo compiling static library @$(CC) $(FLAGS) -c $^ - @$(AR) rcs $@.a *.o + @$(AR) rcs $@ *.o endif + +liblz4: *.c @echo compiling dynamic library $(LIBVER) +ifneq (,$(filter Windows%,$(OS))) + @$(CC) $(FLAGS) -shared $^ -o $@.dll -Wl,--out-implib,liblz4.dll.a +else @$(CC) $(FLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER) @echo creating versioned links @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR) @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT) +endif clean: @$(RM) -f core *.o *.a *.$(SHARED_EXT) *.$(SHARED_EXT).* liblz4.pc |