DLL dependencies moved to lib/dll/
authorPrzemyslaw Skibinski <inikep@gmail.com>
Tue, 15 Nov 2016 10:06:16 +0000 (11:06 +0100)
committerPrzemyslaw Skibinski <inikep@gmail.com>
Tue, 15 Nov 2016 10:06:16 +0000 (11:06 +0100)
lib/Makefile
lib/README.md
lib/dll/liblz4.def [moved from lib/liblz4.def with 100% similarity]
tests/Makefile

index d098846..4c9b929 100644 (file)
@@ -86,8 +86,8 @@ endif
 liblz4: *.c
        @echo compiling dynamic library $(LIBVER)
 ifneq (,$(filter Windows%,$(OS)))
-       @$(CC) $(FLAGS) -DLZ4_DLL_EXPORT=1 -shared $^ -o $@.dll
-       dlltool -D liblz4.dll -d liblz4.def -l liblz4.dll.a
+       @$(CC) $(FLAGS) -DLZ4_DLL_EXPORT=1 -shared $^ -o dll\$@.dll
+       dlltool -D dll\liblz4.dll -d dll\liblz4.def -l dll\liblz4.lib
 else
        @$(CC) $(FLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER)
        @echo creating versioned links
@@ -96,7 +96,7 @@ else
 endif
 
 clean:
-       @$(RM) -f core *.o *.a *.$(SHARED_EXT) *.$(SHARED_EXT).* liblz4.pc
+       @$(RM) -f core *.o *.a *.$(SHARED_EXT) *.$(SHARED_EXT).* liblz4.pc dll/liblz4.dll dll/liblz4.lib
        @echo Cleaning library completed
 
 
index 19f429a..430be1f 100644 (file)
@@ -41,12 +41,12 @@ It must be used with static linking ***only***.
 #### Using MinGW+MSYS to create DLL
 
 DLL can be created using MinGW+MSYS with the `make liblz4` command.
-This command creates `liblz4.dll` and the import library `liblz4.dll.a`.
+This command creates `dll\liblz4.dll` and the import library `dll\liblz4.lib`.
 To compile a project the import library has to be added to linking options.
 It means that if a project that uses LZ4 consists of a single `test-dll.c`
-file it should be compiled with "liblz4.dll.a". For example:
+file it should be compiled with "liblz4.lib". For example:
 ```
-    gcc $(CFLAGS) test-dll.c -o test-dll liblz4.dll.a
+    gcc $(CFLAGS) test-dll.c -o test-dll liblz4.lib
 ```
 
 
similarity index 100%
rename from lib/liblz4.def
rename to lib/dll/liblz4.def
index a11cf9b..2132f85 100644 (file)
@@ -94,7 +94,7 @@ fullbench-lib: fullbench.c $(LZ4DIR)/xxhash.c
 
 fullbench-dll: fullbench.c $(LZ4DIR)/xxhash.c
        $(MAKE) -C $(LZ4DIR) liblz4
-       $(CC) $(FLAGS) $^ -o $@$(EXT) -DLZ4_DLL_IMPORT=1 $(LZ4DIR)/liblz4.dll.a
+       $(CC) $(FLAGS) $^ -o $@$(EXT) -DLZ4_DLL_IMPORT=1 $(LZ4DIR)/dll/liblz4.lib
 
 fuzzer  : $(LZ4DIR)/lz4.o $(LZ4DIR)/lz4hc.o $(LZ4DIR)/xxhash.o fuzzer.c
        $(CC) $(FLAGS) $^ -o $@$(EXT)