X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/33a65a90c9d0e2ab121e1da9c3efedaf9e6a9789..d6f7bbfcd1c0c4befeb85b5a3ee8e2d8ecf1892d:/db/functions/Makefile diff --git a/db/functions/Makefile b/db/functions/Makefile index 6544db1ff..9158b4959 100644 --- a/db/functions/Makefile +++ b/db/functions/Makefile @@ -1,4 +1,28 @@ 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: 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-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 `pg_config --includedir-server` -O3 -fPIC -DUSE_PGSQL -c -o maptile-pgsql.o maptile.c