############################################################################ # # Makefile -- Makefile for vishnu package # # Copyright (C) 2004 Imperial College, London # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ########################################################################### PACKAGE=vishnu VERSION=1.0 # prefix for use with Greenstone 3 prefix=$(GSDL3HOME) # prefix for standalone vishnu #prefix=../../ # a directory on the java classpath JAVALIBDIR=$(prefix)/lib/java # the directory for applet jar files WEBLIBDIR=$(prefix)/web/lib SERVLETCLASSDIR=$(prefix)/web/WEB-INF/classes/vishnu/server # this is to find the mg stuff when installing as part of Greenstone 3 - # otherwise the mg jar file should be in the classpath MYCLASSPATH=$(CLASSPATH):$(prefix)/packages/mg/java/org/greenstone/mg/classes # the top level src directory JAVASRCDIR=../ #the base directory where to put class files JAVACLASSDIR=./classes #name/location of java compiler JAVAC=$(JAVA_HOME)/bin/javac -source 1.4 JAVA=$(JAVA_HOME)/bin/java JAR=$(JAVA_HOME)/bin/jar JAVACOPTIONS= -deprecation -g all: compile setup: mkdir -p $(JAVACLASSDIR) mkdir -p $(JAVALIBDIR) mkdir -p $(WEBLIBDIR) mkdir -p $(SERVLETCLASSDIR) compile: setup $(JAVAC) -classpath $(MYCLASSPATH) -d $(JAVACLASSDIR) -sourcepath $(JAVASRCDIR) $(JAVACOPTIONS) */*.java */*/*.java */*/*/*.java jar cf vishnu.jar -C $(JAVACLASSDIR) vishnu install: cp vishnu.jar $(JAVALIBDIR)/ cp vishnu.jar $(WEBLIBDIR)/ cp $(JAVACLASSDIR)/vishnu/server/VisServlet.class $(SERVLETCLASSDIR)/ clean: rm -r vishnu.jar $(JAVACLASSDIR)/* distclean: clean