fixed MinGW compilation
This commit is contained in:
parent
1f60eb6b17
commit
3a415594b1
12
Makefile
12
Makefile
@ -14,10 +14,12 @@ ZWRAPDIR = zlibWrapper
|
||||
TESTDIR = tests
|
||||
|
||||
# Define nul output
|
||||
ifneq (,$(filter Windows%,$(OS)))
|
||||
VOID = nul
|
||||
else
|
||||
VOID = /dev/null
|
||||
|
||||
ifneq (,$(filter Windows%,$(OS)))
|
||||
EXT =.exe
|
||||
else
|
||||
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
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user