### ====================================================================
### Makefile for the precision-independent common files in the Java
### implementation of the ELEFUNT package.
###
### Current target list:
###	all			make all .class files
###	check			dummy target
###	clean			remove intermediate files that make can
###				rebuild
###	clobber			same as distclean
###	distclean		same as mostlyclean
###	install			dummy target
###	lst-files		make *.lst test output files
###	maintainer-clean	do NOT use this target (for maintainer only)
###	mostlyclean		same as clean
###	uninstall		dummy target
###
### [28-May-2002]
### ====================================================================

CMP		= cmp

DIFF		= diff

JAVA		= java

JAVAFLAGS	=

JAVAC		= javac

JAVACFLAGS	=

JAVAENV		= env CLASSPATH=.:../dp

LN		= ln -f

LST		= lst

NAME		= xxx

OUT		= $(LST)-$(NAME)

RM		= /bin/rm -f

SHELL		= /bin/sh

### ====================================================================

CLASSFILES	= $(JAVAFILES:.java=.class)

JAVAFILES       = extmath.java fmt.java fmtflt.java fmtint.java initseed.java \
		  maxtest.java ranbase.java

LSTFILES	= $(TESTFILES:.java=.lst)

TESTFILES       = extmath.java fmt.java fmtflt.java fmtint.java initseed.java \
		  maxtest.java

### ====================================================================

.SUFFIXES:
.SUFFIXES:	.lst .class .java

.class.lst:
	$(JAVAENV) $(JAVA) $(JAVAFLAGS) $* >$@
	$(LN) $@ $*.$(OUT)

.java.class:
	$(JAVAENV) $(JAVAC) $(JAVACFLAGS) $<

### ====================================================================

all:	$(CLASSFILES)

check:	lst-files
	@echo There should be no difference output other than the test file names:
	@for f in $(LSTFILES) ; \
	do \
		echo ==================== $$f ; \
		$(DIFF) okay/$$f $$f ; \
	done

clean:
	-$(RM) *.class
	-$(RM) *.i
	-$(RM) *.o
	-$(RM) *~
	-$(RM) \#*
	-$(RM) a.out
	-$(RM) core

clobber:	distclean

distclean:	mostlyclean
	-$(RM) *.$(LST) *.$(LST)-xxx *.$(OUT)

install:

lst-files:	all $(LSTFILES)

maintainer-clean:	distclean
	@echo "This command is intended for maintainers to use;"
	@echo "it deletes files that may require special tools to rebuild."

mostlyclean:	clean

uninstall:
