-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
54 lines (45 loc) · 1.39 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
53
54
###########################################
#Makefile for simple programs
#export LD_LIBRARY_PATH=/home/zwd/codes/libs/boost/lib/
#g++ -I
###########################################
.PHONY:clean
.DEFAULT: pdfs
CXX := clang
INC := -I.#/third_party/boost/include/
LDFLAGS := -L./thirdparty/lib/
LDLIBS := -lstdc++ -lm -ludt#-lboost_system -lboost_filesystem -lboost_serialization -lboost_thread
CXXFLAGS := -Wall -g -std=c++11 -pthread $(INC)
OBJS := ThreadPool.o \
LocalFileSystem.o \
UDPNetwork.o \
TCPNetwork.o \
DuplicationManager.o \
NetworkInterface.o \
UDPNetworkInterface.o \
TCPNetworkInterface.o \
UDPNetworkHandler.o \
TCPNetworkHandler.o \
SClusterHandler.o \
ClusterHandler.o \
BroadcastHandler.o \
Redistribution.o \
Cluster.o
all: pdfs
pdfs: $(OBJS)
$(CXX) $(CXXFLAGS) [email protected] -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
pdfsc: $(OBJS)
$(CXX) $(CXXFLAGS) [email protected] -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
push: $(OBJS)
clang -g -std=c++11 -lstdc++ -lpthread [email protected] -o $@ $^ $(LDLIBS)
pull: $(OBJS)
clang -g -std=c++11 -lstdc++ -lpthread [email protected] -o $@ $^ $(LDLIBS)
Benchmark: $(OBJS)
clang -g -std=c++11 -lstdc++ -lpthread [email protected] -o $@ $(OBJS) $(LDLIBS)
# FIXME: dependency info is not enough
%.o: %.cpp %.h
$(CXX) -c $(CXXFLAGS) $< -o $@
# The following region is for clear usage
clean:
@echo "Removing linked and compiled files......"
rm -f $(OBJS) pdfs pdfsc push pull Benchmark