]> git.openstreetmap.org Git - rails.git/blobdiff - db/functions/Makefile
api06: Fix normal way and relation uploading (i.e. not as part of a diff).
[rails.git] / db / functions / Makefile
index 6544db1ff12923e86653d848465522dd55b9e636..7652862faf55b5bfad71eddf7e56184e5dc62efc 100644 (file)
@@ -1,4 +1,17 @@
 QTDIR=../../lib/quad_tile
 
 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
+
+libmyosm.so: quadtile.o maptile.o
+       cc ${LDFLAGS} -o libmyosm.so quadtile.o maptile.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