mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-30 09:58:55 +00:00
43 lines
1.1 KiB
Makefile
43 lines
1.1 KiB
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
|
|
|
|
SOURCES := $(shell find $(SOURCE_PREFIX)src -name '*.java')
|
|
TEST_SOURCES := $(shell find $(SOURCE_PREFIX)test -name '*.java')
|
|
|
|
.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 2>&1; then echo "Java compiler not executable" >&2; exit 1; fi
|
|
|
|
$(CLASSDIR)/dummy: $(SOURCES)
|
|
@mkdir -p $(CLASSDIR)
|
|
@echo "JAVAC $(CLASSDIR)"
|
|
@$(JAVAC) -Xlint:unchecked -d $(CLASSDIR) $(SOURCES)
|
|
@touch $@
|
|
|
|
classes: $(CLASSDIR)/dummy
|
|
|
|
$(TESTCLASSDIR)/dummy: $(TEST_SOURCES) $(CLASSDIR)/dummy
|
|
@mkdir -p $(TESTCLASSDIR)
|
|
@echo "JAVAC $(TESTCLASSDIR)"
|
|
@$(JAVAC) -Xlint:unchecked -d $(TESTCLASSDIR) -classpath $(CLASSDIR) $(TEST_SOURCES)
|
|
@touch $@
|
|
|
|
testclasses: $(TESTCLASSDIR)/dummy
|
|
|
|
clean:
|
|
@$(RM) -r $(CLASSDIR) $(TESTCLASSDIR)
|