forked from caozhiyi/CppNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
35 lines (23 loc) · 813 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
SRCS = FuncThread.cpp InfoRouter.cpp ParsePackage.cpp RPCClient.cpp RPCServer.cpp
OBJS = $(patsubst %.cpp, %.o, $(SRCS))
CLI = TestClient.cpp
SER = TestServer.cpp
CC = g++
INCLUDES = -I. \
-I../../base \
-I../../include \
#debug
#CCFLAGS = -lpthread -fPIC -m64 -g -pg -std=c++11 -lstdc++ -pipe
CCFLAGS = -lpthread -fPIC -m64 -O2 -std=c++11 -lstdc++ -pipe -march=corei7
TARGET = ../../libcppnet.a
SERBIN = serrpc
CLIBIN = clirpc
all: $(SERBIN) $(CLIBIN)
$(SERBIN):$(OBJS) $(TARGET) $(SER)
$(CC) $^ -o $@ $(TARGET) $(CCFLAGS) $(INCLUDES)
$(CLIBIN):$(OBJS) $(TARGET) $(CLI)
$(CC) $^ -o $@ $(TARGET) $(CCFLAGS) $(INCLUDES)
%.o : %.cpp
$(CC) -c $< -o $@ $(CCFLAGS) $(INCLUDES)
clean:
rm -rf $(OBJS) $(SERBIN) $(CLIBIN)