X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dd9ad16303f0496455720721e01b3c5042094f38..1debc147b8c4d9c917d54a279dcf0e2718e0665e:/db/functions/Makefile?ds=sidebyside 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