]> granicus.if.org Git - postgis/commitdiff
Patches from Alex Bodnaru (debian maintainer)
authorMarkus Schaber <markus@schabi.de>
Tue, 22 Feb 2005 12:31:31 +0000 (12:31 +0000)
committerMarkus Schaber <markus@schabi.de>
Tue, 22 Feb 2005 12:31:31 +0000 (12:31 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@1423 b70326c6-7e19-0410-871a-916f4a2858ee

jdbc/Makefile

index 95684c784cfcf236a1eda41ea356f93e220d386c..8a2c0f78f098924661b437aeb8fe79a880e6dd1b 100644 (file)
@@ -1,13 +1,19 @@
 JAVAC = javac
 JAVA = java
 JAR = jar
-CLASSPATH = ../../../src/interfaces/jdbc/jars/postgresql.jar:.
+
+PGSQL_SRC ?= ${PWD}/../../..
+
+CLASSPATH ?= $(PGSQL_SRC)/src/interfaces/jdbc/jars/postgresql.jar:.
+
+top_builddir:=$(PGSQL_SRC)
+include $(PGSQL_SRC)/src/Makefile.global
 
 all:   ogis \
        pgobjs \
        test
 
-jar:
+jar: ogis pgobjs
        $(JAR) -cf postgis.jar org/postgis/*.java org/postgis/*.class README    
 
 ogis: 
@@ -21,12 +27,20 @@ ogis:
                org/postgis/Polygon.java \
                org/postgis/MultiPolygon.java
 
-
 pgobjs:
        $(JAVAC) -classpath $(CLASSPATH) \
                org/postgis/PGgeometry.java \
                org/postgis/PGbox3d.java
 
+install: jar installdirs
+       $(INSTALL_DATA) postgis.jar $(DESTDIR)
+
+installdirs:
+       $(mkinstalldirs) $(DESTDIR)
+
+uninstall:
+       rm -f $(DESTDIR)/postgis.jar
+
 test:
        $(JAVAC) -classpath $(CLASSPATH) examples/Test.java
        $(JAVA) -classpath $(CLASSPATH) examples/Test
@@ -36,3 +50,7 @@ jtest:
        $(JAVAC) -classpath $(CLASSPATH) examples/TestServer.java
        $(JAVA) -classpath $(CLASSPATH) examples/TestServer
 
+clean:
+       rm -f postgis.jar
+       rm -f org/postgis/*.class
+       rm -f examples/*.class