]> mj.ucw.cz Git - leo.git/blob - Makefile
Do not crash on broken multipolygons
[leo.git] / Makefile
1 # Makefile for Hic Est Leo
2
3 all: runtree programs extras configs
4
5 # Include configuration
6 s=.
7 -include obj/config.mk
8 obj/config.mk:
9         @echo "You need to run configure first." && false
10
11 BUILDSYS=$(s)/build
12
13 # We will use the libucw build system
14 include $(BUILDSYS)/Maketop
15
16 PROGS+=$(o)/leo
17 CFLAGS+=$(LIBUCW_CFLAGS)
18
19 LEO_MODULES=leo xml osm svg svg-icon css-parse css-lex style css dict sym sym-point sym-line sym-text map shp fixed
20 LEO_OBJECTS=$(addprefix $(o)/, $(addsuffix .o, $(LEO_MODULES)))
21 $(o)/leo: $(LEO_OBJECTS)
22
23 $(o)/leo: LIBS+=$(LIBUCW_LIBS) $(LIBUCW_CHARSET_LIBS) $(LIBUCW_XML_LIBS) $(PANGOFT2_LIBS) $(FREETYPE_LIBS) -lproj -lm
24
25 $(o)/sym-text.o: CFLAGS+=$(FREETYPE_CFLAGS) $(PANGOFT2_CFLAGS)
26 $(o)/svg-icon.o: CFLAGS+=$(LIBUCW_XML_CFLAGS)
27 $(o)/xml.o: CFLAGS+=$(LIBUCW_XML_CFLAGS)
28
29 $(LEO_OBJECTS): $(o)/dict-keys.h $(o)/dict-props.h $(o)/dict-values.h
30
31 $(o)/css-parse.c: css-parse.y
32         bison --name-prefix=css_ --token-table --verbose --defines -o $@ $^
33
34 $(o)/dict-%.h: dict-%.t $(BUILDSYS)/gen-dict
35         build/gen-dict <$< >$@
36
37 ifndef CONFIG_LOCAL
38 install: all $(INSTALL_TARGETS)
39 else
40 install:
41         @echo "Nothing to install, this is a local build." && false
42 endif
43 .PHONY: install
44
45 output.svg: $(o)/leo dump.osm poskole.css
46         $(o)/leo
47
48 output.pdf: output.svg
49         inkscape --export-pdf=output.pdf output.svg
50
51 include $(BUILDSYS)/Makebottom