summaryrefslogtreecommitdiff
path: root/rules.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-08-06 22:10:20 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-08-06 22:10:20 +0000
commit14ac8769b2833e62eea2248296bc60e536aefe00 (patch)
tree1d880c5a382d0239704e3a5b67f55ebdbb03d22f /rules.mk
parentce8903f1ce41b0ec8b472a430db0bf542905c5e1 (diff)
downloadmtk-20170518-14ac8769b2833e62eea2248296bc60e536aefe00.zip
mtk-20170518-14ac8769b2833e62eea2248296bc60e536aefe00.tar.gz
mtk-20170518-14ac8769b2833e62eea2248296bc60e536aefe00.tar.bz2
add a variable that contains the proper architecture-dependent -fPIC/-fpic cflag for building shared libraries
SVN-Revision: 12224
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/rules.mk b/rules.mk
index 5a54c53..6b081bb 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