1eab5e07bSShuo ChenCXXFLAGS = -O0 -g  -Wall -I ../.. -pthread
2eab5e07bSShuo ChenLDFLAGS = -lpthread -lmuduo -L.
36c1a608cSShuo ChenBASE_SRC = ../../logging/Logging.cc ../../logging/LogStream.cc ../../thread/Thread.cc ../../datetime/Timestamp.cc
4566406ccSShuo ChenMUDUO_SRC = $(notdir $(LIB_SRC) $(BASE_SRC))
5566406ccSShuo ChenOBJS = $(patsubst %.cc,%.o,$(MUDUO_SRC))
6eab5e07bSShuo Chen
7eab5e07bSShuo Chenlibmuduo.a: $(BASE_SRC) $(LIB_SRC)
8eab5e07bSShuo Chen	g++ $(CXXFLAGS) -c $^
9566406ccSShuo Chen	ar rcs $@ $(OBJS)
10eab5e07bSShuo Chen
11eab5e07bSShuo Chen$(BINARIES): libmuduo.a
12eab5e07bSShuo Chen	g++ $(CXXFLAGS) -o $@ $(filter %.cc,$^) $(LDFLAGS)
13eab5e07bSShuo Chen
14eab5e07bSShuo Chenclean:
15eab5e07bSShuo Chen	rm -f $(BINARIES) *.o *.a core
16eab5e07bSShuo Chen
17