# $FreeWRT$ #- # This file is part of the FreeWRT project. FreeWRT is copyrighted # material, please see the LICENCE file in the top-level directory # or at http://www.freewrt.org/licence for details. TOPDIR= ${.CURDIR} PWD= ${.CURDIR} USER_ID!= id -u .if defined(package) && !empty(package) subdir:= package/${package} .endif .if ${USER_ID} == 0 ${.TARGETS}: _nixda _nixda: @echo Do not build as root! It causes problems. @exit 1 .elif defined(subdir) && !empty(subdir) _subdir:= ${.TARGETS} ${.TARGETS}: _subdir _subdir: cd ${.CURDIR}/${subdir} && TOPDIR=${.CURDIR} \ ${.CURDIR}/lbin/gmake ${.MFLAGS} ${_subdir} .else . include "${.CURDIR}/Makefile" .endif