]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed MinGW compilation
authorPrzemyslaw Skibinski <inikep@gmail.com>
Thu, 3 Nov 2016 11:59:20 +0000 (12:59 +0100)
committerPrzemyslaw Skibinski <inikep@gmail.com>
Thu, 3 Nov 2016 11:59:20 +0000 (12:59 +0100)
Makefile
lib/Makefile
programs/Makefile

index 96f5a9ad85606615def863be07c04b387f0c4509..a57587341861ac74cd257c258b59173b8f8c58d7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,10 +14,12 @@ ZWRAPDIR = zlibWrapper
 TESTDIR  = tests
 
 # Define nul output
+VOID = /dev/null
+
 ifneq (,$(filter Windows%,$(OS)))
-VOID = nul
+EXT =.exe
 else
-VOID = /dev/null
+EXT =
 endif
 
 .PHONY: default
@@ -35,7 +37,7 @@ lib:
 
 zstd:
        @$(MAKE) -C $(PRGDIR)
-       cp $(PRGDIR)/zstd .
+       cp $(PRGDIR)/zstd$(EXT) .
 
 .PHONY: zlibwrapper
 zlibwrapper:
@@ -51,7 +53,7 @@ clean:
        @$(MAKE) -C $(PRGDIR) $@ > $(VOID)
        @$(MAKE) -C $(TESTDIR) $@ > $(VOID)
        @$(MAKE) -C $(ZWRAPDIR) $@ > $(VOID)
-       @$(RM) zstd
+       @$(RM) zstd$(EXT)
        @echo Cleaning completed
 
 
index 04ebe26bd26e1d239ae8d0f77111e615905ab779..cfc3028ebcf386d063b32f263ddc9c91bcd87628 100644 (file)
@@ -73,9 +73,11 @@ $(LIBZSTD): LDFLAGS += -shared -fPIC
 $(LIBZSTD): $(ZSTD_FILES)
        @echo compiling dynamic library $(LIBVER)
        @$(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@
+ifeq (,$(filter Windows%,$(OS)))
        @echo creating versioned links
        @ln -sf $@.$(SHARED_EXT_VER) libzstd.$(SHARED_EXT_MAJOR)
        @ln -sf $@.$(SHARED_EXT_VER) libzstd.$(SHARED_EXT)
+endif
 
 libzstd : $(LIBZSTD)
 
index 64aeb668d3c01b64a56d38b1e7ef1f3c96402bf6..b72cebdb1689f7adb8b74f3a207f9620c6943ac7 100644 (file)
@@ -56,7 +56,6 @@ endif
 # Define *.exe as extension for Windows systems
 ifneq (,$(filter Windows%,$(OS)))
 EXT =.exe
-VOID = nul
 RES64_FILE = windres\zstd64.res
 RES32_FILE = windres\zstd32.res
 ifneq (,$(filter x86_64%,$(shell $(CC) -dumpmachine)))
@@ -66,7 +65,6 @@ else
 endif
 else
 EXT =
-VOID = /dev/null
 endif