]> git.openstreetmap.org Git - rails.git/blobdiff - db/functions/Makefile
Ignore clicks on query results if the mouse has moved
[rails.git] / db / functions / Makefile
index 6544db1ff12923e86653d848465522dd55b9e636..231496d409d74aee0f3159308cafcc2a593a32f0 100644 (file)
@@ -1,4 +1,25 @@
 QTDIR=../../lib/quad_tile
 
-libquadtile.so: quadtile.c ${QTDIR}/quad_tile.h
-       cc `mysql_config --include` -I${QTDIR} -fPIC -O3 -shared -o libquadtile.so quadtile.c
+OS=$(shell uname -s)
+ifeq (${OS},Darwin)
+    LDFLAGS=-bundle
+else
+    LDFLAGS=-shared
+endif
+
+all: libpgosm.so
+
+clean:
+       $(RM) *.so *.o
+
+libpgosm.so: quadtile-pgsql.o maptile-pgsql.o xid_to_int4-pgsql.o
+       cc ${LDFLAGS} -o libpgosm.so quadtile-pgsql.o maptile-pgsql.o xid_to_int4-pgsql.o
+
+quadtile-pgsql.o: quadtile.c ${QTDIR}/quad_tile.h
+       cc -I `pg_config --includedir` -I `pg_config --includedir-server` -I${QTDIR} -fPIC -O3 -DUSE_PGSQL -c -o quadtile-pgsql.o quadtile.c
+
+maptile-pgsql.o: maptile.c
+       cc -I `pg_config --includedir` -I `pg_config --includedir-server` -fPIC -O3 -DUSE_PGSQL -c -o maptile-pgsql.o maptile.c
+
+xid_to_int4-pgsql.o: xid_to_int4.c
+       cc -I `pg_config --includedir` -I `pg_config --includedir-server` -fPIC -O3 -DUSE_PGSQL -c -o xid_to_int4-pgsql.o xid_to_int4.c