-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
50 lines (38 loc) · 961 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
JAVAFILES=$(shell find src -regex .*.java)
SOURCES=$(shell find src -regex .*.java | grep -v Test.java)
TESTS=$(shell find src -regex .*Test.java)
.PHONY: default
default: run
.PHONY: all
all: compile doc
.PHONY: compile
compile: bin/compiled
bin/compiled: $(SOURCES)
mkdir -p bin
javac -d bin $(SOURCES)
touch bin/compiled;
.PHONY: run
run: compile
java -cp bin MVC/MVCMain
.PHONY: doc
doc: doc/generated
doc/generated: $(JAVAFILES)
mkdir -p doc
javadoc -private -d doc -cp /usr/share/junit5/ $(JAVAFILES)
touch doc/generated
.PHONY: viewdoc
viewdoc: doc
xdg-open doc/index.html > /dev/null 2>&1 &
.PHONY: compiletests
compiletests: bin/compiledtests
bin/compiledtests: $(JAVAFILES)
mkdir -p bin
javac -d bin -cp /usr/share/junit5/ $(JAVAFILES)
touch bin/compiledtests
.PHONY: test
test: compiletests
java -jar /usr/share/junit5/junit-platform-console-standalone.jar -cp bin -scan-classpath
.PHONY: clean
clean:
rm -rf bin
rm -rf doc