The Birdfont Source Code


All Repositories / birdfont.git / blob – RSS feed

android_build.py in scripts

This file is a part of the Birdfont project.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git

Revisions

View the latest version of scripts/android_build.py.
Version 2.11.5
1 #!/usr/bin/python 2 """ 3 Copyright (C) 2013 Johan Mattsson 4 5 This library is free software; you can redistribute it and/or modify 6 it under the terms of the GNU Lesser General Public License as 7 published by the Free Software Foundation; either version 3 of the 8 License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, but 11 WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 """ 15 16 import build 17 from translations import compile_translations 18 import configfile 19 from run import run 20 import version 21 22 prefix = "" 23 valac = "valac" 24 valaflags = "--define ANDROID --vapidir=/opt/birdfont/include --vapidir=./ --pkg android" 25 cc = "" 26 cflags = "" 27 ldflags = "" 28 library_cflags = "" 29 library_ldflags = "" 30 library = "libbirdfont.so" 31 32 configfile.write_config (prefix) 33 compile_translations() 34 35 build.libbirdgems(prefix, cc, cflags, library_ldflags, valac, valaflags, library) 36 run ("mkdir -p build/libbirdgems/jni"); 37 run ("cp scripts/AndroidBirdGems.mk build/libbirdgems/jni/Android.mk"); 38 run ("cp build/libbirdgems/*.c build/libbirdgems/jni/"); 39 run ("cd build/libbirdgems/jni && ndk-build"); 40 run ("cp -ra build/libbirdgems/libs/armeabi/libbirdgems.so build/"); 41 42 build.libbirdxml(prefix, cc, cflags, library_ldflags, valac, valaflags, library) 43 run ("mkdir -p build/libbirdxml/jni"); 44 run ("cp scripts/AndroidBirdXml.mk build/libbirdxml/jni/Android.mk"); 45 run ("cp build/libbirdxml/*.c build/libbirdxml/jni/"); 46 run ("cd build/libbirdxml/jni && ndk-build"); 47 run ("cp -ra build/libbirdxml/libs/armeabi/libbirdxml.so build/"); 48 49 build.libbirdfont(prefix, cc, cflags, library_ldflags, valac, valaflags, library) 50 run ("mkdir -p build/libbirdfont/jni"); 51 run ("cp scripts/AndroidBirdFont.mk build/libbirdfont/jni/Android.mk"); 52 run ("cp build/libbirdfont/*.c build/libbirdfont/jni/"); 53 run ("cd build/libbirdfont/jni && ndk-build"); 54 run ("cp -ra build/libbirdfont/libs/armeabi/libbirdfont.so build/"); 55 56 print ("Done") 57