=================================================================== RCS file: /home/cvs/OpenXM/src/OpenMath/Makefile,v retrieving revision 1.2 retrieving revision 1.7 diff -u -p -r1.2 -r1.7 --- OpenXM/src/OpenMath/Makefile 1999/11/02 14:54:37 1.2 +++ OpenXM/src/OpenMath/Makefile 2000/01/13 12:35:56 1.7 @@ -1,26 +1,56 @@ # -# $OpenXM: OpenXM/src/OpenMath/Makefile,v 1.1.1.1 1999/11/02 11:52:34 tam Exp $ +# $OpenXM: OpenXM/src/OpenMath/Makefile,v 1.6 1999/12/09 00:32:36 tam Exp $ -make: - if test -d ../../lib/java-support - then - mkdir ../../lib/java-support - fi - javac -d ../../lib/java-support -O *.java +JAVADIR = /usr/local/jdk1.1.8 +LIBDIR = ../../lib/java-support + + +all: install + + clean: find . -name '*.class' \ -exec echo rm -f {} \; \ -exec rm -f {} \; + -rm -f *.so *.h *.jar -dist: - tar cvfz ../OM2OXM.tgz . -dist-clean: #clean dist - make clean +distclean: clean find . -name '*~' \ -exec echo rm -f {} \; \ -exec rm -f {} \; + test: - javac -d . -deprecation -g *.java + $(JAVADIR)/bin/javac -d . -deprecation -g *.java + make libnative.so + + +install: OpenXM.jar OM2OXM.class OMproxy.class libnative.so + if ! test -d $(LIBDIR); then \ + mkdir -p $(LIBDIR); \ + fi + cp ${.ALLSRC} $(LIBDIR) + + +.SUFFIXES: .java .class + + +.java.class : + $(JAVADIR)/bin/javac -d . -O ${.IMPSRC} + + +OpenXM.jar: JP/ac/kobe_u/math/tam/OpenXM/{OpenXM,*}.class + @$(JAVADIR)/bin/javac -d . -O JP/ac/kobe_u/math/tam/OpenXM/OpenXM.java + @#$(JAVADIR)/bin/javac -d . -O ${.OODATE} + $(JAVADIR)/bin/jar cf OpenXM.jar `find JP/ -name '*.class'` + + +OMproxy.h: OMproxy.class + $(JAVADIR)/bin/javah -jni ${.PREFIX} + + +libnative.so: native.c OMproxy.h + cc -o libnative.so native.c \ + -shared `find $(JAVADIR)/include/ -type d | sed 's/^/-I/'`