-
Notifications
You must be signed in to change notification settings - Fork 34
/
makefile
45 lines (35 loc) · 1017 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
41
42
43
44
45
SRCS = $(wildcard ./base/*.cpp \
./common/*.cpp \
./hudp/*.cpp \
./net/*.cpp \
./net/unix/*.cpp \
./net/controller/*.cpp \
./net/controller/bbr/*.cpp \
./os/unix/*.cpp \
./filter/*.cpp)
OBJS = $(patsubst %.cpp, %.o, $(SRCS))
CC = g++
OUTPUT = output
INCLUDES = -I. \
-I./base \
-I./net \
-I./net/unix \
-I./common \
-I./hudp \
-I./include \
-I./os/unix \
-I./filter \
-I./interface \
-I./third/snappy \
-I./net/controller \
-I./net/controller/bbr \
# NET_LOSS_TEST add packet loss -D NET_LOSS_TEST
CCFLAGS = -lpthread -fPIC -m64 -std=c++11 -lstdc++ -g
TARGET = libhudp.a
all:$(TARGET)
$(TARGET):$(OBJS)
ar rcs $@ $^
%.o:%.cpp
$(CC) -c $? -o $@ $(CCFLAGS) $(INCLUDES)
clean:
rm -rf $(OBJS) $(TARGET) $(SERBIN) $(CLIBIN)