diff --git a/makefile b/makefile index 4620b86..92e1384 100644 --- a/makefile +++ b/makefile @@ -13,14 +13,18 @@ silent=@ silent_stdout= > /dev/null endif +PLATFORM := $(shell uname | sed -e 's/_.*//') + +ifneq ($(MAKECMDGOALS),clean) +ifeq ($(PLATFORM), Darwin) +$(error Can't build static library on Mac, please use makefile.shared) +endif +endif + # ranlib tools ifndef RANLIB -ifeq ($(PLATFORM), Darwin) -RANLIB:=$(PREFIX)ranlib -c -else RANLIB:=$(PREFIX)ranlib endif -endif INSTALL_CMD = install #Output filenames for various targets. diff --git a/makefile.shared b/makefile.shared index e6be085..0e9e6bc 100644 --- a/makefile.shared +++ b/makefile.shared @@ -7,6 +7,8 @@ # # (GNU make only) +PLATFORM := $(shell uname | sed -e 's/_.*//') + ifndef LT ifeq ($(PLATFORM), Darwin) LT:=glibtool diff --git a/makefile_include.mk b/makefile_include.mk index ca1cf29..78b70bc 100644 --- a/makefile_include.mk +++ b/makefile_include.mk @@ -7,8 +7,6 @@ VERSION=1.17 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html VERSION_LT=0:117 -PLATFORM := $(shell uname | sed -e 's/_.*//') - # Compiler and Linker Names ifndef PREFIX PREFIX:=