summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-08-06 22:10:20 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-08-06 22:10:20 +0000
commit05e6976da2fd9ee5d91bfe8b1aaa2e803158b03a (patch)
treed946749747a95dabe9820eb616ca871060abf42c
parentc786c39b77da9a90938988f417725c966040e0f3 (diff)
add a variable that contains the proper architecture-dependent -fPIC/-fpic cflag for building shared libraries
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12224 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--rules.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/rules.mk b/rules.mk
index 5a54c536d..6b081bba5 100644
--- a/rules.mk
+++ b/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