source: main/trunk/greenstone3/src/packages/javagdbm/java/Makefile.in@ 35640

Last change on this file since 35640 was 35640, checked in by davidb, 14 months ago

Tidied up an echo statement that needed to be quoted, else the '=>' in it gets treated as output redirection

  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1# Makefile for Java part of JavaGDBM
2# Katherine Don, 2005
3
4#JAVAC = $(JAVA_HOME)/bin/javac
5#JAVAH = $(JAVA_HOME)/bin/javah
6#JAR = $(JAVA_HOME)/bin/jar
7JAVAC = @JAVAC@
8# 'javah' existed until JDK 1.7, transitional in JDK 1.8, then removed by JDK 1.9 (use 'javac -h' instead)
9# Makefile rules below test for 'javah' and use it if it found, otherwise runs with 'javac -h' version
10JAVAH = javah
11JAR = jar
12
13JAVACFLAGS = @JAVACFLAGS@
14
15JAVAGDBMHOME=../
16JAVACLASSDIR=./classes
17JAVASRCDIR=.
18JAVACOPTIONS= -deprecation -g -O
19JAVACLASSPATH=$(JAVACLASSDIR):
20
21all: setup compile
22
23setup:
24 mkdir -p $(JAVACLASSDIR)
25
26compile: setup
27 $(JAVAC) $(JAVACFLAGS) -d $(JAVACLASSDIR) -sourcepath $(JAVASRCDIR) $(JAVACOPTIONS) au/com/pharos/*/*.java
28# $(JAVAC) -h $(JAVAGDBMHOME)/jni -classpath $(JAVACLASSPATH) -d java au/com/pharos/gdbm/GdbmFile.java
29 @echo Checking for javah ...
30# $(eval found = $(shell which javah 2>/dev/null | wc -l))
31 $(eval found = $(shell command -v javah | wc -l))
32 @if test "$(found)" = "1" ; then \
33 echo "... found" ; \
34 echo $(JAVAH) -o $(JAVAGDBMHOME)/jni/GdbmFile.h -classpath $(JAVACLASSPATH) au.com.pharos.gdbm.GdbmFile ; \
35 $(JAVAH) -o $(JAVAGDBMHOME)/jni/GdbmFile.h -classpath $(JAVACLASSPATH) au.com.pharos.gdbm.GdbmFile ; \
36 else \
37 echo "... not found => using 'javac -h'" ; \
38 echo $(JAVAC) -h $(JAVAGDBMHOME)/jni -classpath $(JAVACLASSPATH) -d java au/com/pharos/gdbm/GdbmFile.java ; \
39 $(JAVAC) -h $(JAVAGDBMHOME)/jni -classpath $(JAVACLASSPATH) -d java au/com/pharos/gdbm/GdbmFile.java ; \
40 fi
41 jar cf $(JAVAGDBMHOME)/javagdbm.jar -C $(JAVACLASSDIR) au
42
43clean:
44 rm -rf $(JAVACLASSDIR) $(JAVAGDBMHOME)/javagdbm.jar $(JAVAGDBMHOME)/jni/GdbmFile.h
45
46install:
47
48distclean: clean
49 rm -f Makefile
50
Note: See TracBrowser for help on using the repository browser.