-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (34 loc) · 950 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
CLASSPATH := \
.:./lib/json-20230618.jar:./target/classes:./target/test-classes
TEST := src/test/java/*.java
CLASSES := client/*.java \
clock/*.java \
client/content/*.java \
client/getclient/*.java \
server/*.java \
server/helpers/*.java \
rest/*.java \
rest/*.java
CLASSES := $(foreach c, $(CLASSES), src/main/java/$(c))
run: compile tests
unit:
java -cp $(CLASSPATH) UnitTests
tests:
java -cp $(CLASSPATH) ScenarioTests
server:
java -cp $(CLASSPATH) server.AggregationServer
client:
java -cp $(CLASSPATH) client.getclient.GETClient localhost:4567
content:
java -cp $(CLASSPATH) client.content.ContentServer localhost:4567 data1.txt
compile: make_dir compile_class compile_test
make_dir:
mkdir -p target
mkdir -p target/classes
mkdir -p target/test-classes
compile_class:
javac -d ./target/classes/ -cp $(CLASSPATH) $(CLASSES)
compile_test:
javac -d ./target/test-classes/ -cp $(CLASSPATH) $(TEST)
clean:
rm *.class