2011-11-14 18:17:14 +00:00
# you can probably leave these settings alone:
2012-06-02 23:49:55 +00:00
LUADIR = luajit-2.0
2011-11-14 18:17:14 +00:00
MUPDFDIR = mupdf
2012-10-01 09:49:31 +00:00
MUPDFTARGET = build/release
2011-11-14 18:17:14 +00:00
MUPDFLIBDIR = $( MUPDFDIR) /$( MUPDFTARGET)
2012-03-04 22:23:01 +00:00
DJVUDIR = djvulibre
2012-07-13 14:33:32 +00:00
KPVCRLIBDIR = kpvcrlib
CRENGINEDIR = $( KPVCRLIBDIR) /crengine
2011-11-14 18:17:14 +00:00
2012-11-11 21:44:16 +00:00
FREETYPEDIR = $( MUPDFDIR) /thirdparty/freetype
JPEGDIR = $( MUPDFDIR) /thirdparty/jpeg
2011-12-02 22:10:59 +00:00
LFSDIR = luafilesystem
2011-11-28 23:07:46 +00:00
2012-10-02 00:16:22 +00:00
POPENNSDIR = popen-noshell
2012-11-07 11:03:32 +00:00
K2PDFOPTLIBDIR = libk2pdfopt
2012-10-02 00:16:22 +00:00
2012-04-07 11:48:21 +00:00
# must point to directory with *.ttf fonts for crengine
2012-04-09 17:04:26 +00:00
TTF_FONTS_DIR = $( MUPDFDIR) /fonts
2012-04-07 11:48:21 +00:00
2011-11-14 18:17:14 +00:00
# set this to your ARM cross compiler:
2012-10-10 20:04:47 +00:00
SHELL := /bin/bash
2012-10-02 21:18:28 +00:00
CHOST ?= arm-none-linux-gnueabi
CC := $( CHOST) -gcc
CXX := $( CHOST) -g++
STRIP := $( CHOST) -strip
2012-10-02 21:21:14 +00:00
AR := $( CHOST) -ar
2012-03-04 22:01:41 +00:00
i f d e f S B O X _ U N A M E _ M A C H I N E
CC:= gcc
CXX:= g++
e n d i f
2011-11-16 22:52:26 +00:00
HOSTCC := gcc
2012-03-03 14:56:07 +00:00
HOSTCXX := g++
2012-10-03 01:15:37 +00:00
HOSTAR := ar
2011-11-14 18:17:14 +00:00
2012-10-02 22:29:10 +00:00
# Base CFLAGS, without arch. We'll need it for luajit, because its Makefiles do some tricky stuff to differentiate HOST/TARGET
2012-10-03 12:54:45 +00:00
BASE_CFLAGS := -O2 -ffast-math -pipe -fomit-frame-pointer
2012-10-02 22:29:10 +00:00
# Use this for debugging:
#BASE_CFLAGS:=-O0 -g
2012-10-03 12:54:45 +00:00
# Misc GCC tricks to ensure backward compatibility with the K2, even when using a fairly recent TC (Linaro/MG).
2012-10-03 14:07:03 +00:00
# NOTE: -mno-unaligned-access is needed for TC based on Linaro 4.6/4.7 or GCC 4.7, or weird crap happens on FW 2.x. We unfortunately can't set it by default, since it's a new flag.
# A possible workaround would be to set the alignment trap to fixup (echo 2 > /proc/cpu/alignment) in the launch script, but that's terribly ugly, and might severly nerf performance...
# That said, MG 2012.03 is still using GCC 4.6.3, so we're good ;).
2012-10-03 12:56:14 +00:00
ARM_BACKWARD_COMPAT_CFLAGS := -fno-stack-protector -U_FORTIFY_SOURCE -D_GNU_SOURCE -fno-finite-math-only
ARM_BACKWARD_COMPAT_CXXFLAGS := -fno-use-cxa-atexit
2012-10-03 12:54:45 +00:00
ARM_ARCH := -march= armv6j -mtune= arm1136jf-s -mfpu= vfp -mfloat-abi= softfp -marm
2012-10-02 22:29:10 +00:00
HOST_ARCH := -march= native
2012-10-02 23:37:20 +00:00
HOSTCFLAGS := $( HOST_ARCH) $( BASE_CFLAGS)
2012-10-02 21:50:34 +00:00
CFLAGS := $( BASE_CFLAGS)
2012-10-03 12:56:14 +00:00
CXXFLAGS := $( BASE_CFLAGS)
2012-10-01 11:35:16 +00:00
LDFLAGS := -Wl,-O1 -Wl,--as-needed
2011-11-14 18:17:14 +00:00
2012-04-09 17:46:10 +00:00
DYNAMICLIBSTDCPP := -lstdc++
i f d e f S T A T I C L I B S T D C P P
DYNAMICLIBSTDCPP:=
e n d i f
2011-11-14 18:17:14 +00:00
# you can configure an emulation for the (eink) framebuffer here.
# the application won't use the framebuffer (and the special e-ink ioctls)
# in that case.
2011-11-16 22:52:26 +00:00
i f d e f E M U L A T E _ R E A D E R
2012-03-22 01:08:31 +00:00
CC:= $( HOSTCC) -g
2012-03-04 22:01:41 +00:00
CXX:= $( HOSTCXX)
2012-10-03 01:15:37 +00:00
AR:= $( HOSTAR)
2012-03-04 22:01:41 +00:00
EMULATE_READER_W?= 824
EMULATE_READER_H?= 1200
EMU_CFLAGS?= $( shell sdl-config --cflags)
EMU_CFLAGS += -DEMULATE_READER \
-DEMULATE_READER_W= $( EMULATE_READER_W) \
2012-03-22 01:08:31 +00:00
-DEMULATE_READER_H= $( EMULATE_READER_H)
2012-03-04 22:01:41 +00:00
EMU_LDFLAGS?= $( shell sdl-config --libs)
2012-06-09 11:38:08 +00:00
ifeq " $( shell uname -s -m) " "Darwin x86_64"
EMU_LDFLAGS += -pagezero_size 10000 -image_base 100000000
endif
2012-10-02 22:29:10 +00:00
CFLAGS += $( HOST_ARCH)
CXXFLAGS += $( HOST_ARCH)
2012-11-02 10:00:15 +00:00
LIBDIR = libs-emu
2012-03-04 15:56:19 +00:00
e l s e
2012-10-03 12:56:14 +00:00
CFLAGS += $( ARM_ARCH) $( ARM_BACKWARD_COMPAT_CFLAGS)
CXXFLAGS += $( ARM_ARCH) $( ARM_BACKWARD_COMPAT_CFLAGS) $( ARM_BACKWARD_COMPAT_CXXFLAGS)
2012-11-02 10:00:15 +00:00
LIBDIR = libs
2011-11-16 22:52:26 +00:00
e n d i f
# standard includes
KPDFREADER_CFLAGS = $( CFLAGS) -I$( LUADIR) /src -I$( MUPDFDIR) /
2012-11-17 13:12:45 +00:00
K2PDFOPT_CFLAGS = -I$( K2PDFOPTLIBDIR) /willuslib -I$( K2PDFOPTLIBDIR) /k2pdfoptlib -I$( K2PDFOPTLIBDIR) /
2011-11-14 18:17:14 +00:00
# enable tracing output:
2011-11-16 23:52:07 +00:00
#KPDFREADER_CFLAGS+= -DMUPDF_TRACE
2011-11-14 18:17:14 +00:00
# for now, all dependencies except for the libc are compiled into the final binary:
2012-02-13 19:13:04 +00:00
MUPDFLIBS := $( MUPDFLIBDIR) /libfitz.a
2012-11-02 20:18:16 +00:00
DJVULIBS := $( DJVUDIR) /build/libdjvu/.libs/libdjvulibre.so \
$( LIBDIR) /libdjvulibre.so
2012-11-05 09:30:40 +00:00
DJVULIB := $( LIBDIR) /libdjvulibre.so.21
2012-10-31 14:34:17 +00:00
DJVULIBDIR := $( DJVUDIR) /build/libdjvu/.libs/
2012-03-28 16:09:26 +00:00
CRENGINELIBS := $( CRENGINEDIR) /crengine/libcrengine.a \
$( CRENGINEDIR) /thirdparty/chmlib/libchmlib.a \
$( CRENGINEDIR) /thirdparty/libpng/libpng.a \
2012-04-24 12:37:16 +00:00
$( CRENGINEDIR) /thirdparty/antiword/libantiword.a
2011-11-16 23:50:10 +00:00
THIRDPARTYLIBS := $( MUPDFLIBDIR) /libfreetype.a \
2012-03-28 16:09:26 +00:00
$( MUPDFLIBDIR) /libopenjpeg.a \
$( MUPDFLIBDIR) /libjbig2dec.a \
2012-04-02 03:52:34 +00:00
$( MUPDFLIBDIR) /libjpeg.a \
2012-03-28 16:09:26 +00:00
$( MUPDFLIBDIR) /libz.a
2012-04-03 18:57:02 +00:00
#@TODO patch crengine to use the latest libjpeg 04.04 2012 (houqp)
2012-04-11 09:13:37 +00:00
#$(MUPDFLIBDIR)/libjpeg.a \
#$(CRENGINEDIR)/thirdparty/libjpeg/libjpeg.a \
2011-11-16 23:50:10 +00:00
2012-11-03 15:08:13 +00:00
LUALIB := $( LIBDIR) /libluajit-5.1.so.2
2011-11-16 23:50:10 +00:00
2012-10-02 21:18:28 +00:00
POPENNSLIB := $( POPENNSDIR) /libpopen_noshell.a
2012-04-06 05:51:37 +00:00
2012-11-09 17:58:51 +00:00
K2PDFOPTLIB := $( LIBDIR) /libk2pdfopt.so.1
2012-11-07 11:03:32 +00:00
2012-10-24 10:24:05 +00:00
all : kpdfview extr
2012-10-02 21:18:28 +00:00
2012-10-07 14:05:00 +00:00
VERSION ?= $( shell git describe HEAD)
2012-11-07 11:03:32 +00:00
kpdfview : kpdfview .o einkfb .o pdf .o blitbuffer .o drawcontext .o koptcontext .o input .o $( POPENNSLIB ) util .o ft .o lfs .o mupdfimg .o $( MUPDFLIBS ) $( THIRDPARTYLIBS ) $( LUALIB ) djvu .o $( DJVULIBS ) cre .o $( CRENGINELIBS ) pic .o pic_jpeg .o
2012-10-07 14:05:00 +00:00
echo $( VERSION) > git-rev
2012-09-16 16:17:47 +00:00
$( CC) \
2012-10-02 00:09:43 +00:00
$( CFLAGS) \
2011-11-14 18:17:14 +00:00
kpdfview.o \
einkfb.o \
pdf.o \
blitbuffer.o \
2012-03-19 21:04:49 +00:00
drawcontext.o \
2012-11-05 15:56:56 +00:00
koptcontext.o \
2011-11-14 18:17:14 +00:00
input.o \
2012-10-03 12:24:40 +00:00
$( POPENNSLIB) \
2011-11-14 18:17:14 +00:00
util.o \
2011-12-01 00:35:53 +00:00
ft.o \
2011-12-02 22:10:59 +00:00
lfs.o \
2012-04-14 20:32:05 +00:00
mupdfimg.o \
2012-11-11 21:44:16 +00:00
pic.o \
pic_jpeg.o \
2012-10-03 12:24:40 +00:00
$( MUPDFLIBS) \
$( THIRDPARTYLIBS) \
2012-03-04 22:23:01 +00:00
djvu.o \
2012-03-28 16:09:26 +00:00
cre.o \
2012-10-03 12:24:40 +00:00
$( CRENGINELIBS) \
2012-04-09 17:46:10 +00:00
$( STATICLIBSTDCPP) \
2012-10-02 00:09:43 +00:00
$( LDFLAGS) \
2012-11-03 22:49:18 +00:00
-Wl,-rpath= $( LIBDIR) / \
2012-10-03 11:56:36 +00:00
-o $@ \
2012-11-11 21:44:16 +00:00
-lm -ldl -lpthread -lk2pdfopt -ldjvulibre -lluajit-5.1 -L$( MUPDFLIBDIR) -L$( LIBDIR) \
2012-10-03 11:56:36 +00:00
$( EMU_LDFLAGS) \
$( DYNAMICLIBSTDCPP)
2011-11-14 18:17:14 +00:00
2012-10-25 09:53:12 +00:00
extr : extr .o $( MUPDFLIBS ) $( THIRDPARTYLIBS )
2012-10-24 10:24:05 +00:00
$( CC) $( CFLAGS) extr.o $( MUPDFLIBS) $( THIRDPARTYLIBS) -lm -o extr
extr.o : %.o : %.c
$( CC) -c -I$( MUPDFDIR) /pdf -I$( MUPDFDIR) /fitz $< -o $@
2012-10-02 01:11:16 +00:00
slider_watcher.o : %.o : %.c
$( CC) -c $( CFLAGS) $< -o $@
2012-10-02 21:18:28 +00:00
slider_watcher : slider_watcher .o $( POPENNSLIB )
$( CC) $( CFLAGS) slider_watcher.o $( POPENNSLIB) -o $@
2011-11-16 22:52:26 +00:00
2012-06-03 22:51:20 +00:00
ft.o : %.o : %.c $( THIRDPARTYLIBS )
2012-03-24 16:47:52 +00:00
$( CC) -c $( KPDFREADER_CFLAGS) -I$( FREETYPEDIR) /include -I$( MUPDFDIR) /fitz $< -o $@
2011-12-01 00:35:53 +00:00
2012-11-07 12:29:51 +00:00
blitbuffer.o util.o drawcontext.o einkfb.o input.o mupdfimg.o : %.o : %.c
2012-04-09 11:00:02 +00:00
$( CC) -c $( KPDFREADER_CFLAGS) $( EMU_CFLAGS) -I$( LFSDIR) /src $< -o $@
2011-11-16 22:52:26 +00:00
2012-11-07 12:29:51 +00:00
kpdfview.o koptcontext.o pdf.o : %.o : %.c
$( CC) -c $( KPDFREADER_CFLAGS) $( K2PDFOPT_CFLAGS) $( EMU_CFLAGS) -I$( LFSDIR) /src $< -o $@
2012-10-16 02:02:38 +00:00
2012-03-01 13:04:46 +00:00
djvu.o : %.o : %.c
2012-11-07 12:29:51 +00:00
$( CC) -c $( KPDFREADER_CFLAGS) $( K2PDFOPT_CFLAGS) -I$( DJVUDIR) / $< -o $@
2012-03-01 13:04:46 +00:00
2012-10-12 08:36:08 +00:00
pic.o : %.o : %.c
$( CC) -c $( KPDFREADER_CFLAGS) $< -o $@
pic_jpeg.o : %.o : %.c
$( CC) -c $( KPDFREADER_CFLAGS) -I$( JPEGDIR) / -I$( MUPDFDIR) /scripts/ $< -o $@
2012-03-28 16:09:26 +00:00
cre.o : %.o : %.cpp
2012-09-29 09:02:55 +00:00
$( CC) -c $( CFLAGS) -I$( CRENGINEDIR) /crengine/include/ -I$( LUADIR) /src $< -o $@
2012-03-28 16:09:26 +00:00
2011-12-02 22:10:59 +00:00
lfs.o : $( LFSDIR ) /src /lfs .c
$( CC) -c $( CFLAGS) -I$( LUADIR) /src -I$( LFSDIR) /src $( LFSDIR) /src/lfs.c -o $@
2011-11-14 18:17:14 +00:00
fetchthirdparty :
2012-10-02 21:18:28 +00:00
rm -rf mupdf/thirdparty
2012-11-04 11:45:24 +00:00
test -d mupdf && ( cd mupdf; git checkout .) || echo warn: mupdf folder not found
2012-06-02 23:49:55 +00:00
test -d $( LUADIR) && ( cd $( LUADIR) ; git checkout .) || echo warn: $( LUADIR) folder not found
2012-03-08 13:03:18 +00:00
git submodule init
2012-03-07 16:19:52 +00:00
git submodule update
2012-11-04 11:45:24 +00:00
cd mupdf && ( git submodule init; git submodule update)
2012-04-07 11:37:13 +00:00
ln -sf kpvcrlib/crengine/cr3gui/data data
2012-06-06 11:41:16 +00:00
test -e data/cr3.css || ln kpvcrlib/cr3.css data/
2012-04-07 11:48:21 +00:00
test -d fonts || ln -sf $( TTF_FONTS_DIR) fonts
2012-11-18 21:03:42 +00:00
test -d history || mkdir history
test -d clipboard || mkdir clipboard
2012-04-11 09:13:37 +00:00
# CREngine patch: disable fontconfig
2012-04-16 08:53:13 +00:00
grep USE_FONTCONFIG $( CRENGINEDIR) /crengine/include/crsetup.h && grep -v USE_FONTCONFIG $( CRENGINEDIR) /crengine/include/crsetup.h > /tmp/new && mv /tmp/new $( CRENGINEDIR) /crengine/include/crsetup.h || echo "USE_FONTCONFIG already disabled"
2012-04-24 03:04:31 +00:00
# CREngine patch: change child nodes' type face
# @TODO replace this dirty hack 24.04 2012 (houqp)
cd kpvcrlib/crengine/crengine/src && \
2012-10-13 18:49:29 +00:00
patch -N -p0 < ../../../lvrend_node_type_face.patch && \
patch -N -p3 < ../../../lvdocview-getCurrentPageLinks.patch || true
2012-04-11 09:13:37 +00:00
# MuPDF patch: use external fonts
2012-04-09 17:04:26 +00:00
cd mupdf && patch -N -p1 < ../mupdf.patch
2012-10-02 22:36:50 +00:00
test -f popen-noshell/popen_noshell.c || svn co http://popen-noshell.googlecode.com/svn/trunk/ popen-noshell
2012-10-02 21:30:12 +00:00
# popen_noshell patch: Make it build on recent TCs, and implement a simple Makefile for building it as a static lib
2012-10-02 22:36:50 +00:00
cd popen-noshell && test -f Makefile || patch -N -p0 < popen_noshell-buildfix.patch
2011-11-14 18:17:14 +00:00
clean :
2012-11-05 18:36:50 +00:00
rm -f *.o kpdfview slider_watcher extr emu_event
2011-11-14 18:17:14 +00:00
cleanthirdparty :
2012-11-02 10:00:15 +00:00
rm -rf $( LIBDIR) ; mkdir $( LIBDIR)
2012-10-20 09:10:39 +00:00
$( MAKE) -C $( LUADIR) CC = " $( HOSTCC) " CFLAGS = " $( BASE_CFLAGS) " clean
2012-10-02 21:18:28 +00:00
$( MAKE) -C $( MUPDFDIR) build = "release" clean
$( MAKE) -C $( CRENGINEDIR) /thirdparty/antiword clean
test -d $( CRENGINEDIR) /thirdparty/chmlib && $( MAKE) -C $( CRENGINEDIR) /thirdparty/chmlib clean || echo warn: chmlib folder not found
test -d $( CRENGINEDIR) /thirdparty/libpng && ( $( MAKE) -C $( CRENGINEDIR) /thirdparty/libpng clean) || echo warn: chmlib folder not found
test -d $( CRENGINEDIR) /crengine && ( $( MAKE) -C $( CRENGINEDIR) /crengine clean) || echo warn: chmlib folder not found
test -d $( KPVCRLIBDIR) && ( $( MAKE) -C $( KPVCRLIBDIR) clean) || echo warn: chmlib folder not found
rm -rf $( DJVUDIR) /build
$( MAKE) -C $( POPENNSDIR) clean
2012-11-07 11:03:32 +00:00
$( MAKE) -C $( K2PDFOPTLIBDIR) clean
2011-11-14 18:17:14 +00:00
2012-11-11 21:44:16 +00:00
$(MUPDFLIBS) $(THIRDPARTYLIBS) :
2011-11-14 18:17:14 +00:00
# build only thirdparty libs, libfitz and pdf utils, which will care for libmupdf.a being built
2012-11-11 21:44:16 +00:00
i f d e f E M U L A T E _ R E A D E R
$( MAKE) -C mupdf XCFLAGS = " $( CFLAGS) -DNOBUILTINFONT " build = "release" CC = " $( CC) " MUPDF = MU_APPS = BUSY_APP = XPS_APPS = verbose = 1 NOX11 = yes
e l s e
# generate data headers
$( MAKE) -C mupdf generate build = "release"
$( MAKE) -C mupdf XCFLAGS = " $( CFLAGS) -DNOBUILTINFONT " build = "release" CC = " $( CC) " MUPDF = MU_APPS = BUSY_APP = XPS_APPS = verbose = 1 NOX11 = yes CROSSCOMPILE = yes OS = Kindle
e n d i f
2011-11-16 23:50:10 +00:00
2012-03-01 13:04:46 +00:00
$(DJVULIBS) :
2012-10-02 21:18:28 +00:00
mkdir -p $( DJVUDIR) /build
2012-03-03 14:56:07 +00:00
i f d e f E M U L A T E _ R E A D E R
2012-10-31 14:34:17 +00:00
cd $( DJVUDIR) /build && CC = " $( HOSTCC) " CXX = " $( HOSTCXX) " CFLAGS = " $( HOSTCFLAGS) " CXXFLAGS = " $( HOSTCFLAGS) " LDFLAGS = " $( LDFLAGS) " ../configure --disable-desktopfiles --disable-static --enable-shared --disable-xmltools --disable-largefile
2012-03-03 14:56:07 +00:00
e l s e
2012-10-31 14:34:17 +00:00
cd $( DJVUDIR) /build && CC = " $( CC) " CXX = " $( CXX) " CFLAGS = " $( CFLAGS) " CXXFLAGS = " $( CXXFLAGS) " LDFLAGS = " $( LDFLAGS) " ../configure --disable-desktopfiles --disable-static --enable-shared --host= $( CHOST) --disable-xmltools --disable-largefile
e n d i f
2012-11-02 10:00:15 +00:00
$( MAKE) -C $( DJVUDIR) /build
test -d $( LIBDIR) || mkdir $( LIBDIR)
cp -a $( DJVULIBDIR) /libdjvulibre.so* $( LIBDIR)
2012-03-01 13:04:46 +00:00
2012-03-28 16:09:26 +00:00
$(CRENGINELIBS) :
2012-07-13 14:33:32 +00:00
cd $( KPVCRLIBDIR) && rm -rf CMakeCache.txt CMakeFiles && \
2012-10-01 11:35:16 +00:00
CFLAGS = " $( CFLAGS) " CXXFLAGS = " $( CXXFLAGS) " CC = " $( CC) " CXX = " $( CXX) " LDFLAGS = " $( LDFLAGS) " cmake . && \
2012-10-02 21:18:28 +00:00
$( MAKE)
2012-03-28 16:09:26 +00:00
2011-11-16 23:50:10 +00:00
$(LUALIB) :
2012-06-02 23:49:55 +00:00
i f d e f E M U L A T E _ R E A D E R
2012-11-03 15:08:13 +00:00
$( MAKE) -C $( LUADIR) BUILDMODE = shared
2012-06-02 23:49:55 +00:00
e l s e
2012-10-02 22:29:10 +00:00
# To recap: build its TARGET_CC from CROSS+CC, so we need HOSTCC in CC. Build its HOST/TARGET_CFLAGS based on CFLAGS, so we need a neutral CFLAGS without arch
2012-11-03 15:08:13 +00:00
$( MAKE) -C $( LUADIR) BUILDMODE = shared CC = " $( HOSTCC) " HOST_CC = " $( HOSTCC) -m32 " CFLAGS = " $( BASE_CFLAGS) " HOST_CFLAGS = " $( HOSTCFLAGS) " TARGET_CFLAGS = " $( CFLAGS) " CROSS = " $( CHOST) - " TARGET_FLAGS = "-DLUAJIT_NO_LOG2 -DLUAJIT_NO_EXP2"
2012-06-02 23:49:55 +00:00
e n d i f
2012-11-03 15:08:13 +00:00
test -d $( LIBDIR) || mkdir $( LIBDIR)
2012-11-11 21:44:16 +00:00
cp -a $( LUADIR) /src/libluajit.so* $( LUALIB)
ln -s libluajit-5.1.so.2 $( LIBDIR) /libluajit-5.1.so
2011-11-14 18:17:14 +00:00
2012-10-02 21:18:28 +00:00
$(POPENNSLIB) :
$( MAKE) -C $( POPENNSDIR) CC = " $( CC) " AR = " $( AR) "
2012-11-07 11:03:32 +00:00
$(K2PDFOPTLIB) :
2012-11-10 11:13:03 +00:00
$( MAKE) -C $( K2PDFOPTLIBDIR) BUILDMODE = shared CC = " $( CC) " CFLAGS = " $( CFLAGS) -O3 " AR = " $( AR) " all
2012-11-09 15:25:01 +00:00
test -d $( LIBDIR) || mkdir $( LIBDIR)
cp -a $( K2PDFOPTLIBDIR) /libk2pdfopt.so* $( LIBDIR)
2012-11-07 11:03:32 +00:00
thirdparty : $( MUPDFLIBS ) $( THIRDPARTYLIBS ) $( LUALIB ) $( DJVULIBS ) $( CRENGINELIBS ) $( POPENNSLIB ) $( K 2PDFOPTLIB )
2011-11-16 23:50:10 +00:00
2012-01-19 18:33:37 +00:00
INSTALL_DIR = kindlepdfviewer
2012-09-17 20:38:05 +00:00
LUA_FILES = reader.lua
2012-04-09 10:59:30 +00:00
customupdate : all
2012-10-24 10:24:05 +00:00
# ensure that the binaries were built for ARM
2012-01-19 18:33:37 +00:00
file kpdfview | grep ARM || exit 1
2012-10-24 10:24:05 +00:00
file extr | grep ARM || exit 1
$( STRIP) --strip-unneeded kpdfview extr
2012-10-02 21:18:28 +00:00
rm -f kindlepdfviewer-$( VERSION) .zip
rm -rf $( INSTALL_DIR)
2012-11-02 09:37:13 +00:00
mkdir -p $( INSTALL_DIR) /{ history,screenshots,clipboard,libs}
2012-10-24 10:24:05 +00:00
cp -p README.md COPYING kpdfview extr kpdf.sh $( LUA_FILES) $( INSTALL_DIR)
2012-04-08 01:58:51 +00:00
mkdir $( INSTALL_DIR) /data
2012-11-11 21:44:16 +00:00
cp -L $( DJVULIB) $( LUALIB) $( K2PDFOPTLIB) $( INSTALL_DIR) /libs
2012-10-31 14:34:17 +00:00
$( STRIP) --strip-unneeded $( INSTALL_DIR) /libs/*
2012-04-08 01:58:51 +00:00
cp -rpL data/*.css $( INSTALL_DIR) /data
2012-04-09 17:32:08 +00:00
cp -rpL fonts $( INSTALL_DIR)
2012-12-12 11:12:20 +00:00
rm $( INSTALL_DIR) /fonts/droid/DroidSansFallbackFull.ttf
2012-10-07 14:05:00 +00:00
cp -r git-rev resources $( INSTALL_DIR)
2012-08-25 14:52:12 +00:00
cp -rpL frontend $( INSTALL_DIR)
2012-04-09 17:32:08 +00:00
mkdir $( INSTALL_DIR) /fonts/host
2012-05-28 17:55:04 +00:00
zip -9 -r kindlepdfviewer-$( VERSION) .zip $( INSTALL_DIR) launchpad/ kite/
2012-10-02 21:18:28 +00:00
rm -rf $( INSTALL_DIR)
2012-01-19 18:33:37 +00:00
@echo " copy kindlepdfviewer- $( VERSION) .zip to /mnt/us/customupdates and install with shift+shift+I "