Put checks in to verify that rows from postgres are sorted by ID.
[planetdump.git] / Makefile
1 CFLAGS += -Wall
2
3 MYSQL_CFLAGS += -g -O2 -Wall
4 MYSQL_CFLAGS += $(shell mysql_config --cflags)
5
6 MYSQL_LDFLAGS += $(shell mysql_config --libs)
7
8 PGSQL_CFLAGS += $(shell pkg-config --cflags libpqxx)
9 PGSQL_LDFLAGS += $(shell pkg-config --libs libpqxx)
10
11 .PHONY: all clean
12
13 all: planet05 planet06 UTF8Sanitizer planet06_pg
14
15 clean:
16         rm -f UTF8Sanitizer planet05 planet06 planet06_pg *.o
17
18 planet05: planet05.c keyvals.c
19         $(CC) $(CFLAGS) $(MYSQL_CFLAGS) $(MYSQL_LDFLAGS) -o $@ $^
20
21 planet06: planet06.c keyvals.c
22         $(CC) $(CFLAGS) $(MYSQL_CFLAGS) $(MYSQL_LDFLAGS) -o $@ $^
23
24 UTF8Sanitizer: UTF8sanitizer.c
25         $(CC) $(CFLAGS) UTF8sanitizer.c -o UTF8Sanitizer
26
27 planet06_pg: planet06_pg.o users.o keyvals.o output_osm.o
28         $(CXX) -o $@ $^ $(PGSQL_LDFLAGS)
29
30 %.o: %.cpp
31         $(CXX) $(CFLAGS) $(PGSQL_CFLAGS) -std=c++0x -o $@ -c $<