-LIBUCW:=$(shell cd /home/mj/src/libucw/run && pwd)
-UCWCF:=$(shell PKG_CONFIG_PATH=$(LIBUCW)/lib/pkgconfig pkg-config --cflags libucw libucw-charset libucw-xml)
-UCWLF:=$(shell PKG_CONFIG_PATH=$(LIBUCW)/lib/pkgconfig pkg-config --libs libucw libucw-charset libucw-xml)
-FTCF:=$(shell freetype-config --cflags)
-FTLF:=$(shell freetype-config --libs)
-PANGOCF:=$(shell pkg-config pangoft2 --cflags)
-PANGOLF:=$(shell pkg-config pangoft2 --libs)
-
-CC=gcc
-LD=gcc
-COPT=-O2
-CFLAGS=$(COPT) -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wredundant-decls -Wno-missing-field-initializers -std=gnu99 $(UCWCF) -ggdb -DDEBUG_ASSERTS
-LDLIBS+=$(FTLF) $(PANGOLF) $(UCWLF) -lproj
-
-all: leo
-
-leo: leo.o xml.o osm.o svg.o svg-icon.o css-parse.o css-lex.o style.o css.o dict.o sym.o sym-point.o sym-line.o sym-text.o map.o shp.o
-
-INC=leo.h dict-keys.h dict-values.h dict-props.h osm.h svg.h style.h css.h dict.h map.h sym.h
-
-leo.o: leo.c $(INC)
-xml.o: xml.c $(INC)
-osm.o: osm.c $(INC)
-svg.o: svg.c $(INC)
-svg-icon.o: svg-icon.c $(INC)
-style.o: style.c $(INC)
-css.o: css.c $(INC)
-dict.o: dict.c $(INC)
-sym.o: sym.c $(INC)
-sym-point.o: sym-point.c $(INC)
-sym-line.o: sym-line.c $(INC)
-sym-text.o: sym-text.c $(INC)
-css-parse.o: css-parse.c $(INC)
-css-lex.o: css-lex.c $(INC) css-parse.c
-map.o: map.c $(INC)
-shp.o: shp.c $(INC)
-
-sym-text.o: CFLAGS+=$(FTCF) $(PANGOCF)
-
-css-parse.c: css-parse.y
- bison --name-prefix=css_ --token-table --verbose --defines -o $@ $^
+# Makefile for Hic Est Leo
+
+all: runtree programs extras configs
+
+# Include configuration
+s=.
+-include obj/config.mk
+obj/config.mk:
+ @echo "You need to run configure first." && false
+
+BUILDSYS=$(s)/build
+
+# We will use the libucw build system
+include $(BUILDSYS)/Maketop