X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/cfbdd3f7e1c688e2c875ded9fd847fcc1c3a4caf..286bffa3dba448f4364c6798f35003d8c6eefc4a:/db/functions/Makefile?ds=sidebyside diff --git a/db/functions/Makefile b/db/functions/Makefile index 6544db1ff..231496d40 100644 --- a/db/functions/Makefile +++ b/db/functions/Makefile @@ -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