… | |
… | |
2 | comma=, |
2 | comma=, |
3 | SUBDIRS=fib-1.1 support |
3 | SUBDIRS=fib-1.1 support |
4 | if PLUGINS |
4 | if PLUGINS |
5 | SUBDIRS += . |
5 | SUBDIRS += . |
6 | endif |
6 | endif |
7 | DIST_SUBDIRS=autoload binding map maptool fib-1.1 font fonts gui graphics osd plugin speech support vehicle xpm maps |
7 | DIST_SUBDIRS=autoload binding map maptool fib-1.1 font fonts gui graphics osd plugin speech vehicle support xpm maps |
8 | SUBDIRS+=autoload binding map font gui graphics osd plugin speech vehicle xpm |
8 | SUBDIRS+=autoload binding map font gui graphics osd plugin speech vehicle xpm |
9 | |
9 | |
10 | MODULES = $(wildcard $(top_builddir)/navit/binding/*/*.la $(top_builddir)/navit/font/*/*.la $(top_builddir)/navit/graphics/*/*.la $(top_builddir)/navit/gui/*/*.la $(top_builddir)/navit/map/*/*.la $(top_builddir)/navit/osd/*/*.la $(top_builddir)/navit/speech/*/*.la $(top_builddir)/navit/vehicle/*/*.la) |
10 | MODULES = $(wildcard $(top_builddir)/navit/binding/*/*.la $(top_builddir)/navit/font/*/*.la $(top_builddir)/navit/graphics/*/*.la $(top_builddir)/navit/gui/*/*.la $(top_builddir)/navit/map/*/*.la $(top_builddir)/navit/osd/*/*.la $(top_builddir)/navit/speech/*/*.la $(top_builddir)/navit/vehicle/*/*.la) |
11 | |
11 | |
12 | if FONTS |
12 | if FONTS |
… | |
… | |
56 | android.h data.h data_window.h data_window_int.h debug.h destination.h draw_info.h endianess.h event.h \ |
56 | android.h data.h data_window.h data_window_int.h debug.h destination.h draw_info.h endianess.h event.h \ |
57 | file.h graphics.h gtkext.h gui.h item.h item_def.h keys.h log.h layer.h layout.h linguistics.h main.h map-share.h map.h\ |
57 | file.h graphics.h gtkext.h gui.h item.h item_def.h keys.h log.h layer.h layout.h linguistics.h main.h map-share.h map.h\ |
58 | map_data.h mapset.h maptype.h menu.h messages.h navigation.h navit.h osd.h \ |
58 | map_data.h mapset.h maptype.h menu.h messages.h navigation.h navit.h osd.h \ |
59 | param.h phrase.h plugin.h point.h plugin_def.h projection.h popup.h route.h profile.h roadprofile.h search.h speech.h start_real.h \ |
59 | param.h phrase.h plugin.h point.h plugin_def.h projection.h popup.h route.h profile.h roadprofile.h search.h speech.h start_real.h \ |
60 | transform.h track.h types.h util.h vehicle.h vehicleprofile.h window.h xmlconfig.h zipfile.h \ |
60 | transform.h track.h types.h util.h vehicle.h vehicleprofile.h window.h xmlconfig.h zipfile.h \ |
61 | navit_nls.h sunriset.c sunriset.h glib_slice.h maptool/miniz.c |
61 | navit_nls.h sunriset.c sunriset.h glib_slice.h maptool/miniz.c \ |
|
|
62 | snprintf.c snprintf.h |
|
|
63 | |
|
|
64 | |
|
|
65 | if SUPPORT_ANDROID |
|
|
66 | lib@LIBNAVIT@_la_SOURCES += vehicle/android/vehicle_android.c \ |
|
|
67 | vehicle/demo/vehicle_demo.c \ |
|
|
68 | gui/internal/gui_internal.c \ |
|
|
69 | graphics/android/graphics_android.c \ |
|
|
70 | map/binfile/binfile.c \ |
|
|
71 | map/csv/csv.c \ |
|
|
72 | map/csv/quadtree.c \ |
|
|
73 | map/textfile/textfile.c \ |
|
|
74 | osd/core/osd_core.c \ |
|
|
75 | speech/android/speech_android.c |
|
|
76 | endif |
|
|
77 | |
62 | |
78 | |
63 | XSLTS=@XSLTS@ |
79 | XSLTS=@XSLTS@ |
64 | navit.xml: navit_shipped.xml $(foreach xslt, $(subst $(comma), ,$(XSLTS)), $(addsuffix .xslt,$(addprefix xslt/,$(xslt)))) navit_android_xml |
80 | navit.xml: navit_shipped.xml $(foreach xslt, $(subst $(comma), ,$(XSLTS)), $(addsuffix .xslt,$(addprefix xslt/,$(xslt)))) navit_android_xml |
65 | cp $< navit.xml.new |
81 | cp $< navit.xml.new |
66 | if [ ! -f navit.dtd ]; then cp -f $(top_srcdir)/navit/navit.dtd .; fi |
82 | if [ ! -f navit.dtd ]; then cp -f $(top_srcdir)/navit/navit.dtd .; fi |
… | |
… | |
98 | navit_SOURCES = |
114 | navit_SOURCES = |
99 | navit_LDADD = |
115 | navit_LDADD = |
100 | |
116 | |
101 | v_int = $$(cat $(srcdir)/android/Android_Market_Version_int.txt|grep v_int|cut -d ":" -f 2) |
117 | v_int = $$(cat $(srcdir)/android/Android_Market_Version_int.txt|grep v_int|cut -d ":" -f 2) |
102 | v_name = "1.0.0-"$$(LANG=C svnversion $(top_srcdir) 2> /dev/null|tr -d ":A-Z" 2> /dev/null) |
118 | v_name = "1.0.0-"$$(LANG=C svnversion $(top_srcdir) 2> /dev/null|tr -d ":A-Z" 2> /dev/null) |
103 | b_arch = $(shell if [ "$(DO_X86_BUILD)" == "1" ]; then echo "x86";else echo "armeabi"; fi) |
119 | b_arch = $(shell if [ "$(DO_X86_BUILD)" == "1" ]; then echo "x86"; elif [ "$(DO_ARMV7_BUILD)" == "1" ]; then echo "armeabi-v7a"; else echo "armeabi"; fi) |
104 | |
120 | |
105 | |
121 | |
106 | android/AndroidManifest.xml: android/AndroidManifest.xml.in |
122 | android/AndroidManifest.xml: android/AndroidManifest.xml.in |
107 | mkdir -p $(builddir)/android |
123 | mkdir -p $(builddir)/android |
108 | mkdir -p $(builddir)/android/res2/drawable-hdpi |
124 | mkdir -p $(builddir)/android/res2/drawable-hdpi |
… | |
… | |
121 | # this is needed, otherwise somehow the files cant be deleted |
137 | # this is needed, otherwise somehow the files cant be deleted |
122 | mkdir -p $(builddir)/android/src/ |
138 | mkdir -p $(builddir)/android/src/ |
123 | if [ "$(builddir)" != "$(srcdir)" ]; then chmod -R u+w $(builddir)/android/src/; fi |
139 | if [ "$(builddir)" != "$(srcdir)" ]; then chmod -R u+w $(builddir)/android/src/; fi |
124 | if [ "$(builddir)" != "$(srcdir)" ]; then rm -Rf $(builddir)/android/src/; fi |
140 | if [ "$(builddir)" != "$(srcdir)" ]; then rm -Rf $(builddir)/android/src/; fi |
125 | if [ "$(builddir)" != "$(srcdir)" ]; then cp -rpf $(srcdir)/android/* $(builddir)/android; fi |
141 | if [ "$(builddir)" != "$(srcdir)" ]; then cp -rpf $(srcdir)/android/* $(builddir)/android; fi |
|
|
142 | |
|
|
143 | if [ "$(builddir)" != "$(srcdir)" ]; then rm -Rf $(builddir)/android/lib/; fi |
|
|
144 | mkdir -p $(builddir)/android/lib/ |
|
|
145 | if [ "$(builddir)" != "$(srcdir)" ]; then cp -pf $(srcdir)/android/tagsoup-1.2.1.jar $(builddir)/android/lib/; fi |
|
|
146 | |
126 | touch $(srcdir)/android/dummy.txt |
147 | touch $(srcdir)/android/dummy.txt |
127 | touch $(builddir)/android/dummy.txt |
148 | touch $(builddir)/android/dummy.txt |
|
|
149 | |
|
|
150 | # mkdir -p $(builddir)/actionbarsherlock/src/ |
|
|
151 | # if [ "$(builddir)" != "$(srcdir)" ]; then chmod -R u+w $(builddir)/actionbarsherlock/src/; fi |
|
|
152 | # if [ "$(builddir)" != "$(srcdir)" ]; then rm -Rf $(builddir)/actionbarsherlock/src/; fi |
|
|
153 | # if [ "$(builddir)" != "$(srcdir)" ]; then cp -rpf $(srcdir)/actionbarsherlock/* $(builddir)/actionbarsherlock; fi |
|
|
154 | # touch $(srcdir)/actionbarsherlock/dummy.txt |
|
|
155 | # touch $(builddir)/actionbarsherlock/dummy.txt |
|
|
156 | # |
128 | android update project -t @ANDROID_PROJECT@ -p android |
157 | # android update project -t @ANDROID_PROJECT@ -p android -l ../actionbarsherlock |
|
|
158 | # echo "jar.libs.dir=lib" >> $(builddir)/android/ant.properties |
|
|
159 | |
|
|
160 | mkdir -p $(builddir)/android-support-v7-appcompat/src/ |
|
|
161 | if [ "$(builddir)" != "$(srcdir)" ]; then chmod -R u+w $(builddir)/android-support-v7-appcompat/src/; fi |
|
|
162 | if [ "$(builddir)" != "$(srcdir)" ]; then rm -Rf $(builddir)/android-support-v7-appcompat/src/; fi |
|
|
163 | if [ "$(builddir)" != "$(srcdir)" ]; then cp -rpf $(srcdir)/android-support-v7-appcompat/* $(builddir)/android-support-v7-appcompat/; fi |
|
|
164 | touch $(srcdir)/android-support-v7-appcompat/dummy.txt |
|
|
165 | touch $(builddir)/android-support-v7-appcompat/dummy.txt |
|
|
166 | |
|
|
167 | if [ "$(builddir)" != "$(srcdir)" ]; then mkdir -p $(builddir)/android/src/com/zoffcc/applications/zanavi_msg/ ; fi |
|
|
168 | if [ "$(builddir)" != "$(srcdir)" ]; then cp -pf $(builddir)/android/aidl/com/zoffcc/applications/zanavi_msg/*.aidl $(builddir)/android/src/com/zoffcc/applications/zanavi_msg/ ; fi |
|
|
169 | |
|
|
170 | # android update lib-project -t @ANDROID_PROJECT@ -p $(builddir)/android-support-v7-appcompat |
|
|
171 | android update project -t @ANDROID_PROJECT@ -p android -l ../android-support-v7-appcompat |
|
|
172 | echo "jar.libs.dir=lib" >> $(builddir)/android/ant.properties |
|
|
173 | |
129 | |
174 | |
130 | apkg-all: all android/build.xml navit.xml |
175 | apkg-all: all android/build.xml navit.xml |
131 | |
|
|
132 | mkdir -p android/libs/$(b_arch) |
176 | mkdir -p android/libs/$(b_arch) |
133 | cp .libs/*.so android/libs/$(b_arch)/libnavit.so |
177 | cp .libs/*.so android/libs/$(b_arch)/libnavit.so |
134 | for i in */*/.libs/*.so ; do sed 's&lib_data_data_com\.zoffcc\.applications\.zanavi_lib_&/data/data/com.zoffcc.applications.zanavi/lib/lib&' <$$i >android/libs/$(b_arch)/$$(basename $$i); done |
178 | for i in */*/.libs/*.so ; do sed 's&lib_data_data_com\.zoffcc\.applications\.zanavi_lib_&/data/data/com.zoffcc.applications.zanavi/lib/lib&' <$$i >android/libs/$(b_arch)/$$(basename $$i); done |
135 | |
179 | |
136 | mkdir -p android/res/drawable-ldpi |
180 | mkdir -p android/res/drawable-ldpi |
… | |
… | |
184 | # |
228 | # |
185 | if [ "$(DO_RELEASE_BUILD)" == "1" ]; then if [ "$(builddir)" != "$(srcdir)" ]; then find android/res/drawable-hdpi/ -maxdepth 1 -type f -exec $(srcdir)/../pngout-static -c6 -f6 -y {} \; ; fi ; fi |
229 | if [ "$(DO_RELEASE_BUILD)" == "1" ]; then if [ "$(builddir)" != "$(srcdir)" ]; then find android/res/drawable-hdpi/ -maxdepth 1 -type f -exec $(srcdir)/../pngout-static -c6 -f6 -y {} \; ; fi ; fi |
186 | if [ "$(DO_RELEASE_BUILD)" == "1" ]; then if [ "$(builddir)" != "$(srcdir)" ]; then find android/res/drawable-mdpi/ -maxdepth 1 -type f -exec $(srcdir)/../pngout-static -c6 -f6 -y {} \; ; fi ; fi |
230 | if [ "$(DO_RELEASE_BUILD)" == "1" ]; then if [ "$(builddir)" != "$(srcdir)" ]; then find android/res/drawable-mdpi/ -maxdepth 1 -type f -exec $(srcdir)/../pngout-static -c6 -f6 -y {} \; ; fi ; fi |
187 | if [ "$(DO_RELEASE_BUILD)" == "1" ]; then if [ "$(builddir)" != "$(srcdir)" ]; then find android/res/drawable-ldpi/ -maxdepth 1 -type f -exec $(srcdir)/../pngout-static -c6 -f6 -y {} \; ; fi ; fi |
231 | if [ "$(DO_RELEASE_BUILD)" == "1" ]; then if [ "$(builddir)" != "$(srcdir)" ]; then find android/res/drawable-ldpi/ -maxdepth 1 -type f -exec $(srcdir)/../pngout-static -c6 -f6 -y {} \; ; fi ; fi |
188 | |
232 | |
|
|
233 | # remove old libs |
|
|
234 | echo "XXXXXXXXXXXXXXXXX" |
|
|
235 | echo "XXXXXXXXXXXXXXXXX" |
|
|
236 | ls -al android/libs/$(b_arch)/lib*.so |
|
|
237 | rm -f android/libs/$(b_arch)/libgraphics_android.so |
|
|
238 | rm -f android/libs/$(b_arch)/libgraphics_null.so |
|
|
239 | rm -f android/libs/$(b_arch)/libgui_internal.so |
|
|
240 | rm -f android/libs/$(b_arch)/libmap_binfile.so |
|
|
241 | rm -f android/libs/$(b_arch)/libmap_csv.so |
|
|
242 | rm -f android/libs/$(b_arch)/libmap_filter.so |
|
|
243 | rm -f android/libs/$(b_arch)/libmap_mg.so |
|
|
244 | rm -f android/libs/$(b_arch)/libmap_shapefile.so |
|
|
245 | rm -f android/libs/$(b_arch)/libmap_textfile.so |
|
|
246 | rm -f android/libs/$(b_arch)/libosd_core.so |
|
|
247 | rm -f android/libs/$(b_arch)/libspeech_android.so |
|
|
248 | rm -f android/libs/$(b_arch)/libvehicle_android.so |
|
|
249 | rm -f android/libs/$(b_arch)/libvehicle_demo.so |
|
|
250 | rm -f android/libs/$(b_arch)/libvehicle_file.so |
|
|
251 | rm -f android/libs/$(b_arch)/libvehicle_pipe.so |
|
|
252 | rm -f android/libs/$(b_arch)/libvehicle_serial.so |
|
|
253 | rm -f android/libs/$(b_arch)/libvehicle_socket.so |
|
|
254 | echo "XXXXXXXXXXXXXXXXX" |
|
|
255 | echo "XXXXXXXXXXXXXXXXX" |
|
|
256 | |
189 | # clean up |
257 | # clean up |
190 | # rm android/res2/drawable-hdpi/* |
258 | # rm android/res2/drawable-hdpi/* |
191 | # rm android/res2/drawable-mdpi/* |
259 | # rm android/res2/drawable-mdpi/* |
192 | # rm android/res2/drawable-ldpi/* |
260 | # rm android/res2/drawable-ldpi/* |
193 | |
261 | |
… | |
… | |
209 | if [ "$(DO_RELEASE_BUILD)" != "1" ]; then echo "set solib-search-path $(builddir)/obj/local/$(b_arch)" > android/libs/$(b_arch)/gdb.setup ; fi |
277 | if [ "$(DO_RELEASE_BUILD)" != "1" ]; then echo "set solib-search-path $(builddir)/obj/local/$(b_arch)" > android/libs/$(b_arch)/gdb.setup ; fi |
210 | if [ "$(DO_RELEASE_BUILD)" != "1" ]; then echo "directory $(NDK)/platforms/android-""$(AND_API_LEVEL_C)""/arch-arm/usr/include $(NDK)/sources/cxx-stl/system" >> android/libs/$(b_arch)/gdb.setup ; fi |
278 | if [ "$(DO_RELEASE_BUILD)" != "1" ]; then echo "directory $(NDK)/platforms/android-""$(AND_API_LEVEL_C)""/arch-arm/usr/include $(NDK)/sources/cxx-stl/system" >> android/libs/$(b_arch)/gdb.setup ; fi |
211 | |
279 | |
212 | # strip libs if release build is selected |
280 | # strip libs if release build is selected |
213 | if [ "$(DO_RELEASE_BUILD)" == "1" ]; then echo "stripping libs ..."; arm-linux-androideabi-strip --strip-unneeded $(builddir)/android/libs/armeabi/* ; echo "done" ; fi |
281 | if [ "$(DO_RELEASE_BUILD)" == "1" ]; then echo "stripping libs ..."; arm-linux-androideabi-strip --strip-unneeded $(builddir)/android/libs/armeabi/* ; echo "done" ; fi |
214 | if [ "$(DO_RELEASE_BUILD)" == "1" ]; then echo "stripping libs ..."; i686-android-linux-strip --strip-unneeded $(builddir)/android/libs/x86/* ; echo "done" ; fi |
282 | if [ "$(DO_RELEASE_BUILD)" == "1" ]; then echo "stripping libs ..."; arm-linux-androideabi-strip --strip-unneeded $(builddir)/android/libs/armeabi-v7a/* ; echo "done" ; fi |
|
|
283 | if [ "$(DO_RELEASE_BUILD)" == "1" ]; then echo "stripping libs ..."; /home/navit/_navit_develop/_need/NDK/_unpack/android-ndk-r5c/toolchains/x86-4.8/prebuilt/linux-x86/bin/i686-linux-android-strip --strip-unneeded $(builddir)/android/libs/x86/* ; echo "done" ; fi |
215 | |
284 | |
216 | |
285 | |
217 | apkg: apkg-all |
286 | apkg: apkg-all |
218 | touch $(srcdir)/android/dummy.txt |
287 | touch $(srcdir)/android/dummy.txt |
219 | touch $(builddir)/android/dummy.txt |
288 | touch $(builddir)/android/dummy.txt |
… | |
… | |
224 | touch $(srcdir)/android/dummy.txt |
293 | touch $(srcdir)/android/dummy.txt |
225 | touch $(builddir)/android/dummy.txt |
294 | touch $(builddir)/android/dummy.txt |
226 | cd android && ant release |
295 | cd android && ant release |
227 | # jarsigner $$(cat ~/.keys_args) android/bin/Navit-unsigned.apk mykey |
296 | # jarsigner $$(cat ~/.keys_args) android/bin/Navit-unsigned.apk mykey |
228 | # zipalign -f 4 android/bin/Navit-unsigned.apk android/bin/Navit-aligned.apk |
297 | # zipalign -f 4 android/bin/Navit-unsigned.apk android/bin/Navit-aligned.apk |
229 | zipalign -f 4 android/bin/Navit-release-unsigned.apk android/bin/Navit-aligned.apk |
298 | /home/navit/_navit_develop/_need/SDK/_unpack/android-sdk-linux_SDK_r22.0.1/build-tools/21.1.1/zipalign -f 4 android/bin/Navit-release-unsigned.apk android/bin/Navit-aligned.apk |
230 | cp android/bin/Navit-aligned.apk android/bin/Navit-debug.apk |
299 | cp android/bin/Navit-aligned.apk android/bin/Navit-debug.apk |
231 | else |
300 | else |
232 | navit_SOURCES = start.c |
301 | navit_SOURCES = start.c |
233 | navit_LDADD = lib@LIBNAVIT@.la |
302 | navit_LDADD = lib@LIBNAVIT@.la |
234 | |
303 | |