DIR_INC = ./inc
DIR_OBJ = ./obj
DIR_GA = ./gas_analysis
DIR_DAQ = ./stm32_daq
DIR_UTIL = ./util
DIR_YD = ./YD516P
DIR_HEADER = -I${DIR_INC} -I${DIR_GA}
SRC = ${wildcard ${DIR_GA}/*.cpp} \
${wildcard ${DIR_DAQ}/*.cpp} \
${wildcard ${DIR_UTIL}/*.cpp} \
${wildcard ${DIR_YD}/*.cpp}
OBJ = ${patsubst %.cpp, %.o, ${SRC}}
TARGET=main
CC=g++
CXXFLAGS=-g -Wall ${DIR_HEADER}
${TARGET}:${OBJ}
$(CC) $(OBJ) -o $@
#${OBJ}: ${SRC}
# ${CC} ${CXXFLAGS} -c $?
clean:
rm -f ${OBJ}
rm -f *.o
rm -f *~
rm -f ${TARGET}
echo "Clean done."
阅读(1114) | 评论(0) | 转发(0) |