.
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 build.libbirdfont(prefix, cc, cflags, library_ldflags, valac, valaflags, library)
35 run ("mkdir -p build/jni");
36 run ("cp scripts/Android.mk build/jni/");
37 run ("cp scripts/Application.mk build/jni");
38 run ("cp build/libbirdfont/*.c build/jni/");
39 run ("cd build/jni && ndk-build");
40
41 print ("Done")
42