2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00

add android build target

This commit is contained in:
chrox 2014-05-25 16:18:55 +08:00
parent 4e055b97d3
commit 599c02ffcf
2 changed files with 12 additions and 5 deletions

View File

@ -7,8 +7,11 @@ KOR_BASE?=koreader-base
# we want VERSION to carry the version of koreader, not koreader-base # we want VERSION to carry the version of koreader, not koreader-base
VERSION=$(shell git describe HEAD) VERSION=$(shell git describe HEAD)
REVISION=$(shell git rev-parse --short HEAD)
# subdirectory we use to build the installation bundle # subdirectory we use to build the installation bundle
export PATH:=$(CURDIR)/$(KOR_BASE)/toolchain/android-toolchain/bin:$(PATH)
MACHINE?=$(shell PATH=$(PATH) $(CC) -dumpmachine 2>/dev/null)
INSTALL_DIR=koreader-$(MACHINE) INSTALL_DIR=koreader-$(MACHINE)
# files to link from main directory # files to link from main directory
@ -22,7 +25,7 @@ KOREADER_MISC_TOOL=../misc
XGETTEXT_BIN=$(KOREADER_MISC_TOOL)/gettext/lua_xgettext.py XGETTEXT_BIN=$(KOREADER_MISC_TOOL)/gettext/lua_xgettext.py
all: $(KOR_BASE)/$(OUTPUT_DIR)/luajit po all: $(if $(ANDROID),,$(KOR_BASE)/$(OUTPUT_DIR)/luajit) po
$(MAKE) -C $(KOR_BASE) $(MAKE) -C $(KOR_BASE)
echo $(VERSION) > git-rev echo $(VERSION) > git-rev
mkdir -p $(INSTALL_DIR)/koreader mkdir -p $(INSTALL_DIR)/koreader
@ -31,15 +34,15 @@ ifdef EMULATE_READER
# create symlink instead of copying files in development mode # create symlink instead of copying files in development mode
cd $(INSTALL_DIR)/koreader && \ cd $(INSTALL_DIR)/koreader && \
ln -sf ../../$(KOR_BASE)/$(OUTPUT_DIR)/* . ln -sf ../../$(KOR_BASE)/$(OUTPUT_DIR)/* .
# install front spec
cd $(INSTALL_DIR)/koreader/spec && test -e front || \
ln -sf ../../../../spec ./front
else else
cp -rfL $(KOR_BASE)/$(OUTPUT_DIR)/* $(INSTALL_DIR)/koreader/ cp -rfL $(KOR_BASE)/$(OUTPUT_DIR)/* $(INSTALL_DIR)/koreader/
endif endif
for f in $(INSTALL_FILES); do \ for f in $(INSTALL_FILES); do \
ln -sf ../../$$f $(INSTALL_DIR)/koreader/; \ ln -sf ../../$$f $(INSTALL_DIR)/koreader/; \
done done
# install front spec
cd $(INSTALL_DIR)/koreader/spec && test -e front || \
ln -sf ../../../../spec ./front
cd $(INSTALL_DIR)/koreader/spec/front/unit && test -e data || \ cd $(INSTALL_DIR)/koreader/spec/front/unit && test -e data || \
ln -sf ../../test ./data ln -sf ../../test ./data
# install plugins # install plugins
@ -118,6 +121,10 @@ koboupdate: all
KoboRoot.tgz koreader koreader.png README_kobo.txt \ KoboRoot.tgz koreader koreader.png README_kobo.txt \
-x "koreader/resources/fonts/*" "koreader/resources/icons/src/*" "koreader/spec/*" -x "koreader/resources/fonts/*" "koreader/resources/icons/src/*" "koreader/spec/*"
androidupdate:
cd $(INSTALL_DIR)/koreader && \
7z a -l -mx=5 ../koreader-g$(REVISION).7z *
pot: pot:
$(XGETTEXT_BIN) reader.lua `find frontend -iname "*.lua"` \ $(XGETTEXT_BIN) reader.lua `find frontend -iname "*.lua"` \
`find plugins -iname "*.lua"` \ `find plugins -iname "*.lua"` \

@ -1 +1 @@
Subproject commit 06ce7a616da2fc66bf476927d7ef9eb08ec4aab8 Subproject commit 648148e3065a1019438f34c7c9b1b47653c0dab7