blob: dad39641ecf9a4426d99588c35c173ecde4375eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# $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=${SRC}/sys/compile/${CONFFILE}
KERNFILE=${COMPILE}/kernel
${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} -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} )
|