Make Evergreen link to the OpenSRF JavaScript files, rather than copy them.
[Evergreen.git] / Open-ILS / src / java / Makefile.am
1 JAVA_LIBDIR = .lib
2 JAVAC = javac -J-Xmx256m
3 JAVA = java -Xmx256m 
4 OSRF_HOME = ../../../../../OpenSRF/trunk/src/java
5 OSRFJAVA = $(OSRF_HOME)/opensrf.jar
6 EXT = $(OSRF_HOME)/ext
7 JAVA_LIBS = .:$(JAVA_LIBDIR):$(OSRFJAVA):$(EXT)/json-jdk1.5-2007-05-01.jar:$(EXT)/wstx-lgpl-3.2.1.jar:$(EXT)/stax-api-1.0.1.jar:$(EXT)/java_memcached-release_1.5.1.jar
8 JAVA_SRC = \
9         org/open_ils/*.java\
10         org/open_ils/idl/*.java\
11         org/open_ils/util/*.java\
12         org/open_ils/test/*.java
13
14 all-local:      jar
15
16 jar:
17         $(MKDIR_P) $(JAVA_LIBDIR)
18         $(JAVAC) -d $(JAVA_LIBDIR) -cp $(JAVA_LIBS) $(JAVA_SRC) 2>&1 
19         rm -f openils.jar
20         echo "creating openils.jar"
21         jar cf openils.jar -C .lib org
22
23
24 # only prints the first 30 lines of errors
25 slim:
26         $(MKDIR_P) $(JAVA_LIBDIR)
27         $(JAVAC) -d $(JAVA_LIBDIR) -cp $(JAVA_LIBS) $(JAVA_SRC) 2>&1 | head -n 30
28         @echo -e "\nTruncating at 30 lines"
29
30 check:
31         $(MKDIR_P) $(JAVA_LIBDIR)
32         $(JAVAC) -Xlint:unchecked -d $(JAVA_LIBDIR) -cp $(JAVA_LIBS) $(JAVA_SRC) 2>&1 | head -n 30
33         @echo -e "\nTruncating at 30 lines"
34
35 run:
36         @$(JAVA) -cp $(JAVA_LIBS):openils.jar $(JAVA_EXE) $(JAVA_ARGS)
37
38 deps:
39         $(MKDIR_P) ext
40
41 docs:
42         find . -name *.java > files;
43         javadoc -classpath $(JAVA_LIBS) -d doc @files;
44         rm files;
45
46 clean:
47         rm -r $(JAVA_LIBDIR)
48         
49
50