summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2018-05-29 21:20:48 (GMT)
committerGitHub <noreply@github.com>2018-05-29 21:20:48 (GMT)
commitef4f1e3047443c58786c6531ae9718ce07e0be68 (patch)
tree25943e410e45459784a77ab6631630b16e668149 /lib
parent6a5f8d51005726b472ba8c4e350187b25b79f310 (diff)
parent6a7af839b8b71e6db4825684ab2c49d574214f97 (diff)
downloadlz4-ef4f1e3047443c58786c6531ae9718ce07e0be68.zip
lz4-ef4f1e3047443c58786c6531ae9718ce07e0be68.tar.gz
lz4-ef4f1e3047443c58786c6531ae9718ce07e0be68.tar.bz2
Merge pull request #542 from wbx-github/dev
allow to override uname when cross-compiling
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Makefile b/lib/Makefile
index d2ce31d..6b37839 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -45,6 +45,7 @@ LIBVER := $(shell echo $(LIBVER_SCRIPT))
BUILD_SHARED:=yes
BUILD_STATIC:=yes
+OS ?= $(shell uname)
CPPFLAGS+= -DXXH_NAMESPACE=LZ4_
CFLAGS ?= -O3
DEBUGFLAGS:= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \
@@ -58,7 +59,7 @@ SRCFILES := $(sort $(wildcard *.c))
# OS X linker doesn't support -soname, and use different extension
# see : https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html
-ifeq ($(shell uname), Darwin)
+ifeq ($(OS), Darwin)
SHARED_EXT = dylib
SHARED_EXT_MAJOR = $(LIBVER_MAJOR).$(SHARED_EXT)
SHARED_EXT_VER = $(LIBVER).$(SHARED_EXT)
@@ -142,14 +143,14 @@ libdir ?= $(LIBDIR)
INCLUDEDIR ?= $(prefix)/include
includedir ?= $(INCLUDEDIR)
-ifneq (,$(filter $(shell uname),OpenBSD FreeBSD NetBSD DragonFly))
+ifneq (,$(filter $(OS),OpenBSD FreeBSD NetBSD DragonFly))
PKGCONFIGDIR ?= $(prefix)/libdata/pkgconfig
else
PKGCONFIGDIR ?= $(libdir)/pkgconfig
endif
pkgconfigdir ?= $(PKGCONFIGDIR)
-ifneq (,$(filter $(shell uname),SunOS))
+ifneq (,$(filter $(OS),SunOS))
INSTALL ?= ginstall
else
INSTALL ?= install