serval-dna/java-api/Makefile.in
Andrew Bettison e769af0067 Compile Java during make, not during tests
Re-organised all Java source code under the java-api subdirectory, which
also contains a Makefile.in that performs the Java compilation.  This
makefile is only invoked if ./configure finds a working Java compiler.
2016-11-14 11:28:08 +10:30

32 lines
856 B
Makefile

# Makefile.in for Serval DNA Java API
# vim: noet ts=8 sts=0 sw=8
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
sysconfdir=@sysconfdir@
localstatedir=@localstatedir@
JAVAC = @JAVAC@
CLASSDIR = classes
TESTCLASSDIR = testclasses
.PHONY: all check clean classes testclasses
all: check classes testclasses
check:
@if [ -z "$(JAVAC)" ]; then echo "No java compiler configured" >&2; exit 1; fi
@if ! $(JAVAC) -version >/dev/null; then echo "Java compiler not executable" >&2; exit 1; fi
classes:
@mkdir -p $(CLASSDIR)
find $(SOURCE_PREFIX)src -name '*.java' | xargs $(JAVAC) -Xlint:unchecked -d $(CLASSDIR)
testclasses: classes
@mkdir -p $(TESTCLASSDIR)
find $(SOURCE_PREFIX)test -name '*.java' | xargs $(JAVAC) -Xlint:unchecked -d $(TESTCLASSDIR) -classpath $(CLASSDIR)
clean:
@$(RM) -r $(CLASSDIR) $(TESTCLASSDIR)