diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-10-30 10:37:05 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-10-30 10:37:05 +0000 |
commit | f65cd7e93eeb39d7ebb4066793345dd45051abe2 (patch) | |
tree | 4993379e0551f92c46252442cb5f705c620fd9b3 /Makefile | |
parent | 88805f471a66064c778ea49ef22287fcd37deb93 (diff) | |
download | skalibs-f65cd7e93eeb39d7ebb4066793345dd45051abe2.tar.xz |
Make all-pic a user option
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 := \ |