/[zanavi_public1]/navit/navit/Makefile.am
ZANavi

Contents of /navit/navit/Makefile.am

Parent Directory Parent Directory | Revision Log Revision Log


Revision 46 - (hide annotations) (download)
Mon Aug 24 18:55:43 2015 UTC (8 years, 7 months ago) by zoff99
File size: 24182 byte(s)
v2.0.47
1 zoff99 2 include $(top_srcdir)/Makefile.inc
2     comma=,
3     SUBDIRS=fib-1.1 support
4     if PLUGINS
5     SUBDIRS += .
6     endif
7 zoff99 40 DIST_SUBDIRS=autoload binding map maptool fib-1.1 font fonts gui graphics osd plugin speech vehicle support xpm maps
8 zoff99 2 SUBDIRS+=autoload binding map font gui graphics osd plugin speech vehicle xpm
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)
11    
12     if FONTS
13     SUBDIRS += fonts
14     endif
15     if !PLUGINS
16     SUBDIRS += .
17     endif
18    
19     if MAPTOOL
20     SUBDIRS += maptool
21     endif
22    
23     if BUILD_SAMPLEMAP
24     SUBDIRS += maps
25     endif
26    
27    
28     AM_CPPFLAGS = -I$(top_srcdir)/navit/fib-1.1 @NAVIT_CFLAGS@ @ZLIB_CFLAGS@ -DPREFIX=\"@prefix@\" -DLIBDIR=\"@libdir@\" -DMODULE=navit
29     BUILT_SOURCES = version.h navit_config.h
30    
31     if BIN_NAVIT
32     bin_PROGRAMS = navit
33     endif
34    
35     if SHARED_LIBNAVIT
36     lib_LTLIBRARIES = lib@LIBNAVIT@.la
37     lib@LIBNAVIT@_la_LDFLAGS = -avoid-version @MODULE_LDFLAGS@ @NAVIT_SOCKET_LDFLAGS@ -no-undefined -Wl,--no-undefined
38     else
39     noinst_LTLIBRARIES = lib@LIBNAVIT@.la
40     endif
41     lib@LIBNAVIT@_la_LIBADD = @NAVIT_LIBS@ @WORDEXP_LIBS@ @ZLIB_LIBS@ @INTLLIBS@ -Lfib-1.1 -lfib @MODULE_LIBADD@ @CRYPTO_LIBS@
42    
43     if SUPPORT_WIN32CE
44     lib@LIBNAVIT@_la_LIBADD += -Lsupport/libc -lsupport_libc
45     endif
46    
47     pkgdata_DATA = navit.xml
48    
49     EXTRA_DIST = navit_shipped.xml navit.dtd
50    
51     lib@LIBNAVIT@_la_SOURCES = announcement.c atom.c attr.c cache.c callback.c command.c compass.c config_.c coord.c country.c data_window.c debug.c \
52     event.c event_glib.h file.c graphics.c gui.c item.c layout.c log.c main.c map.c \
53     linguistics.c mapset.c maptype.c menu.c messages.c bookmarks.c bookmarks.h navit.c navigation.c osd.c param.c phrase.c plugin.c popup.c \
54     profile.c projection.c roadprofile.c route.c routech.c search.c speech.c start_real.c transform.c track.c \
55     util.c vehicle.c vehicleprofile.c xmlconfig.c announcement.h atom.h attr.h attr_def.h cache.h callback.h color.h command.h compass.h config_.h coord.h country.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\
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 \
60     transform.h track.h types.h util.h vehicle.h vehicleprofile.h window.h xmlconfig.h zipfile.h \
61 zoff99 40 navit_nls.h sunriset.c sunriset.h glib_slice.h maptool/miniz.c \
62     snprintf.c snprintf.h
63 zoff99 2
64 zoff99 40
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    
78    
79 zoff99 2 XSLTS=@XSLTS@
80     navit.xml: navit_shipped.xml $(foreach xslt, $(subst $(comma), ,$(XSLTS)), $(addsuffix .xslt,$(addprefix xslt/,$(xslt)))) navit_android_xml
81     cp $< navit.xml.new
82     if [ ! -f navit.dtd ]; then cp -f $(top_srcdir)/navit/navit.dtd .; fi
83     for i in $^; do if [ "$${i%.xslt}" != "$$i" ]; then echo "Applying $$i" ; @SAXON@ -snone navit.xml.new $$i >navit.xml.tmp || exit ; mv navit.xml.tmp navit.xml.new || exit ; fi ; done
84     mv navit.xml.new navit.xml
85     rm -f navit.xml.tmp
86    
87     navit_android_xml: navit_shipped.xml
88     if SUPPORT_ANDROID
89     # new android xml files for (mdpi,ldpi,hdpi)
90     cp $(srcdir)/navit_shipped.xml navit_android.xml.new
91     if [ ! -f navit.dtd ]; then cp -f $(top_srcdir)/navit/navit.dtd .; fi
92    
93     # # now apply any other xslt files (this would allow for pedestrian plugin)
94     # for i in $(foreach xslt, $(subst $(comma), ,$(XSLTS)), $(addsuffix .xslt,$(addprefix xslt/,$(xslt)))); do if [ "$${i%.xslt}" != "$$i" ]; then j=`basename $$i` ; if [ "$$j" != "android.xslt" ] ; then echo "Android: Applying $$i" ; @SAXON@ -snone navit_android.xml.new $(srcdir)/"$$i" >navit_android.xml.new.tmp || exit ; mv navit_android.xml.new.tmp navit_android.xml.new || exit ; fi ; fi ; done
95     # # for now disable pedestrian plugin (zoff99)
96    
97     @SAXON@ -snone navit_android.xml.new $(srcdir)/xslt/android_mdpi.xslt >navit_android_mdpi.xml.tmp
98     @SAXON@ -snone navit_android.xml.new $(srcdir)/xslt/android_ldpi.xslt >navit_android_ldpi.xml.tmp
99     @SAXON@ -snone navit_android.xml.new $(srcdir)/xslt/android_hdpi.xslt >navit_android_hdpi.xml.tmp
100     rm -f navit_android.xml.new
101     rm -f navit_android.xml.new.tmp
102     mv navit_android_mdpi.xml.tmp navit_android_mdpi.xml
103     mv navit_android_ldpi.xml.tmp navit_android_ldpi.xml
104     mv navit_android_hdpi.xml.tmp navit_android_hdpi.xml
105     rm -f navit_android_mdpi.xml.tmp
106     rm -f navit_android_ldpi.xml.tmp
107     rm -f navit_android_hdpi.xml.tmp
108     else
109     echo "no Android support"
110     endif
111    
112     if SUPPORT_ANDROID
113     lib@LIBNAVIT@_la_SOURCES += android.c
114     navit_SOURCES =
115     navit_LDADD =
116    
117     v_int = $$(cat $(srcdir)/android/Android_Market_Version_int.txt|grep v_int|cut -d ":" -f 2)
118 zoff99 46 # v_name = "1.0.0-"$$(LANG=C svnversion $(top_srcdir) 2> /dev/null|tr -d ":A-Z" 2> /dev/null)
119     v_name = $$(cat $(srcdir)/android/Android_Market_Version_int.txt|grep v_name|cut -d ":" -f 2)
120 zoff99 40 b_arch = $(shell if [ "$(DO_X86_BUILD)" == "1" ]; then echo "x86"; elif [ "$(DO_ARMV7_BUILD)" == "1" ]; then echo "armeabi-v7a"; else echo "armeabi"; fi)
121 zoff99 2
122 zoff99 31
123 zoff99 2 android/AndroidManifest.xml: android/AndroidManifest.xml.in
124     mkdir -p $(builddir)/android
125     mkdir -p $(builddir)/android/res2/drawable-hdpi
126     mkdir -p $(builddir)/android/res2/drawable-mdpi
127     mkdir -p $(builddir)/android/res2/drawable-ldpi
128    
129     sed '0,/<uses-sdk/!d' <$< >$@
130     for i in $(subst $(comma), ,@ANDROID_PERMISSIONS@); do echo " <uses-permission android:name=\"android.permission.$$i\" />" >>$@; done
131     sed '0,/<uses-sdk/d' <$< >>$@
132     sed -e "s/@ANDROID_VERSION_INT@/$(v_int)/" <$@ >android/AndroidManifest.xml.tmp
133     mv android/AndroidManifest.xml.tmp $@
134     sed -e "s/@ANDROID_VERSION_NAME@/$(v_name)/" <$@ >android/AndroidManifest.xml.tmp
135     mv android/AndroidManifest.xml.tmp $@
136    
137     android/build.xml: android/AndroidManifest.xml android/dummy.txt
138     # this is needed, otherwise somehow the files cant be deleted
139     mkdir -p $(builddir)/android/src/
140     if [ "$(builddir)" != "$(srcdir)" ]; then chmod -R u+w $(builddir)/android/src/; fi
141     if [ "$(builddir)" != "$(srcdir)" ]; then rm -Rf $(builddir)/android/src/; fi
142     if [ "$(builddir)" != "$(srcdir)" ]; then cp -rpf $(srcdir)/android/* $(builddir)/android; fi
143 zoff99 40
144     if [ "$(builddir)" != "$(srcdir)" ]; then rm -Rf $(builddir)/android/lib/; fi
145     mkdir -p $(builddir)/android/lib/
146     if [ "$(builddir)" != "$(srcdir)" ]; then cp -pf $(srcdir)/android/tagsoup-1.2.1.jar $(builddir)/android/lib/; fi
147    
148 zoff99 2 touch $(srcdir)/android/dummy.txt
149     touch $(builddir)/android/dummy.txt
150    
151 zoff99 40 # mkdir -p $(builddir)/actionbarsherlock/src/
152     # if [ "$(builddir)" != "$(srcdir)" ]; then chmod -R u+w $(builddir)/actionbarsherlock/src/; fi
153     # if [ "$(builddir)" != "$(srcdir)" ]; then rm -Rf $(builddir)/actionbarsherlock/src/; fi
154     # if [ "$(builddir)" != "$(srcdir)" ]; then cp -rpf $(srcdir)/actionbarsherlock/* $(builddir)/actionbarsherlock; fi
155     # touch $(srcdir)/actionbarsherlock/dummy.txt
156     # touch $(builddir)/actionbarsherlock/dummy.txt
157     #
158     # android update project -t @ANDROID_PROJECT@ -p android -l ../actionbarsherlock
159     # echo "jar.libs.dir=lib" >> $(builddir)/android/ant.properties
160    
161     mkdir -p $(builddir)/android-support-v7-appcompat/src/
162     if [ "$(builddir)" != "$(srcdir)" ]; then chmod -R u+w $(builddir)/android-support-v7-appcompat/src/; fi
163     if [ "$(builddir)" != "$(srcdir)" ]; then rm -Rf $(builddir)/android-support-v7-appcompat/src/; fi
164     if [ "$(builddir)" != "$(srcdir)" ]; then cp -rpf $(srcdir)/android-support-v7-appcompat/* $(builddir)/android-support-v7-appcompat/; fi
165     touch $(srcdir)/android-support-v7-appcompat/dummy.txt
166     touch $(builddir)/android-support-v7-appcompat/dummy.txt
167    
168     if [ "$(builddir)" != "$(srcdir)" ]; then mkdir -p $(builddir)/android/src/com/zoffcc/applications/zanavi_msg/ ; fi
169     if [ "$(builddir)" != "$(srcdir)" ]; then cp -pf $(builddir)/android/aidl/com/zoffcc/applications/zanavi_msg/*.aidl $(builddir)/android/src/com/zoffcc/applications/zanavi_msg/ ; fi
170    
171     # android update lib-project -t @ANDROID_PROJECT@ -p $(builddir)/android-support-v7-appcompat
172     android update project -t @ANDROID_PROJECT@ -p android -l ../android-support-v7-appcompat
173     echo "jar.libs.dir=lib" >> $(builddir)/android/ant.properties
174    
175    
176 zoff99 2 apkg-all: all android/build.xml navit.xml
177 zoff99 31 mkdir -p android/libs/$(b_arch)
178     cp .libs/*.so android/libs/$(b_arch)/libnavit.so
179     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
180    
181 zoff99 2 mkdir -p android/res/drawable-ldpi
182     mkdir -p android/res/drawable-mdpi
183     mkdir -p android/res/drawable-hdpi
184 zoff99 41 mkdir -p android/res/drawable-xhdpi
185     mkdir -p android/res/drawable-xxhdpi
186 zoff99 2
187     mkdir -p android/res2/drawable-hdpi
188     mkdir -p android/res2/drawable-mdpi
189     mkdir -p android/res2/drawable-ldpi
190    
191 zoff99 41 # all icons and imgs
192     if [ "$(DO_PNG_BUILD)" == "1" ]; then for i in $(shell cd $(builddir)/xpm && echo *_16_16.png); do cp -v $(builddir)/xpm/$$i android/res/drawable-ldpi/$$( echo $$i | tr "[A-Z]" "[a-z]" | sed -e 'sx_16_16xx') ; done ; fi
193     if [ "$(DO_PNG_BUILD)" == "1" ]; then for i in $(shell cd $(builddir)/xpm && echo *_32_32.png); do cp -v $(builddir)/xpm/$$i android/res/drawable-mdpi/$$( echo $$i | tr "[A-Z]" "[a-z]" | sed -e 'sx_32_32xx') ; done ; fi
194     if [ "$(DO_PNG_BUILD)" == "1" ]; then for i in $(shell cd $(builddir)/xpm && echo *_48_48.png); do cp -v $(builddir)/xpm/$$i android/res/drawable-hdpi/$$( echo $$i | tr "[A-Z]" "[a-z]" | sed -e 'sx_48_48xx') ; done ; fi
195     if [ "$(DO_PNG_BUILD)" == "1" ]; then for i in $(shell cd $(builddir)/xpm && echo *_48_48.png); do cp -v $(builddir)/xpm/$$i android/res/drawable-xhdpi/$$( echo $$i | tr "[A-Z]" "[a-z]" | sed -e 'sx_48_48xx') ; done ; fi
196    
197     # nav icons (overwrite with larger versions)
198     if [ "$(DO_PNG_BUILD)" == "1" ]; then for i in $(shell cd $(builddir)/xpm && echo nav_*_48_48.png); do cp -v $(builddir)/xpm/$$i android/res/drawable-ldpi/$$( echo $$i | tr "[A-Z]" "[a-z]" | sed -e 'sx_48_48xx') ; done ; fi
199     if [ "$(DO_PNG_BUILD)" == "1" ]; then for i in $(shell cd $(builddir)/xpm && echo nav_*_48_48.png); do cp -v $(builddir)/xpm/$$i android/res/drawable-mdpi/$$( echo $$i | tr "[A-Z]" "[a-z]" | sed -e 'sx_48_48xx') ; done ; fi
200     if [ "$(DO_PNG_BUILD)" == "1" ]; then for i in $(shell cd $(builddir)/xpm && echo nav_*_96_96.png); do cp -v $(builddir)/xpm/$$i android/res/drawable-hdpi/$$( echo $$i | tr "[A-Z]" "[a-z]" | sed -e 'sx_96_96xx') ; done ; fi
201     if [ "$(DO_PNG_BUILD)" == "1" ]; then for i in $(shell cd $(builddir)/xpm && echo nav_*_192_192.png); do cp -v $(builddir)/xpm/$$i android/res/drawable-xhdpi/$$( echo $$i | tr "[A-Z]" "[a-z]" | sed -e 'sx_192_192xx') ; done ; fi
202    
203    
204 zoff99 2 # only use needed pngs to make size of apk smaller
205 zoff99 41 # if [ "$(builddir)" != "$(srcdir)" ]; then for i in flag_bk_tr.png flag_bk_wh.png mini_roundabout.png gui_active_32_32.png gui_arrow_right_32_32.png gui_arrow_left_32_32.png icon_32_32.png unknown_32_32.png gui_zoom_out_64_64.png gui_zoom_in_64_64.png gui_map_32_32.png gui_home_32_32.png gui_actions_64_64.png gui_settings_64_64.png gui_tools_64_64.png gui_about_64_64.png gui_inactive_32_32.png ; do cp -v $(builddir)/android/res2/drawable-hdpi/$$i android/res/drawable-hdpi/ ; done ; fi
206     # if [ "$(builddir)" != "$(srcdir)" ]; then for i in flag_bk_tr.png flag_bk_wh.png mini_roundabout.png gui_active_32_32.png gui_arrow_right_32_32.png gui_arrow_left_32_32.png icon_32_32.png unknown_32_32.png gui_zoom_out_64_64.png gui_zoom_in_64_64.png gui_map_32_32.png gui_home_32_32.png gui_actions_64_64.png gui_settings_64_64.png gui_tools_64_64.png gui_about_64_64.png gui_inactive_32_32.png ; do cp -v $(builddir)/android/res2/drawable-mdpi/$$i android/res/drawable-mdpi/ ; done ; fi
207     # if [ "$(builddir)" != "$(srcdir)" ]; then for i in flag_bk_tr.png flag_bk_wh.png mini_roundabout.png gui_active_32_32.png gui_arrow_right_32_32.png gui_arrow_left_32_32.png icon_32_32.png unknown_32_32.png gui_zoom_out_64_64.png gui_zoom_in_64_64.png gui_map_32_32.png gui_home_32_32.png gui_actions_64_64.png gui_settings_64_64.png gui_tools_64_64.png gui_about_64_64.png gui_inactive_32_32.png ; do cp -v $(builddir)/android/res2/drawable-ldpi/$$i android/res/drawable-ldpi/ ; done ; fi
208 zoff99 2 # gui icons
209 zoff99 41 # if [ "$(builddir)" != "$(srcdir)" ]; then for i in $(shell cd android/res2/drawable-hdpi && echo gui*64_64*png); do cp -v $(builddir)/android/res2/drawable-hdpi/$$i android/res/drawable-hdpi/ ; done ; fi
210     # if [ "$(builddir)" != "$(srcdir)" ]; then for i in $(shell cd android/res2/drawable-mdpi && echo gui*64_64*png); do cp -v $(builddir)/android/res2/drawable-mdpi/$$i android/res/drawable-mdpi/ ; done ; fi
211     # if [ "$(builddir)" != "$(srcdir)" ]; then for i in $(shell cd android/res2/drawable-ldpi && echo gui*64_64*png); do cp -v $(builddir)/android/res2/drawable-ldpi/$$i android/res/drawable-ldpi/ ; done ; fi
212 zoff99 2 # nav icons
213 zoff99 41 # if [ "$(builddir)" != "$(srcdir)" ]; then for i in $(shell cd android/res2/drawable-hdpi && echo nav_*png); do cp -v $(builddir)/android/res2/drawable-hdpi/$$i android/res/drawable-hdpi/ ; done ; fi
214     # if [ "$(builddir)" != "$(srcdir)" ]; then for i in $(shell cd android/res2/drawable-mdpi && echo nav_*png); do cp -v $(builddir)/android/res2/drawable-mdpi/$$i android/res/drawable-mdpi/ ; done ; fi
215     # if [ "$(builddir)" != "$(srcdir)" ]; then for i in $(shell cd android/res2/drawable-ldpi && echo nav_*png); do cp -v $(builddir)/android/res2/drawable-ldpi/$$i android/res/drawable-ldpi/ ; done ; fi
216 zoff99 2 # POIs
217 zoff99 41 # if [ "$(builddir)" != "$(srcdir)" ]; then for i in traffic_signals.png atm.png bank.png fuel.png gui_select_street_32_32.png gui_select_town_32_32.png gui_select_country_32_32.png ; do cp -v $(builddir)/android/res2/drawable-hdpi/$$i android/res/drawable-hdpi/ ; done ; fi
218     # if [ "$(builddir)" != "$(srcdir)" ]; then for i in traffic_signals.png atm.png bank.png fuel.png gui_select_street_32_32.png gui_select_town_32_32.png gui_select_country_32_32.png ; do cp -v $(builddir)/android/res2/drawable-mdpi/$$i android/res/drawable-mdpi/ ; done ; fi
219     # if [ "$(builddir)" != "$(srcdir)" ]; then for i in traffic_signals.png atm.png bank.png fuel.png gui_select_street_32_32.png gui_select_town_32_32.png gui_select_country_32_32.png ; do cp -v $(builddir)/android/res2/drawable-ldpi/$$i android/res/drawable-ldpi/ ; done ; fi
220 zoff99 34 # more POIs
221 zoff99 41 # if [ "$(builddir)" != "$(srcdir)" ]; then for i in airport.png attraction.png bar.png beer.png bench.png boat_ramp.png boundary_stone.png bus.png cafe.png camping.png church.png cinema.png danger.png exit.png fastfood.png firebrigade.png fountain.png golf.png heliport.png hospital.png hotel.png information.png justice.png mark.png military.png mini_roundabout.png museum.png parking.png peak.png pharmacy.png police.png post.png repair_service.png resort.png restaurant.png ruins.png school.png shop_grocery.png shopping.png skiing.png stadium.png swimming.png tec_common.png telephone.png toilets.png viewpoint.png wifi.png zoom_in.png zoom_out.png zoo.png ; do cp -v $(builddir)/android/res2/drawable-hdpi/$$i android/res/drawable-hdpi/ ; done ; fi
222     # if [ "$(builddir)" != "$(srcdir)" ]; then for i in airport.png attraction.png bar.png beer.png bench.png boat_ramp.png boundary_stone.png bus.png cafe.png camping.png church.png cinema.png danger.png exit.png fastfood.png firebrigade.png fountain.png golf.png heliport.png hospital.png hotel.png information.png justice.png mark.png military.png mini_roundabout.png museum.png parking.png peak.png pharmacy.png police.png post.png repair_service.png resort.png restaurant.png ruins.png school.png shop_grocery.png shopping.png skiing.png stadium.png swimming.png tec_common.png telephone.png toilets.png viewpoint.png wifi.png zoom_in.png zoom_out.png zoo.png ; do cp -v $(builddir)/android/res2/drawable-mdpi/$$i android/res/drawable-mdpi/ ; done ; fi
223     # if [ "$(builddir)" != "$(srcdir)" ]; then for i in airport.png attraction.png bar.png beer.png bench.png boat_ramp.png boundary_stone.png bus.png cafe.png camping.png church.png cinema.png danger.png exit.png fastfood.png firebrigade.png fountain.png golf.png heliport.png hospital.png hotel.png information.png justice.png mark.png military.png mini_roundabout.png museum.png parking.png peak.png pharmacy.png police.png post.png repair_service.png resort.png restaurant.png ruins.png school.png shop_grocery.png shopping.png skiing.png stadium.png swimming.png tec_common.png telephone.png toilets.png viewpoint.png wifi.png zoom_in.png zoom_out.png zoo.png ; do cp -v $(builddir)/android/res2/drawable-ldpi/$$i android/res/drawable-ldpi/ ; done ; fi
224 zoff99 2 # rest of nav_ icons
225 zoff99 41 # if [ "$(builddir)" != "$(srcdir)" ]; then cp -v $(builddir)/android/res2/drawable-hdpi/nav_destination_bk_59_59.png android/res/drawable-hdpi/nav_destination_bk.png ; fi
226     # if [ "$(builddir)" != "$(srcdir)" ]; then cp -v $(builddir)/android/res2/drawable-mdpi/nav_destination_bk_59_59.png android/res/drawable-mdpi/nav_destination_bk.png ; fi
227     # if [ "$(builddir)" != "$(srcdir)" ]; then cp -v $(builddir)/android/res2/drawable-ldpi/nav_destination_bk_59_59.png android/res/drawable-ldpi/nav_destination_bk.png ; fi
228 zoff99 2
229 zoff99 34 # if release build -> then compress png images (this takes a long time!!!)
230     #
231     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
232     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
233     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
234    
235 zoff99 40 # remove old libs
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    
255 zoff99 2 # clean up
256     # rm android/res2/drawable-hdpi/*
257     # rm android/res2/drawable-mdpi/*
258     # rm android/res2/drawable-ldpi/*
259    
260     mkdir -p android/res/raw
261     for i in $(shell cd ../po && echo *.mo); do cp ../po/$$i android/res/raw/$$( echo $$i | tr "[A-Z]" "[a-z]") ; done
262     # cp navit.xml android/res/raw
263     cp navit_android_mdpi.xml android/res/raw/navitmdpi.xml
264     cp navit_android_ldpi.xml android/res/raw/navitldpi.xml
265     cp navit_android_hdpi.xml android/res/raw/navithdpi.xml
266    
267     # cleanup svn dirs, they should never be in build dir
268     if [ "$(builddir)" != "$(srcdir)" ]; then find $(builddir) -type d -name '\.svn' -exec rm -Rf {} \; ; fi; echo "ignore the find errors!!"
269    
270 zoff99 31 if [ "$(DO_RELEASE_BUILD)" != "1" ]; then mkdir -p android/libs/$(b_arch) ; fi
271 zoff99 34 if [ "$(DO_RELEASE_BUILD)" != "1" ]; then install -p $(NDK)/prebuilt/android-arm/gdbserver/gdbserver android/libs/$(b_arch)/gdbserver ; fi
272 zoff99 31 if [ "$(DO_RELEASE_BUILD)" != "1" ]; then mkdir -p android/libs/$(b_arch) ; fi
273     if [ "$(DO_RELEASE_BUILD)" != "1" ]; then mkdir -p android/obj/local/$(b_arch) ; fi
274     if [ "$(DO_RELEASE_BUILD)" != "1" ]; then cp android/libs/$(b_arch)/*.so android/obj/local/$(b_arch)/ ; fi
275     if [ "$(DO_RELEASE_BUILD)" != "1" ]; then echo "set solib-search-path $(builddir)/obj/local/$(b_arch)" > android/libs/$(b_arch)/gdb.setup ; fi
276     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
277 zoff99 2
278     # strip libs if release build is selected
279     if [ "$(DO_RELEASE_BUILD)" == "1" ]; then echo "stripping libs ..."; arm-linux-androideabi-strip --strip-unneeded $(builddir)/android/libs/armeabi/* ; echo "done" ; fi
280 zoff99 40 if [ "$(DO_RELEASE_BUILD)" == "1" ]; then echo "stripping libs ..."; arm-linux-androideabi-strip --strip-unneeded $(builddir)/android/libs/armeabi-v7a/* ; echo "done" ; fi
281     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
282 zoff99 2
283    
284     apkg: apkg-all
285     touch $(srcdir)/android/dummy.txt
286     touch $(builddir)/android/dummy.txt
287     cd android && ant debug
288     # zipalign is already run automatically
289    
290     apkg-release: apkg-all
291     touch $(srcdir)/android/dummy.txt
292     touch $(builddir)/android/dummy.txt
293     cd android && ant release
294     # jarsigner $$(cat ~/.keys_args) android/bin/Navit-unsigned.apk mykey
295 zoff99 20 # zipalign -f 4 android/bin/Navit-unsigned.apk android/bin/Navit-aligned.apk
296 zoff99 40 /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
297 zoff99 2 cp android/bin/Navit-aligned.apk android/bin/Navit-debug.apk
298     else
299     navit_SOURCES = start.c
300     navit_LDADD = lib@LIBNAVIT@.la
301    
302     endif
303    
304     if EVENT_GLIB
305     lib@LIBNAVIT@_la_SOURCES += event_glib.c
306     endif
307    
308     if !PLUGINS
309     lib@LIBNAVIT@_la_SOURCES += builtin.c
310     lib@LIBNAVIT@_la_LIBADD += $(MODULES)
311     endif
312    
313     navit_LDFLAGS = -export-dynamic
314    
315     navit_LDADD += @NAVIT_LIBS@ @WORDEXP_LIBS@ @ZLIB_LIBS@ @CRYPTO_LIBS@ @INTLLIBS@
316    
317     if SUPPORT_WIN32
318     navit_LDADD += resource.rsc
319     if SUPPORT_WIN32CE
320     navit_LDADD += -lcommctrl -Lsupport/libc
321     else
322     navit_LDADD += -lgdi32 -lcomctl32 -lwinmm
323     endif
324    
325    
326     resource.rsc: $(top_srcdir)/navit/gui/win32/resources/resource.rc
327     $(WINDRES) -I $(top_srcdir)/navit/gui/win32/resources $(top_srcdir)/navit/gui/win32/resources/resource.rc resource.rsc
328     endif
329    
330     .PHONY: version.h.tmp
331    
332     version.h.tmp:
333     echo "#include \"config.h\"" >version.h.tmp
334     if SOURCE_MODE_SVN
335     echo "#define SVN_VERSION \"$$(LANG=C svnversion $(top_srcdir) 2>/dev/null)\"" >>version.h.tmp
336     else
337     echo "#define SVN_VERSION \"@SOURCE_MODE@\"" >>version.h.tmp
338     endif
339     echo "#define NAVIT_VARIANT \"@NAVIT_VARIANT@\"" >>version.h.tmp
340     if ! diff version.h.tmp version.h >/dev/null 2>/dev/null; \
341     then \
342     mv version.h.tmp version.h; \
343     fi
344    
345     version.h: version.h.tmp
346    
347     navit_config.h: ../config.h
348     cp ../config.h navit_config.h.tmp
349     if ! diff navit_config.h.tmp navit_config.h >/dev/null 2>/dev/null; \
350     then \
351     mv navit_config.h.tmp navit_config.h; \
352     fi
353    
354    
355     distclean-local:
356     rm -f version.h version.h.tmp navit_config.h navit_config.h.tmp builtin.c support-builtin.c navit.xml
357     if [ "$(top_builddir)" != "$(top_srcdir)" ]; then rm -f navit.dtd; fi
358    
359     builtin.c: $(top_builddir)/config.h
360     ls $(top_builddir)/navit/*/*/*.la | sed -e "s/\.la/_init(void);/" -e "s/.*lib/extern void module_/" >builtin.c
361     echo "extern void builtin_init(void);" >>builtin.c
362     echo "void builtin_init(void) {" >>builtin.c
363     ls $(top_builddir)/navit/*/*/*.la | sed -e "s/\.la/_init();/" -e "s/.*\\/lib/ module_/" >>builtin.c
364     echo "}" >>builtin.c
365     support-builtin.c: $(top_builddir)/config.h
366     ls $(top_builddir)/navit/support/*/*.la | sed -e "s/\.la/_init(void);/" -e "s/.*lib/extern void module_/" >support-builtin.c
367     echo "extern void builtin_init(void);" >>support-builtin.c
368     echo "void builtin_init(void) {" >>support-builtin.c
369     ls $(top_builddir)/navit/support/*/*.la | sed -e "s/\.la/_init();/" -e "s/.*\\/lib/ module_/" >>support-builtin.c
370     echo "}" >>support-builtin.c

   
Visit the ZANavi Wiki