X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/cfd55f0c7d253b267190974901340b5bdd0c0bd6..0e78061cdba5cfb3f299f57b7643d2b396ee235b:/db/functions/Makefile?ds=inline diff --git a/db/functions/Makefile b/db/functions/Makefile index 71169b2b7..3fa4ae526 100644 --- a/db/functions/Makefile +++ b/db/functions/Makefile @@ -1,7 +1,8 @@ +BUNDLE ?= bundle PG_CONFIG ?= pg_config DESTDIR ?= . -QTDIR=../../lib/quad_tile +QTDIR=$(shell ${BUNDLE} show quad_tile | tail -n 1)/ext/quad_tile OS=$(shell uname -s) ifeq (${OS},Darwin) @@ -15,8 +16,8 @@ all: ${DESTDIR}/libpgosm.so clean: $(RM) ${DESTDIR}/*.so ${DESTDIR}/*.o -${DESTDIR}/libpgosm.so: ${DESTDIR}/quadtile.o ${DESTDIR}/maptile.o ${DESTDIR}/xid_to_int4.o - cc ${LDFLAGS} -o $@ $< +${DESTDIR}/libpgosm.so: ${DESTDIR}/quadtile.o ${DESTDIR}/xid_to_int4.o + cc ${LDFLAGS} -o $@ $^ ${DESTDIR}/%.o: %.c cc -I `${PG_CONFIG} --includedir` -I `${PG_CONFIG} --includedir-server` -I${QTDIR} -fPIC -O3 -DUSE_PGSQL -c -o $@ $<