Browse Source

add a variable that contains the proper architecture-dependent -fPIC/-fpic cflag for building shared libraries

SVN-Revision: 12224
Felix Fietkau 17 years ago
parent
commit
14ac8769b2
1 changed files with 6 additions and 0 deletions
  1. 6 0
      rules.mk

+ 6 - 0
rules.mk

@@ -39,6 +39,12 @@ SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
 
 OPTIMIZE_FOR_CPU=$(ARCH)
 
+ifeq ($(ARCH),powerpc)
+  FPIC:=-fPIC
+else
+  FPIC:=-fpic
+endif
+
 DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl)
 BIN_DIR:=$(TOPDIR)/bin
 INCLUDE_DIR:=$(TOPDIR)/include