]> git.openstreetmap.org Git - rails.git/commitdiff
OS X-compatible makefile supplied by agnat
authorRichard Fairhurst <richard@systemed.net>
Sun, 7 Oct 2007 11:15:09 +0000 (11:15 +0000)
committerRichard Fairhurst <richard@systemed.net>
Sun, 7 Oct 2007 11:15:09 +0000 (11:15 +0000)
db/functions/Makefile

index ce216e7655d59ce0a3923691aa4dac93547f1000..2f2abe5252ffee1a511c6fc84d411fb95981c402 100644 (file)
@@ -1,10 +1,14 @@
 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
+libquadtile.so: quadtile.o
+       cc ${LDFLAGS} -o libquadtile.so quadtile.o
 
 quadtile.o: quadtile.c ${QTDIR}/quad_tile.h
        cc `mysql_config --include` -I${QTDIR} -fPIC -O3 -c -o quadtile.o quadtile.c