-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
36 lines (24 loc) · 752 Bytes
/
makefile
File metadata and controls
36 lines (24 loc) · 752 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
SRCS = $(wildcard ./base/*.cpp ./common/*.cpp ./pb/*.cpp ./raft/*.cpp)
OBJS = $(patsubst %.cpp, %.o, $(SRCS))
CC = g++
INCLUDES = -I. \
-I./base \
-I./pb \
-I./raft \
-I./common \
-I./include \
-I./interface \
-I./third \
-I./third/CppNet \
-I./third/protobuf \
#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 = libraft.a
all:$(TARGET)
$(TARGET):$(OBJS)
ar rcs $@ $^
%.o : %.cpp
$(CC) -c $< -o $@ $(CCFLAGS) $(INCLUDES)
clean:
rm -rf $(OBJS) $(TARGET) $(SERBIN) $(CLIBIN)