-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (27 loc) · 870 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
SERVER = 12345
MAPPER1 = 12346
MAPPER2 = 12347
MAPPER3 = 12348
REDUCER = 12349
server_run_client_build:
cd ./code/server; go build -o mapper.out mapper.go
cd ./code/server; ./mapper.out $(MAPPER1) &
cd ./code/server; ./mapper.out $(MAPPER2) &
cd ./code/server; ./mapper.out $(MAPPER3) &
cd ./code/server; go build -o reducer.out reducer.go
cd ./code/server; ./reducer.out $(REDUCER) &
cd ./code/server; go build -o server.out server.go
cd ./code/server; ./server.out $(SERVER) $(MAPPER1) $(REDUCER) &
go build -o ./code/client.out ./code/client.go
client_run:
./code/client.out cats cats.txt $(SERVER)
kill:
pkill server.out || true
pkill mapper.out || true
pkill reducer.out || true
clean:
go clean
cd ./code/server; rm mapper.out; rm reducer.out; rm server.out;
rm ./code/client.out
grep:
cd ./code/server; cat cats.txt | grep cats