-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
45 lines (33 loc) · 933 Bytes
/
makefile
File metadata and controls
45 lines (33 loc) · 933 Bytes
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
# Determine the platform
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
# macOS
DEL = rm -f
OPEN_TERMINAL = open -a Terminal .
CP = -cp ".:lib/gson-2.11.0.jar"
else ifeq ($(UNAME_S),Linux)
# Linux
DEL = rm -f
OPEN_TERMINAL = open -a Terminal .
CP = -cp ".:lib/gson-2.11.0.jar"
else
# Windows
DEL = del
OPEN_TERMINAL = start cmd
CP = -cp ".;lib/gson-2.11.0.jar"
endif
JAVAC = javac
JAVA = java
MAIN = main
BIN_DIR = bin
all: compile
compile:
$(JAVAC) $(CP) -d $(BIN_DIR) src/AggregationServer.java src/ContentServer.java src/GETClient.java
runaggserver:
$(OPEN_TERMINAL) && cd $(BIN_DIR) && $(JAVA) $(CP) AggregationServer
runcntserver:
$(OPEN_TERMINAL) && cd $(BIN_DIR) && $(JAVA) $(CP) ContentServer http://localhost:4567 weather_data.txt
runclient:
cd $(BIN_DIR) && $(JAVA) $(CP) GETClient http://localhost:4567
clean:
cd $(BIN_DIR) && $(DEL) *.class