Browse Source

make sure to use makefile.shared on Mac

Steffen Jaeckel 8 years ago
parent
commit
3995f971d7
3 changed files with 10 additions and 6 deletions
  1. 8 4
      makefile
  2. 2 0
      makefile.shared
  3. 0 2
      makefile_include.mk

+ 8 - 4
makefile

@@ -13,14 +13,18 @@ silent=@
 silent_stdout= > /dev/null
 silent_stdout= > /dev/null
 endif
 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
 # ranlib tools
 ifndef RANLIB
 ifndef RANLIB
-ifeq ($(PLATFORM), Darwin)
-RANLIB:=$(PREFIX)ranlib -c
-else
 RANLIB:=$(PREFIX)ranlib
 RANLIB:=$(PREFIX)ranlib
 endif
 endif
-endif
 INSTALL_CMD = install
 INSTALL_CMD = install
 
 
 #Output filenames for various targets.
 #Output filenames for various targets.

+ 2 - 0
makefile.shared

@@ -7,6 +7,8 @@
 #
 #
 #  (GNU make only)
 #  (GNU make only)
 
 
+PLATFORM := $(shell uname | sed -e 's/_.*//')
+
 ifndef LT
 ifndef LT
   ifeq ($(PLATFORM), Darwin)
   ifeq ($(PLATFORM), Darwin)
     LT:=glibtool
     LT:=glibtool

+ 0 - 2
makefile_include.mk

@@ -7,8 +7,6 @@ VERSION=1.17
 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
 VERSION_LT=0:117
 VERSION_LT=0:117
 
 
-PLATFORM := $(shell uname | sed -e 's/_.*//')
-
 # Compiler and Linker Names
 # Compiler and Linker Names
 ifndef PREFIX
 ifndef PREFIX
   PREFIX:=
   PREFIX:=