3 exec_prefix = @exec_prefix@
5 sysconfdir = @sysconfdir@
6 datarootdir = @datarootdir@
9 PACKAGE = @PACKAGE_NAME@
10 VERSION = @PACKAGE_VERSION@
11 SVN:=$(shell svnversion)
12 DATADIR = $(datadir)/$(PACKAGE)
18 CFLAGS += -g -O2 -Wall -Wextra
19 CFLAGS += $(shell xml2-config --cflags)
20 CFLAGS += $(shell geos-config --cflags)
21 CFLAGS += -I$(shell pg_config --includedir)
22 CFLAGS += -DVERSION=\"$(VERSION)-$(SVN)\"
23 CFLAGS += -DHAVE_PTHREAD
24 CFLAGS += -DNOMINATIM_DATADIR=\"$(DATADIR)\"
26 LDFLAGS += $(shell xml2-config --libs)
27 LDFLAGS += $(shell geos-config --libs)
28 LDFLAGS += -L$(shell pg_config --libdir) -lpq
34 SRCS:=$(wildcard *.c) $(wildcard *.cpp)
43 .PHONY: all clean $(PACKAGE).spec
48 rm -f $(APPS) $(OBJS) $(DEPS)
49 rm -f $(PACKAGE)-*.tar.bz2
61 mkdir -p $(DESTDIR)$(bindir)
62 install -m 0755 $(APPS) $(DESTDIR)$(bindir)
63 mkdir -p $(DESTDIR)$(DATADIR)
64 install -m 0644 $(DATA) $(DESTDIR)$(DATADIR)
68 $(CC) -MM $(CFLAGS) $< > $@.$$$$; \
69 sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
75 $(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
77 $(PACKAGE).spec: $(PACKAGE).spec.in
78 sed -e "s/@PACKAGE@/$(PACKAGE)/g; s/@VERSION@/$(VERSION)/g; s/@SVN@/$(SVN)/g;" $^ > $@
80 $(PACKAGE)-$(VERSION).tar.bz2: $(PACKAGE).spec
82 mkdir -p tmp/nominatim
83 cp -p Makefile *.[ch] *.cpp README.txt nominatim-svn.sh tmp/nominatim
84 cp -p nominatim.spec tmp/
88 rpm: $(PACKAGE)-$(VERSION).tar.bz2