Me := $(lastword ${MAKEFILE_LIST}) include var.mk KVer = 27.4 Sqlzma34 = sqlzma3.4-457 SqlzmaPath = ftp.slax.org/source/slax/sqlzma Sq34 = ${Sqlzma34}/squashfs3.4 Sq34Patch = ${Sq34}/kernel-patches/linux-2.6.27-rc4/squashfs3.4-patch Sq34KDir = ${Sq34}/kernel-patches/linux-2.6.${KVer} Tgt = ${Sq34}/fs/squashfs/squashfs.ko ${Sq34}/squashfs-tools/mksquashfs all: @echo \- Get linux-2.6.${KVer} and extract it under a dir named ${Linux26} @echo \- Build linux-2.6.${KVer} by \"cd ${Linux26} '&& make &&' make headers_install\" @echo \- Get sqlzma by \"make -f ${Me} download\" @echo \- Extract it by \"make -f ${Me} extract\" @echo \- Build it by \"make -f ${Me} build\" @echo \- Install it by \"make -f ${Me} install\" as superuser clean: ${RM} -r ${Sqlzma34} sqlzma34-extract realclean: clean ${RM} -r ${SqlzmaPath} sqlzma34-download download extract build install: %: sqlzma34-% ######################################## sqlzma34-download: wget --no-verbose -x \ ftp://${SqlzmaPath}/squashfs3.4.tar.gz \ ftp://${SqlzmaPath}/lzma457.tar.bz2 \ ftp://${SqlzmaPath}/sqlzma3.4-457.tar.bz2 touch $@ sqlzma34-extract: sqlzma34-download mkdir -p ${Sq34KDir} ${Sqlzma34}/lzma457 tar -C ${Sqlzma34} -xpzf ${SqlzmaPath}/squashfs3.4.tar.gz tar -C ${Sqlzma34}/lzma457 -xpjf ${SqlzmaPath}/lzma457.tar.bz2 tar -C ${Sqlzma34} -xpjf ${SqlzmaPath}/${Sqlzma34}.tar.bz2 -patch -d ${Sq34KDir} -sf -p1 < ${Sq34Patch} patch -d ${Sqlzma34}/lzma457 -s -p1 < ${Sqlzma34}/sqlzma1-457.patch patch -d ${Sq34KDir} -s -p1 < ${Sqlzma34}/sqlzma2k-3.4.patch patch -d ${Sq34}/squashfs-tools -s -p2 < ${Sqlzma34}/sqlzma2u-3.4.patch touch $@ sqlzma34-build: sqlzma34-extract ${MAKE} -C ${Sqlzma34} KDir=${Linux26} sqlzma34-install: sqlzma34-build for i in ${Sqlzma34}/lzma457/C/Compress/Lzma/kmod \ ${Sq34KDir}/fs/squashfs; \ do ${MAKE} -C ${Linux26} M=${CURDIR}/$${i} modules_install; \ done