Skip to content

Instantly share code, notes, and snippets.

@liob
Created June 1, 2014 14:52
Show Gist options
  • Save liob/4054a9f2605bceadbde5 to your computer and use it in GitHub Desktop.
Save liob/4054a9f2605bceadbde5 to your computer and use it in GitHub Desktop.
Makefile for building Osmand
BRANCH = r1.7
ANDROIDSDK = /usr/lib/android-sdk
ANDROIDNDK = /usr/lib/android-ndk
OSMSRC = osmand
RESOURCESDIR = resources/rendering_styles/style-icons resources/routing resources/obf_creation resources/countries-info
REPO = https://github.com/osmandapp/Osmand.git
GIT = git
ANT = ant
NDKBUILD = $(ANDROIDNDK)/ndk-build
CD = cd
create-dir:
mkdir -p $(RESOURCESDIR)
build: create-dir
$(NDKBUILD) -C $(OSMSRC)/OsmAnd
$(ANT) -f $(OSMSRC)/OsmAnd/build.xml -Dsdk.dir=$(ANDROIDSDK) -Dmanifest=$(OSMSRC)/OsmAnd/AndroidManifest.xml -Dnativeoff=false clean debug
clone:
test -d $(OSMSRC) || $(GIT) clone $(REPO) $(OSMSRC)
echo "fixing repo"
touch $(OSMSRC)/OsmAnd/res/drawable-mdpi/mx_user_defined
touch $(OSMSRC)/OsmAnd/res/drawable-mdpi/h_arrow
checkout: clone
$(GIT) --git-dir $(OSMSRC)/.git --work-tree $(OSMSRC) checkout $(BRANCH)
clean:
$(RM) -rf $(OSMSRC)
$(RM) -rf resources
@liob
Copy link
Author

liob commented Jun 1, 2014

  1. edit BRANCH, ANDROIDSDK and ANDROIDNDK
  2. make checkout
  3. make build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment