This repository has been archived by the owner on Mar 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
50 lines (39 loc) · 1.48 KB
/
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
JAVAC=javac -Xlint:all -classpath lib/*:build/ -d build/ -sourcepath src/
JAVA=java
all: dist/judge.jar
# ============================================================================ #
# Sources #
# ============================================================================ #
build/%.class: src/%.java
$(JAVAC) $<
# ============================================================================ #
# Packaging #
# ============================================================================ #
dist/judge.jar: build/dodona/junit/JUnitJSON.class \
build/dodona/junit/MessageWriter.class \
build/dodona/junit/TabTitle.class \
$(shell find build -type f)
mkdir -p $(dir $@)
jar -cf "$@" -C build/ .
# ============================================================================ #
# Phonies #
# ============================================================================ #
# something wicked
space :=
space +=
$(space) :=
$(space) +=
.PHONY: jar
jar: dist/judge.jar
.PHONY: run
run: dist/judge.jar lib/gson-2.8.1.jar lib/junit-4.13.jar lib/hamcrest-core-1.3.jar lib/system-rules-1.16.0.jar
$(JAVA) -cp .:$(subst $ ,:,$^) dodona.junit.JUnitJSON
#.PHONY: test
#test: dist/judge.jar
# $(JAVA) -cp $< dodona.test.Test
.PHONY: clean
clean:
rm -rf build/
mkdir build/
rm -rf dist/
mkdir dist/