1CXXFLAGS = -O0 -g -Wall -I ../.. -pthread 2LDFLAGS = -lpthread -lmuduo -L. 3BASE_SRC = ../../logging/Logging.cc ../../logging/LogStream.cc ../../thread/Thread.cc ../../datetime/Timestamp.cc 4MUDUO_SRC = $(notdir $(LIB_SRC) $(BASE_SRC)) 5OBJS = $(patsubst %.cc,%.o,$(MUDUO_SRC)) 6 7libmuduo.a: $(BASE_SRC) $(LIB_SRC) 8 g++ $(CXXFLAGS) -c $^ 9 ar rcs $@ $(OBJS) 10 11$(BINARIES): libmuduo.a 12 g++ $(CXXFLAGS) -o $@ $(filter %.cc,$^) $(LDFLAGS) 13 14clean: 15 rm -f $(BINARIES) *.o *.a core 16 17