在debian下 aptitude install ccache 安装后,
在编译时,只要设置PATH环境变量,就可以启用 ccache 加快编译速度
一般程序编译脚本:
!/bin/bash
export PATH="/usr/lib/ccache:$PATH"
#export MAKEFLAGES="-j3 "
#export CFLAGE=" -march=loongson2f -mtune=loongson2f"
export MAKEFLAGS="CROSS_COMPILE= "
dpkg-buildpackage -rfakeroot
内核编译脚本
#!/bin/sh
export PATH="/usr/lib/ccache:$PATH"
#apt-get install debhelper kernel-package libncurses5-dev fakeroot
export MAKEFLAGS="CROSS_COMPILE= "
#make menuconfig
#export CFLAGE=" -march=loongson2f -mtune=loongson2f"
#make-kpkg clean
fakeroot make-kpkg --append_to_version -loongson --initrd \
--revision=2.6.25.2 kernel_image
#kernel_image kernel_headers linux-source
用apt-get 安装编译需要的dev包:
apt-get build-dep xxxxx