Fixed bug calling reformDate twice. Since it returns a pointer to static data, it...
[planetdump.git] / Makefile
1 MYSQL_CFLAGS += -g -O2 -Wall
2 MYSQL_CFLAGS += $(shell mysql_config --cflags)
3
4 MYSQL_LDFLAGS += $(shell mysql_config --libs)
5
6 PGSQL_CFLAGS += $(shell pkg-config --cflags libpqxx)
7 PGSQL_LDFLAGS += $(shell pkg-config --libs libpqxx)
8
9 .PHONY: all clean
10
11 all: planet05 planet06 UTF8Sanitizer planet06_pg
12
13 clean:
14         rm -f UTF8Sanitizer planet05 planet06 planet06_pg *.o
15
16 planet05: planet05.c keyvals.c
17         $(CC) $(MYSQL_CFLAGS) $(MYSQL_LDFLAGS) -o $@ $^
18
19 planet06: planet06.c keyvals.c
20         $(CC) $(MYSQL_CFLAGS) $(MYSQL_LDFLAGS) -o $@ $^
21
22 UTF8Sanitizer: UTF8sanitizer.c
23         $(CC) UTF8sanitizer.c -o UTF8Sanitizer
24
25 planet06_pg: planet06_pg.o users.o keyvals.o output_osm.o
26         $(CXX) -o $@ $^ $(PGSQL_LDFLAGS)
27
28 %.o: %.cpp
29         $(CXX) $(PGSQL_CFLAGS) -o $@ -c $<