一个源文件:
#因为有多线程,所以后面添加了-lpthread
Test:Test.c
gcc -g Test.c -o Test -lpthread
多个文件:
all:Server Client
Server:Server.cpp
g++ -g Server.cpp -o Server
Client:Client.cpp
g++ -g Client.cpp -o Client
一个最基本的makefile,包括3个头文件,4个源文件
PosServer:main.o PosServer