Skip to content

Commit

Permalink
two hacks to PocketBook SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
chrox committed Jan 17, 2015
1 parent d6a075a commit 877d3b5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,15 @@ $(ZMQ_LIB):
-$(MAKE) -j$(PROCESSORS) -C $(ZMQ_DIR)/build --silent uninstall
$(MAKE) -j$(PROCESSORS) -C $(ZMQ_DIR)/build --silent install
cp -fL $(ZMQ_DIR)/build/$(if $(WIN32),bin,lib)/$(notdir $(ZMQ_LIB)) $@
ifdef POCKETBOOK
# when cross compiling libtool would find libstdc++.la in wrong location
# accoding to the GCC configuration
sed -i 's|^dependency_libs=.*|dependency_libs=" -lrt -lpthread -lstdc++"|g' \
$(ZMQ_DIR)/build/lib/libzmq.la
# and the libuuid.so is also missing in the PocketBook SDK, but libuuid.la
# may let the build system assume that libuuid is installed
rm -f $(CURDIR)/$(POCKETBOOK_TOOLCHAIN)/arm-obreey-linux-gnueabi/sysroot/usr/lib/libuuid*
endif

$(CZMQ_LIB): $(ZMQ_LIB)
mkdir -p $(CZMQ_DIR)/build
Expand All @@ -458,7 +467,7 @@ $(CZMQ_LIB): $(ZMQ_LIB)
# patch: add _DEFAULT_SOURCE define for glibc starting at version 2.20
-cd $(CZMQ_DIR) && patch -N -p1 < ../czmq_default_source_define.patch
-$(MAKE) -j$(PROCESSORS) -C $(CZMQ_DIR)/build --silent uninstall
-$(MAKE) -j$(PROCESSORS) -C $(CZMQ_DIR)/build --silent install
$(MAKE) -j$(PROCESSORS) -C $(CZMQ_DIR)/build --silent install
-cd $(CZMQ_DIR) && patch -R -p1 < ../zbeacon.patch
-cd $(CZMQ_DIR) && patch -R -p1 < ../czmq_default_source_define.patch
cp -fL $(CZMQ_DIR)/build/$(if $(WIN32),bin,lib)/$(notdir $(CZMQ_LIB)) $@
Expand All @@ -480,7 +489,7 @@ $(FILEMQ_LIB): $(ZMQ_LIB) $(CZMQ_LIB) $(OPENSSL_LIB)
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool && \
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
-$(MAKE) -j$(PROCESSORS) -C $(FILEMQ_DIR)/build --silent uninstall
-$(MAKE) -j$(PROCESSORS) -C $(FILEMQ_DIR)/build --silent install
$(MAKE) -j$(PROCESSORS) -C $(FILEMQ_DIR)/build --silent install
cp -fL $(FILEMQ_DIR)/build/$(if $(WIN32),bin,lib)/$(notdir $(FILEMQ_LIB)) $@

$(ZYRE_LIB): $(ZMQ_LIB) $(CZMQ_LIB)
Expand All @@ -500,7 +509,7 @@ $(ZYRE_LIB): $(ZMQ_LIB) $(CZMQ_LIB)
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool && \
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
-$(MAKE) -j$(PROCESSORS) -C $(ZYRE_DIR)/build --silent uninstall
-$(MAKE) -j$(PROCESSORS) -C $(ZYRE_DIR)/build --silent install
$(MAKE) -j$(PROCESSORS) -C $(ZYRE_DIR)/build --silent install
cp -fL $(ZYRE_DIR)/build/$(if $(WIN32),bin,lib)/$(notdir $(ZYRE_LIB)) $@

# ===========================================================================
Expand All @@ -518,6 +527,7 @@ android-toolchain:
# pocketbook-free SDK: https://github.com/pocketbook-free/SDK_481

pocketbook-toolchain:
mkdir -p toolchain
cd toolchain && \
git clone https://github.com/pocketbook-free/SDK_481 pocketbook-toolchain

Expand Down
5 changes: 4 additions & 1 deletion Makefile.defs
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,17 @@ ifeq ($(TARGET), kobo)
ARM_ARCH:=$(ARMV7_A8_ARCH)
ARM_ARCH+=-mfloat-abi=hard
COMPAT_CFLAGS:=$(UBUNTU_COMPAT_CFLAGS)
COMPAT_CXXFLAGS:=$(UBUNTU_COMPAT_CFLAGS)
else ifeq ($(TARGET), kindle)
ARM_ARCH:=$(ARMV7_A8_ARCH)
ARM_ARCH+=-mfloat-abi=softfp
COMPAT_CFLAGS:=$(UBUNTU_COMPAT_CFLAGS)
COMPAT_CXXFLAGS:=$(UBUNTU_COMPAT_CFLAGS)
else ifeq ($(TARGET), pocketbook)
ARM_ARCH:=$(ARMV7_A8_ARCH)
ARM_ARCH+=-mfloat-abi=softfp
COMPAT_CFLAGS:=$(UBUNTU_COMPAT_CFLAGS) -std=gnu99 --sysroot $(SYSROOT)
COMPAT_CXXFLAGS:=$(UBUNTU_COMPAT_CFLAGS) --sysroot $(SYSROOT)
else ifeq ($(TARGET), kindle5)
ARM_ARCH:=$(ARMV7_A8_ARCH)
ARM_ARCH+=-mfloat-abi=softfp
Expand Down Expand Up @@ -221,7 +224,7 @@ else
CXX:=$(strip $(CCACHE) $(CXX))
AR:=$(strip $(CCACHE) $(AR))
CFLAGS+= $(ARM_ARCH) $(COMPAT_CFLAGS)
CXXFLAGS+= $(ARM_ARCH) $(COMPAT_CFLAGS) $(COMPAT_CXXFLAGS)
CXXFLAGS+= $(ARM_ARCH) $(COMPAT_CXXFLAGS)
endif

# not necessary to use PIC flag for win32 which has relocation table in dll
Expand Down

0 comments on commit 877d3b5

Please sign in to comment.