X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/43b3998657c9807a68e71609c568748c8337b95e..ee656dd1f3ee556e9c6793a70781d4346abfe01e:/db/functions/Makefile diff --git a/db/functions/Makefile b/db/functions/Makefile index 7652862fa..1bdddce71 100644 --- a/db/functions/Makefile +++ b/db/functions/Makefile @@ -1,5 +1,7 @@ QTDIR=../../lib/quad_tile +PGSQLINC=/usr/include/postgresql/8.3/server/ + OS=$(shell uname -s) ifeq (${OS},Darwin) LDFLAGS=-bundle @@ -7,11 +9,22 @@ else LDFLAGS=-shared endif -libmyosm.so: quadtile.o maptile.o - cc ${LDFLAGS} -o libmyosm.so quadtile.o maptile.o +all: libmyosm.so libpgosm.so + +clean: + $(RM) *.so *.o + +libmyosm.so: quadtile.o maptile-mysql.o + cc ${LDFLAGS} -o libmyosm.so quadtile.o maptile-mysql.o + +libpgosm.so: maptile-pgsql.o + cc ${LDFLAGS} -o libpgosm.so maptile-pgsql.o quadtile.o: quadtile.c ${QTDIR}/quad_tile.h cc `mysql_config --include` -I${QTDIR} -fPIC -O3 -c -o quadtile.o quadtile.c -maptile.o: maptile.c - cc `mysql_config --include` -fPIC -O3 -c -o maptile.o maptile.c +maptile-mysql.o: maptile.c + cc `mysql_config --include` -fPIC -O3 -DUSE_MYSQL -c -o maptile-mysql.o maptile.c + +maptile-pgsql.o: maptile.c + cc -I${PGSQLINC} -O3 -fPIC -DUSE_PGSQL -c -o maptile-pgsql.o maptile.c \ No newline at end of file