blob: 798ca6d5c689dca535caa46cffe961725bcca259 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
include $(top_srcdir)/Makefile.inc
.SECONDARY:
SAMPLE_MAP=osm_bbox_11.3,47.9,11.7,48.2
maptool_args=--attr-debug-level=5
maptool=$(top_builddir)/navit/maptool/maptool
maps_DATA = $(SAMPLE_MAP).bin $(SAMPLE_MAP).xml
SUFFIXES=.osm.bz2 .osm.pbf .txt .shp .osm
samplemap: $(SAMPLE_MAP).bin
.osm.bin:
echo "Converting osm map"
$(maptool) $(maptool_args) $@.tmp <$<
mv $@.tmp $@
.txt.bin:
$(maptool) $(maptool_args) $@.tmp -p $(top_builddir)/navit/map/textfile/libmap_textfile.la -m "type=textfile data="$<
mv $@.tmp $@
.shp.bin:
$(maptool) $(maptool_args) $@.tmp -p $(top_builddir)/navit/map/shapefile/libmap_shapefile.la -m "type=shapefile data=$(subst .shp,,$<) $(SHAPEFILE_ATTRIBUTES)"
mv $@.tmp $@
.osm.bz2.bin:
echo "Converting osm map"
bzcat $< | $(maptool) $(maptool_args) $@.tmp
mv $@.tmp $@
.osm.pbf.bin:
echo "Converting osm map"
$(maptool) --protobuf $(maptool_args) $@.tmp <$<
mv $@.tmp $@
.bin.xml:
echo '<map type="binfile" enabled="yes" data="$$NAVIT_SHAREDIR/maps/$<"/>' >$@
$(SAMPLE_MAP).osm.bz2:
echo "Downloading osm sample map"
wget -O $(SAMPLE_MAP).osm.bz2.tmp http://www.navit-project.org/maps/$(SAMPLE_MAP).osm.bz2
mv $(SAMPLE_MAP).osm.bz2.tmp $(SAMPLE_MAP).osm.bz2
distclean-local:
rm -f $(SAMPLE_MAP).osm.bz2 $(SAMPLE_MAP).bin $(SAMPLE_MAP).xml
all:
|