Makefile revision 353fb8bf
15f798dd9SShuo ChenMUDUO_BUILD ?= release 25f798dd9SShuo ChenMUDUO_DIRECTORY ?= $(HOME)/build/$(MUDUO_BUILD)-install 35f798dd9SShuo ChenMUDUO_INCLUDE = $(MUDUO_DIRECTORY)/include 45f798dd9SShuo ChenMUDUO_LIBRARY = $(MUDUO_DIRECTORY)/lib 55f798dd9SShuo ChenSRC = ../src 65f798dd9SShuo Chen 75f798dd9SShuo ChenCXXFLAGS = -g -O2 -Wall -Wextra -Werror \ 85f798dd9SShuo Chen -Wno-unused-parameter -Wconversion\ 95f798dd9SShuo Chen -Wold-style-cast -Woverloaded-virtual \ 105f798dd9SShuo Chen -Wpointer-arith -Wshadow -Wwrite-strings \ 115f798dd9SShuo Chen -march=native -rdynamic \ 125f798dd9SShuo Chen -I$(MUDUO_INCLUDE) 135f798dd9SShuo Chen 145f798dd9SShuo ChenLDFLAGS = -L$(MUDUO_LIBRARY) -lmuduo_net -lmuduo_base -lpthread 155f798dd9SShuo Chen 1669ab6119SShuo Chenall: sender merger 175f798dd9SShuo Chen 185f798dd9SShuo Chenclean: 195f798dd9SShuo Chen rm -f sender core 205f798dd9SShuo Chen 215f798dd9SShuo Chensender: sender.cc 225f798dd9SShuo Chen g++ $(CXXFLAGS) -o $@ $^ $(LDFLAGS) 235f798dd9SShuo Chen 2469ab6119SShuo Chenmerger: merger.cc 25353fb8bfSShuo Chen g++ $(CXXFLAGS) -o $@ $^ -lboost_system -lpthread 2669ab6119SShuo Chen 275f798dd9SShuo Chen.PHONY: all clean 28