From: Sandro Santilli Date: Tue, 8 Mar 2005 12:39:42 +0000 (+0000) Subject: Added libjts build scripts X-Git-Tag: pgis_1_0_0RC4~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99ef703c7ead16dd1f7434dd4c6252b3a91e1577;p=postgis Added libjts build scripts git-svn-id: http://svn.osgeo.org/postgis/trunk@1518 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/Makefile.config b/Makefile.config index f9d720e77..b8a0fe1e9 100644 --- a/Makefile.config +++ b/Makefile.config @@ -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 index 000000000..8f907b8d5 --- /dev/null +++ b/libjts/Makefile @@ -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 index 000000000..a90979601 --- /dev/null +++ b/libjts/README @@ -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