(1) 中文支持
#
# gcov support and Chinese support
# if CTYPE is GBK, g++ can compile Chinese, or need native2ascii or iconv
#
cc = /usr/bin/gcc
link = /usr/bin/g++
cflag = -g -Wall -Wextra -fextended-identifiers
covflag = -fprofile-arcs -ftest-coverage
all:
foo.o:foo.cpp
trap "mv -f $^_gbk $^" SIGINT && cp -f $^ $^_gbk && \
(( native2ascii $^ $^ && sed -i -r 's/(uff0c|u3001)/_/g' $^ ) || echo 2) && \
($(cc) $(cflag) $(covflag) $(cDEFS) $(cInc) -c $^ -o $@ || \
if [ 0 -ne $$? ];then mv -f $^_gbk $^;exit 1; fi) && \
mv -f $^_gbk $^ && touch $@
(2) -MM 生成依赖关系
(3) .i .s .o 与 -E -S -c
阅读(866) | 评论(0) | 转发(0) |