makefile demo

CC = g++
CFLAGS = -std=c++11  -lpthread

INCLUDE= -I ./3rd/

all:  ServerMain.cpp Server.o 
    $(CC) $(CFLAGS) $(INCLUDE) ServerMain.cpp  Server.o -o server
Server.o: Server.cpp Server.h Common.h LogHelper.hpp
    $(CC) $(CFLAGS) $(INCLUDE) -c Server.cpp
clean:
    rm -f *.o server 
posted @ 2020-12-30 14:19  HappyCoder_1  阅读(78)  评论(0编辑  收藏  举报