summaryrefslogtreecommitdiffstats
path: root/targets/pseudo/kernel/Makefile
blob: b619eeb2af2c8bd35ce087eb4dafa52c4682c5d5 (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
# $FreeBSD$

# Build the kernel ${KERNCONF}
KERNCONF?= ${KERNEL:UGENERIC}

TARGET?= ${MACHINE}
# keep this compatible with peoples expectations...
KERN_OBJDIR= ${OBJTOP}/sys/compile/${KERNCONF}
KERN_CONFDIR= ${SRCTOP}/sys/${TARGET}/conf

CONFIG= ${STAGE_HOST_OBJTOP}/usr/sbin/config

${KERNCONF}.config: .MAKE .META
	mkdir -p ${KERN_OBJDIR:H}
	(cd ${KERN_CONFDIR} && \
	${CONFIG} ${CONFIGARGS} -d ${KERN_OBJDIR} ${KERNCONF})
	(cd ${KERN_OBJDIR} && ${.MAKE} depend)
	@touch $@

# we need to pass curdirOk=yes to meta mode, since we want .meta files
# in ${KERN_OBJDIR}
${KERNCONF}.build: .MAKE ${KERNCONF}.config
	(cd ${KERN_OBJDIR} && META_MODE="${.MAKE.MODE} curdirOk=yes" ${.MAKE})

.if ${.MAKE.LEVEL} > 0
all: ${KERNCONF}.build
.endif

UPDATE_DEPENDFILE= no

.include <bsd.prog.mk>
OpenPOWER on IntegriCloud