微型项目makefile写法
作者:互联网
微型项目makefile万能写法
TAR=bin/tcpserver
CC=gcc
CXX=g++
INCLUDE_PATH=-I ./include
LIBS_PATH=-L /usr/lib/aarch64-linux-gnu
LIBS=-lsqlite
SRC_C_PATH=$(wildcard src/*.c)
SRC_CXX_PATH=$(wildcard ./src/*.c*)
CXX_CFLAG=-std=c++11 -g -Wall
CFLAGS=-std=c99 -g -Wall
RM=rm -rf
$(TAR):$(SRC_C_PATH)
gcc $(SRC_C_PATH) -L /usr/lib/aarch64-linux-gnu tcpserver -o -lsqlite
clean:
$(RM) ./bin/*
# cleanall:
# rm -f $(OBJ) $(TAR)
install:
cp ./include/*.h* /usr/include
cp $(TAR) /usr/bin
标签:bin,SRC,微型,TAR,makefile,usr,PATH,include,写法 来源: https://www.cnblogs.com/zhaodejin/p/16319352.html