1 | ############################################################################
|
---|
2 | #
|
---|
3 | # Makefile -- Makefile for vishnu package
|
---|
4 | #
|
---|
5 | # Copyright (C) 2004 Imperial College, London
|
---|
6 | #
|
---|
7 | # This program is free software; you can redistribute it and/or modify
|
---|
8 | # it under the terms of the GNU General Public License as published by
|
---|
9 | # the Free Software Foundation; either version 2 of the License, or
|
---|
10 | # (at your option) any later version.
|
---|
11 | #
|
---|
12 | # This program is distributed in the hope that it will be useful,
|
---|
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | # GNU General Public License for more details.
|
---|
16 | #
|
---|
17 | # You should have received a copy of the GNU General Public License
|
---|
18 | # along with this program; if not, write to the Free Software
|
---|
19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
20 | #
|
---|
21 | ###########################################################################
|
---|
22 |
|
---|
23 | PACKAGE=vishnu
|
---|
24 | VERSION=1.0
|
---|
25 |
|
---|
26 | # prefix for use with Greenstone 3
|
---|
27 | prefix=$(GSDL3HOME)
|
---|
28 | # prefix for standalone vishnu
|
---|
29 | #prefix=../../
|
---|
30 |
|
---|
31 | # a directory on the java classpath
|
---|
32 | JAVALIBDIR=$(prefix)/lib/java
|
---|
33 | # the directory for applet jar files
|
---|
34 | WEBLIBDIR=$(prefix)/web/lib
|
---|
35 | SERVLETCLASSDIR=$(prefix)/web/WEB-INF/classes/vishnu/server
|
---|
36 |
|
---|
37 | # this is to find the mg stuff when installing as part of Greenstone 3 -
|
---|
38 | # otherwise the mg jar file should be in the classpath
|
---|
39 | MYCLASSPATH=$(CLASSPATH):$(prefix)/packages/mg/java/org/greenstone/mg/classes
|
---|
40 |
|
---|
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 -source 1.4
|
---|
49 | JAVA=$(JAVA_HOME)/bin/java
|
---|
50 | JAR=$(JAVA_HOME)/bin/jar
|
---|
51 |
|
---|
52 | JAVACOPTIONS= -deprecation -g
|
---|
53 |
|
---|
54 | all: compile
|
---|
55 |
|
---|
56 | setup:
|
---|
57 | mkdir -p $(JAVACLASSDIR)
|
---|
58 | mkdir -p $(JAVALIBDIR)
|
---|
59 | mkdir -p $(WEBLIBDIR)
|
---|
60 | mkdir -p $(SERVLETCLASSDIR)
|
---|
61 |
|
---|
62 | compile: setup
|
---|
63 | $(JAVAC) -classpath $(MYCLASSPATH) -d $(JAVACLASSDIR) -sourcepath $(JAVASRCDIR) $(JAVACOPTIONS) */*.java */*/*.java */*/*/*.java
|
---|
64 | jar cf vishnu.jar -C $(JAVACLASSDIR) vishnu
|
---|
65 |
|
---|
66 | install:
|
---|
67 | cp vishnu.jar $(JAVALIBDIR)/
|
---|
68 | cp vishnu.jar $(WEBLIBDIR)/
|
---|
69 | cp $(JAVACLASSDIR)/vishnu/server/VisServlet.class $(SERVLETCLASSDIR)/
|
---|
70 |
|
---|
71 | clean:
|
---|
72 | rm -r vishnu.jar $(JAVACLASSDIR)/*
|
---|
73 |
|
---|
74 | distclean: clean
|
---|
75 |
|
---|
76 |
|
---|
77 |
|
---|