X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/33a65a90c9d0e2ab121e1da9c3efedaf9e6a9789..df283287e69c7941e111072ec4a4ea83e48b76f6:/db/functions/Makefile?ds=inline 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