X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/26fb51c86e178a1c5bbe313c4688c623646173f8..40abfdd316be98b56a95afc4d12fbf42b29ff982:/db/functions/Makefile?ds=inline diff --git a/db/functions/Makefile b/db/functions/Makefile index ce216e765..231496d40 100644 --- a/db/functions/Makefile +++ b/db/functions/Makefile @@ -1,10 +1,25 @@ QTDIR=../../lib/quad_tile -libquadtile.so: quadtile.o - cc -shared -o libquadtile.so quadtile.o +OS=$(shell uname -s) +ifeq (${OS},Darwin) + LDFLAGS=-bundle +else + LDFLAGS=-shared +endif -libquadtile.dylib: quadtile.o - libtool -dynamic quadtile.o -o libquadtile.dylib +all: libpgosm.so -quadtile.o: quadtile.c ${QTDIR}/quad_tile.h - cc `mysql_config --include` -I${QTDIR} -fPIC -O3 -c -o quadtile.o quadtile.c +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