]> granicus.if.org Git - postgis/commitdiff
Added libjts build scripts
authorSandro Santilli <strk@keybit.net>
Tue, 8 Mar 2005 12:39:42 +0000 (12:39 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 8 Mar 2005 12:39:42 +0000 (12:39 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@1518 b70326c6-7e19-0410-871a-916f4a2858ee

Makefile.config
libjts/Makefile [new file with mode: 0644]
libjts/README [new file with mode: 0644]

index f9d720e7779059aa4f291ab215ab2fb6019bf5ff..b8a0fe1e9fd2e558516dfdefba9afa6c1bc99fd5 100644 (file)
@@ -37,8 +37,8 @@ GEOS_DIR ?= /usr/local
 # Set USE_JTS to 1 if you have libjts installed. 
 #
 USE_JTS = 0
-JTS_INCLUDES = ${PWD}/../libjts
-JTS_LIBDIR = ${PWD}/../libjts
+JTS_INCLUDES = ../libjts
+JTS_LIBDIR = ../libjts
 
 
 #
diff --git a/libjts/Makefile b/libjts/Makefile
new file mode 100644 (file)
index 0000000..8f907b8
--- /dev/null
@@ -0,0 +1,40 @@
+JTSJAR?=jts-1.5.jar
+
+CXXFLAGS = -g -O2 -Wall 
+GCJFLAGS = -g -O2 -Wall 
+
+JTSCLASSES = \
+               com.vividsolutions.jts.geom.Geometry \
+               com.vividsolutions.jts.geom.Point \
+               com.vividsolutions.jts.geom.MultiPoint \
+               com.vividsolutions.jts.geom.LineString \
+               com.vividsolutions.jts.geom.LinearRing \
+               com.vividsolutions.jts.geom.MultiLineString \
+               com.vividsolutions.jts.geom.Polygon \
+               com.vividsolutions.jts.geom.MultiPolygon \
+               com.vividsolutions.jts.geom.GeometryCollection \
+               com.vividsolutions.jts.geom.GeometryFactory \
+               com.vividsolutions.jts.geom.PrecisionModel \
+               com.vividsolutions.jts.geom.Coordinate \
+               com.vividsolutions.jts.geom.CoordinateSequenceFactory \
+               com.vividsolutions.jts.geom.CoordinateSequence \
+               com.vividsolutions.jts.geom.IntersectionMatrix \
+               com.vividsolutions.jts.io.WKTReader \
+               com.vividsolutions.jts.io.WKTWriter  
+
+all: libjts.so jts.h 
+
+libjts.so: $(JTSJAR)
+       gcj $(GCJFLAGS) -shared -o libjts.so $(JTSJAR)
+
+jtsincludes: $(JTSJAR) 
+       mkdir -p com/vividsolutions/jts/geom com/vividsolutions/jts/io
+       gcjh -I $(JTSJAR) $(JTSCLASSES)
+
+jts.h: $(JTSJAR) jtsincludes
+       gcjh -I $(JTSJAR) \
+               -stub \
+               -o jts.h $(JTSCLASSES)
+
+clean:
+       rm -Rf com libjts.so jts.h
diff --git a/libjts/README b/libjts/README
new file mode 100644 (file)
index 0000000..a909796
--- /dev/null
@@ -0,0 +1,11 @@
+This directory contains a simple Makefile able to 
+produce a shared library and headers for linking
+apps against the JTS library.
+
+All you need to have is a JTS jar file.
+Set its path on top of the Makefile or in the
+environment variable JTSJAR.
+
+Good luck!
+
+--strk