Makefile.conf revision 82917
1259117Shrs# $FreeBSD: head/release/picobsd/build/Makefile.conf 82917 2001-09-04 02:01:52Z luigi $ 2259117Shrs# 326206Swpaul# Makefile for building PICOBSD kernels and running crunchgen 4259117Shrs# 5259117Shrs# Needs SRC pointing to the source tree, 6259117Shrs# MY_TREE ponting to my tree 726206Swpaul# BUILDDIR pointing to the build directory 8259117Shrs# PICO_OBJ pointing to the object directory 9259117Shrs# When building a kernel, also need ${name} from the environment 10259117Shrs# and CONFIG may indicate an alternate config program 11259117Shrs 12259117ShrsSRC?=/usr/src 13259117ShrsCONF?=${SRC}/sys/i386/conf 14259117ShrsCONFIG?=config 15259117Shrs 16259117ShrsCONFFILE=PICOBSD-${name} 1726206SwpaulCOMPILE=${CONF}/../compile/${CONFFILE} 18259117ShrsKERNFILE=${COMPILE}/kernel 19259117Shrs 20259117Shrs${BUILDDIR}/kernel: ${KERNFILE} 21259117Shrs cp -p ${.OODATE} ${.TARGET} 22259117Shrs strip ${.TARGET} 23259117Shrs strip --remove-section=.note --remove-section=.comment ${.TARGET} 24259117Shrs 25259117Shrs${KERNFILE}: ${COMPILE} do_a_make_in_the_kernel_directory_anyways 26259117Shrs 27259117Shrsdo_a_make_in_the_kernel_directory_anyways: 28259117Shrs (cd ${COMPILE}; make KERNEL=kernel -DNO_MODULES) 29259117Shrs 3026206Swpaul${COMPILE}: ${CONF}/${CONFFILE} 3126206Swpaul (cd ${CONF}; ${CONFIG} ${CONFFILE}; \ 3226206Swpaul cd ${COMPILE}; make KERNEL=kernel -DNO_MODULES depend ) 3326206Swpaul 3426206Swpaul${CONF}/${CONFFILE}: PICOBSD 3526206Swpaul cp ${.OODATE} ${.TARGET} 3626206Swpaul if [ -f PICOBSD.hints ] ; then cp PICOBSD.hints ${CONF}/PICOBSD.hints ; fi 3726206Swpaul 3826206Swpaul# This part creates crunch1.conf and crunch.mk from crunch.conf 39259117Shrs${BUILDDIR}/crunch.mk: ${BUILDDIR}/crunch1.conf 4026206Swpaul -(cd ${BUILDDIR}/crunch ; \ 4126206Swpaul crunchgen -p ${PICO_OBJ} -o -m ${.TARGET} ${.OODATE} ) 4226206Swpaul 4326206Swpaul${BUILDDIR}/crunch1.conf: ${MY_TREE}/crunch.conf 4426206Swpaul (cd ${BUILDDIR}/crunch ; cat ${.OODATE} | \ 4526206Swpaul sed -e "s@/usr/src@${SRC}@" -e "s@CWD@${MY_TREE}@" > ${.TARGET} ) 4626206Swpaul