-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile
executable file
·37 lines (28 loc) · 1.24 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
CC = g++ -std=c++11
OBJ_DIR = bin
SRC_DIR = src
F_OBJ_FILE_NAMES = utilities.o fs_server.o
C_OBJ_FILE_NAMES = utilities.o master_client.o dummy_client.o fs_client.o
S_OBJ_FILE_NAMES = utilities.o Mapper.o Reducer.o master_server.o fs_client.o
M_OBJ_FILE_NAMES = utilities.o WordCount.o InvertedIndex.o master_client.o MapperNode.o mapper_node.o fs_client.o
R_OBJ_FILE_NAMES = utilities.o WordCount.o InvertedIndex.o master_client.o ReducerNode.o reducer_node.o fs_client.o
C_OBJ_FILES = $(patsubst %,$(OBJ_DIR)/%,$(C_OBJ_FILE_NAMES))
F_OBJ_FILES = $(patsubst %,$(OBJ_DIR)/%,$(F_OBJ_FILE_NAMES))
S_OBJ_FILES = $(patsubst %,$(OBJ_DIR)/%,$(S_OBJ_FILE_NAMES))
M_OBJ_FILES = $(patsubst %,$(OBJ_DIR)/%,$(M_OBJ_FILE_NAMES))
R_OBJ_FILES = $(patsubst %,$(OBJ_DIR)/%,$(R_OBJ_FILE_NAMES))
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
$(CC) -c -g $< -o $@
all : mapper_node master_server dummy_client reducer_node fs_server
dummy_client : $(C_OBJ_FILES)
$(CC) -o $@ $^ -pthread
master_server : $(S_OBJ_FILES)
$(CC) -o $@ $^ -pthread
mapper_node : $(M_OBJ_FILES)
$(CC) -o $@ $^ -pthread
reducer_node : $(R_OBJ_FILES)
$(CC) -o $@ $^ -pthread
fs_server : $(F_OBJ_FILES)
$(CC) -o $@ $^ -pthread
clean:
-rm $(OBJ_DIR)/*.o mapper_node master_server dummy_client reducer_node fs_server