-
Notifications
You must be signed in to change notification settings - Fork 62
/
Makefile
64 lines (45 loc) · 1.34 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
SRC = \
src/CoordCube.java \
src/CubieCube.java \
src/Search.java \
src/Util.java \
src/Tools.java
MAINPROG = example/MainProgram.java
TESTSRC = test/test.java
ifndef probe
probe = 0
endif
ifndef maxl
maxl = 30
endif
ifndef ntest
ntest = 1000
endif
DIST = dist/twophase.jar
DISTTEST = dist/test.class
.PHONY: build clean run testRnd testRndMP testRndStd testSel demo
build: $(DIST)
$(DIST): $(SRC) $(MAINPROG)
@javac -d dist $(SRC) $(MAINPROG) -Xlint:all
@cp -f $(SRC) dist/cs/min2phase/
@cd dist && jar cfe twophase.jar ui.MainProgram ui/*.class cs/min2phase/*.class cs/min2phase/*.java
run: $(DIST)
@java -jar $(DIST)
testRnd: $(DISTTEST)
@java -ea -cp dist:$(DIST) test 40 $(ntest) $(maxl) 10000000 $(probe) 0
testRndMP: $(DISTTEST)
@java -ea -cp dist:$(DIST) test 72 $(ntest) $(maxl) 10000000 $(probe) 0
testRndStd: $(DISTTEST)
@java -ea -cp dist:$(DIST) test 40 $(ntest) 30 10000000 $(probe) 0 | grep AvgT
@java -ea -cp dist:$(DIST) test 40 $(ntest) 21 10000000 $(probe) 0 | grep AvgT
@java -ea -cp dist:$(DIST) test 40 $(ntest) 20 10000000 $(probe) 0 | grep AvgT
testSel: $(DISTTEST)
@java -ea -cp dist:$(DIST) test 24
demo: $(DIST)
@javac -d dist -cp dist:$(DIST) example/demo.java
@java -ea -cp dist:$(DIST) demo
$(DISTTEST): $(DIST) $(TESTSRC)
@javac -d dist -cp dist:$(DIST) $(TESTSRC)
rebuild: clean build
clean:
@rm -rf dist/*