xref: /freebsd/targets/pseudo/kernel/Makefile (revision 7d8f797b725e3efc0a4256554654780df83c456c)
1# $FreeBSD$
2
3# Build the kernel ${KERNCONF}
4KERNCONF?= ${KERNEL:UGENERIC}
5
6TARGET?= ${MACHINE}
7# keep this compatible with peoples expectations...
8KERN_OBJDIR= ${OBJTOP}/sys/compile/${KERNCONF}
9KERN_CONFDIR= ${SRCTOP}/sys/${TARGET}/conf
10
11CONFIG= ${STAGE_HOST_OBJTOP}/usr/sbin/config
12
13${KERNCONF}.config: .MAKE .META
14	mkdir -p ${KERN_OBJDIR:H}
15	(cd ${KERN_CONFDIR} && \
16	${CONFIG} ${CONFIGARGS} -d ${KERN_OBJDIR} ${KERNCONF})
17	(cd ${KERN_OBJDIR} && ${.MAKE} depend)
18	@touch $@
19
20# we need to pass curdirOk=yes to meta mode, since we want .meta files
21# in ${KERN_OBJDIR}
22${KERNCONF}.build: .MAKE ${KERNCONF}.config
23	(cd ${KERN_OBJDIR} && META_MODE="${.MAKE.MODE} curdirOk=yes" ${.MAKE})
24
25.if ${.MAKE.LEVEL} > 0
26all: ${KERNCONF}.build
27.endif
28
29UPDATE_DEPENDFILE= no
30
31.include <bsd.prog.mk>
32