From f65cd7e93eeb39d7ebb4066793345dd45051abe2 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 30 Oct 2017 10:37:05 +0000 Subject: Make all-pic a user option --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 65b9619..f40335b 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,6 @@ version_M := $(basename $(version_m)) version_l := $(basename $(version_M)) CPPFLAGS_ALL := $(CPPFLAGS_AUTO) $(CPPFLAGS) CFLAGS_ALL := $(CFLAGS_AUTO) $(CFLAGS) -CFLAGS_SHARED := -fPIC LDFLAGS_ALL := $(LDFLAGS_AUTO) $(LDFLAGS) LDLIBS_ALL := $(LDLIBS_AUTO) $(LDLIBS) REALCC = $(CROSS_COMPILE)$(CC) @@ -35,10 +34,12 @@ TYPES := size uid gid pid time dev ino ALL_SRCS := $(wildcard src/lib*/*.c) ALL_DOBJS := $(ALL_SRCS:%.c=%.lo) -ifeq ($(strip $(DEFAULT_PIE)),) +ifeq ($(strip $(STATIC_LIBS_ARE_PIC)),) ALL_SOBJS := $(ALL_SRCS:%.c=%.o) +CFLAGS_SHARED := -fPIC else ALL_SOBJS := $(ALL_DOBJS) +CFLAGS_SHARED := endif ALL_LIBS := $(SHARED_LIBS) $(STATIC_LIBS) BUILT_INCLUDES := \ -- cgit v1.2.3