libjson: ensure shared lib is built with -fPIC

Fixes http://autobuild.buildroot.net/results/72e6c260c9028dd636965b8bf76bb7ba216aa1a4/build-end.log

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Peter Korsgaard 2013-05-03 13:10:23 +02:00
parent 97387cda09
commit 80e7419680

View File

@ -11,8 +11,16 @@ LIBJSON_INSTALL_STAGING = YES
LIBJSON_LICENSE = BSD-2c
LIBJSON_LICENSE_FILES = License.txt
LIBJSON_MAKE_OPT = BUILD_TYPE= SHARED=$(if $(BR2_PREFER_STATIC_LIB),0,1) \
CXXFLAGS="$(TARGET_CXXFLAGS) -DNDEBUG"
LIBJSON_CXXFLAGS = $(TARGET_CFLAGS) -DNDEBUG
ifeq ($(BR2_PREFER_STATIC_LIB),y)
LIBJSON_MAKE_OPT += SHARED=0
else
LIBJSON_MAKE_OPT += SHARED=1
LIBJSON_CXXFLAGS += -fPIC
endif
LIBJSON_MAKE_OPT += BUILD_TYPE= CXXFLAGS="$(LIBJSON_CXXFLAGS)"
define LIBJSON_EXTRACT_CMDS
unzip -d $(@D) $(DL_DIR)/$(LIBJSON_SOURCE)