1 | ############################################################################
|
---|
2 | #
|
---|
3 | # Makefile -- Makefile for vishnu java source
|
---|
4 | #
|
---|
5 | # A component of the Greenstone digital library software
|
---|
6 | # from the New Zealand Digital Library Project at the
|
---|
7 | # University of Waikato, New Zealand.
|
---|
8 | #
|
---|
9 | # Copyright (C) 2000 New Zealand Digital Library Project
|
---|
10 | #
|
---|
11 | # This program is free software; you can redistribute it and/or modify
|
---|
12 | # it under the terms of the GNU General Public License as published by
|
---|
13 | # the Free Software Foundation; either version 2 of the License, or
|
---|
14 | # (at your option) any later version.
|
---|
15 | #
|
---|
16 | # This program is distributed in the hope that it will be useful,
|
---|
17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | # GNU General Public License for more details.
|
---|
20 | #
|
---|
21 | # You should have received a copy of the GNU General Public License
|
---|
22 | # along with this program; if not, write to the Free Software
|
---|
23 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
24 | #
|
---|
25 | ###########################################################################
|
---|
26 |
|
---|
27 | PACKAGE=@PACKAGE@
|
---|
28 | VERSION=@VERSION@
|
---|
29 |
|
---|
30 | # edit these values if you need to
|
---|
31 | prefix=@prefix@
|
---|
32 | # a directory on the java classpath
|
---|
33 | JAVALIBDIR=$(prefix)/lib/java
|
---|
34 | # the directory for applet jar files
|
---|
35 | WEBLIBDIR=$(prefix)/web/lib
|
---|
36 | SERVLETCLASSDIR=$(prefix)/web/WEB-INF/classes/vishnu/server
|
---|
37 |
|
---|
38 | # this is to find the mg stuff when installing as part of Greenstone
|
---|
39 | MYCLASSPATH=$(CLASSPATH):$(prefix)/packages/mg/java/org/greenstone/mg/classes
|
---|
40 | VISHNUHOME=../../
|
---|
41 | # the top level src directory
|
---|
42 | JAVASRCDIR=../
|
---|
43 |
|
---|
44 | #the base directory where to put class files
|
---|
45 | JAVACLASSDIR=./classes
|
---|
46 |
|
---|
47 | #name/location of java compiler
|
---|
48 | JAVAC=$(JAVA_HOME)/bin/javac
|
---|
49 | JAVA=$(JAVA_HOME)/bin/java
|
---|
50 | JAVAH=$(JAVA_HOME)/bin/javah
|
---|
51 | JAR=$(JAVA_HOME)/bin/jar
|
---|
52 |
|
---|
53 | JAVACOPTIONS= -deprecation -g
|
---|
54 |
|
---|
55 | all: compile
|
---|
56 |
|
---|
57 | setup:
|
---|
58 | mkdir -p $(JAVACLASSDIR)
|
---|
59 |
|
---|
60 | compile: setup
|
---|
61 | $(JAVAC) -classpath $(MYCLASSPATH) -d $(JAVACLASSDIR) -sourcepath $(JAVASRCDIR) $(JAVACOPTIONS) */*.java */*/*.java */*/*/*.java
|
---|
62 | $(JAVAH) -classpath $(JAVACLASSDIR) -d $(JAVASRCDIR)/cluster vishnu.server.Cluster
|
---|
63 | jar cf vishnu.jar -C $(JAVACLASSDIR) vishnu
|
---|
64 |
|
---|
65 | install:
|
---|
66 | cp vishnu.jar $(JAVALIBDIR)/
|
---|
67 | cp vishnu.jar $(WEBLIBDIR)/
|
---|
68 | # uncomment the following if using vishnu outside of greenstone
|
---|
69 | #$(VISHNUHOME)/mkinstalldirs $(SERVLETCLASSDIR)
|
---|
70 | #$(VISHNUHOME)/mkinstalldirs $(VISHNUHOME)/lib
|
---|
71 | #cp $(JAVACLASSDIR)/vishnu/server/VisServlet.class $(SERVLETCLASSDIR)/
|
---|
72 | #cp vishnu.jar $(VISHNUHOME)/lib
|
---|
73 | clean:
|
---|
74 | rm -r vishnu.jar ./classes/*
|
---|
75 |
|
---|
76 | distclean: clean
|
---|
77 | rm Makefile
|
---|
78 |
|
---|
79 |
|
---|