summaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-06-23 14:15:11 +0000
committerEric Andersen <andersen@codepoet.org>2001-06-23 14:15:11 +0000
commitc5207a5547426030930716fbd0de0de064c2f27b (patch)
tree687fa7cd6f34260b4f4a4de8a42f2fc698e6f489 /Rules.mak
parentf0d383b45bf6b28ab8e579d7da3288ac16cdef64 (diff)
Make PIC a config option
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak6
1 files changed, 5 insertions, 1 deletions
diff --git a/Rules.mak b/Rules.mak
index cb27da4dc..7b8223950 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -45,7 +45,7 @@ endif
ARFLAGS=r
-CCFLAGS=$(WARNINGS) $(OPTIMIZATION) -fPIC -fno-builtin -nostdinc $(CPUFLAGS) -I$(TOPDIR)include -I$(GCCINCDIR) -I. -D_LIBC
+CCFLAGS=$(WARNINGS) $(OPTIMIZATION) -fno-builtin -nostdinc $(CPUFLAGS) -I$(TOPDIR)include -I$(GCCINCDIR) -I. -D_LIBC
TARGET_CCFLAGS=--uclibc-use-build-dir $(WARNINGS) $(OPTIMIZATION) $(CPUFLAGS)
CFLAGS=$(ARCH_CFLAGS) $(CCFLAGS) $(DEFS) $(ARCH_CFLAGS2)
@@ -64,6 +64,10 @@ else
LDFLAGS = -s -nostdlib -Wl,-warn-common
TARGET_LDFLAGS = --uclibc-use-build-dir -s -Wl,-warn-common
endif
+ifeq ($(strip $(DOPIC)),true)
+ CFLAGS += -fPIC -D__PIC__
+endif
+
ifndef $(PREFIX)
PREFIX = `pwd`/_install