-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
53 lines (42 loc) · 1.16 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
ROOT_DIR = .
SERVER_DIR = $(ROOT_DIR)/src/grpc/server
CLIENT_DIR = $(ROOT_DIR)/src/grpc/client
MGD_DIR = $(ROOT_DIR)/src/grpc/mgd_server
TEST_DIR = $(ROOT_DIR)/src/grpc/test
UDP_DATA_SIMULATOR_DIR = $(ROOT_DIR)/src/grpc/udp_data_simulator
LOG_DIR = $(ROOT_DIR)/logs/
SRC_DIR = $(ROOT_DIR)/src/grpc
LIB_DIR = $(ROOT_DIR)/src/grpc/lib
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
PLATFORM = linux
else
PLATFORM = mac
endif
BIN_DIR = $(ROOT_DIR)/bin/$(PLATFORM)
all: libs server client mgd_server test udp_data_simulator
server: libs
cd $(SERVER_DIR); make
client: libs
cd $(CLIENT_DIR); make
mgd_server: libs
cd $(MGD_DIR); make
test: client server libs
cd $(TEST_DIR); make
udp_data_simulator: libs
cd $(UDP_DATA_SIMULATOR_DIR); make
libs:
cd $(SRC_DIR)/lib-protos; make
cd $(SRC_DIR)/lib-rpc-service; make
cd $(SRC_DIR)/lib-oc; make
cd $(SRC_DIR)/lib-inih; make
clean-logs:
cd $(LOG_DIR); rm *; touch test
clean:
cd $(SERVER_DIR); make clean
cd $(CLIENT_DIR); make clean
cd $(MGD_DIR); make clean
cd $(TEST_DIR); make clean
cd $(UDP_DATA_SIMULATOR_DIR); make clean
cd $(LIB_DIR); rm *.a
cd $(BIN_DIR); rm -f agent*; rm -f mgd*; rm -f udp_data_*