mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-30 12:04:07 +00:00
1d199fd358
so as to make the "picobsd" script less version-specific. Improve handling of cross-builds (which requires creation of includes and libraries for the new source tree). The "picobsd" script will not probably work on -current because it still uses 'vn' instead of 'md', but i am commiting it anyways to keep it in sync with the version in -stable.
46 lines
1.4 KiB
Makefile
46 lines
1.4 KiB
Makefile
# $FreeBSD$
|
|
#
|
|
# Makefile for building PICOBSD kernels and running crunchgen
|
|
#
|
|
# Needs SRC pointing to the source tree,
|
|
# MY_TREE ponting to my tree
|
|
# BUILDDIR pointing to the build directory
|
|
# PICO_OBJ pointing to the object directory
|
|
# When building a kernel, also need ${name} from the environment
|
|
# and CONFIG may indicate an alternate config program
|
|
|
|
SRC?=/usr/src
|
|
CONF?=${SRC}/sys/i386/conf
|
|
CONFIG?=config
|
|
|
|
CONFFILE=PICOBSD-${name}
|
|
COMPILE=${CONF}/../compile/${CONFFILE}
|
|
KERNFILE=${COMPILE}/kernel
|
|
|
|
${BUILDDIR}/kernel: ${KERNFILE}
|
|
cp -p ${.OODATE} ${.TARGET}
|
|
strip ${.TARGET}
|
|
strip --remove-section=.note --remove-section=.comment ${.TARGET}
|
|
|
|
${KERNFILE}: ${COMPILE} do_a_make_in_the_kernel_directory_anyways
|
|
|
|
do_a_make_in_the_kernel_directory_anyways:
|
|
(cd ${COMPILE}; make KERNEL=kernel -DNO_MODULES)
|
|
|
|
${COMPILE}: ${CONF}/${CONFFILE}
|
|
(cd ${CONF}; ${CONFIG} ${CONFFILE}; \
|
|
cd ${COMPILE}; make KERNEL=kernel -DNO_MODULES depend )
|
|
|
|
${CONF}/${CONFFILE}: PICOBSD
|
|
cp ${.OODATE} ${.TARGET}
|
|
if [ -f PICOBSD.hints ] ; then cp PICOBSD.hints ${CONF}/PICOBSD.hints ; fi
|
|
|
|
# This part creates crunch1.conf and crunch.mk from crunch.conf
|
|
${BUILDDIR}/crunch.mk: ${BUILDDIR}/crunch1.conf
|
|
-(cd ${BUILDDIR}/crunch ; \
|
|
crunchgen -p ${PICO_OBJ} -o -m ${.TARGET} ${.OODATE} )
|
|
|
|
${BUILDDIR}/crunch1.conf: ${MY_TREE}/crunch.conf
|
|
(cd ${BUILDDIR}/crunch ; cat ${.OODATE} | \
|
|
sed -e "s@/usr/src@${SRC}@" -e "s@CWD@${MY_TREE}@" > ${.TARGET} )
|