xref: /freebsd/stand/kboot/Makefile (revision 42e37d8caf9da4628734f0c44c989583873b3ae6)
1# $FreeBSD$
2
3LOADER_DISK_SUPPORT?=	yes
4LOADER_CD9660_SUPPORT?=	yes
5LOADER_MSDOS_SUPPORT?=	no
6LOADER_EXT2FS_SUPPORT?=	yes
7LOADER_UFS_SUPPORT?=	yes
8LOADER_ZFS_SUPPORT?=	yes
9LOADER_NET_SUPPORT?=	no
10LOADER_NFS_SUPPORT?=	no
11LOADER_TFTP_SUPPORT?=	no
12LOADER_GZIP_SUPPORT?=	no
13LOADER_BZIP2_SUPPORT?=	no
14
15.include <bsd.init.mk>
16
17PROG=		loader.kboot
18NEWVERSWHAT=	"kboot loader" ${MACHINE_ARCH}
19INSTALLFLAGS=	-b
20
21# Architecture-specific loader code
22SRCS=	\
23		conf.c \
24		crt1.c \
25		gfx_fb_stub.c \
26		host_syscalls.c \
27		hostcons.c \
28		hostdisk.c \
29		hostfs.c \
30		init.c \
31		kbootfdt.c \
32		main.c \
33		termios.c \
34		util.c \
35		vers.c
36
37CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken
38.if ${MK_LOADER_ZFS} != "no"
39CFLAGS+=	-I${ZFSSRC}
40CFLAGS+=        -I${SYSDIR}/contrib/openzfs/include
41CFLAGS+=        -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs
42HAVE_ZFS=yes
43.endif
44
45.include	"${BOOTSRC}/fdt.mk"
46
47# Note: Since we're producing a userland binary, we key off of MACHINE_ARCH
48# instead of the more normal MACHINE since the changes between different flavors
49# of MACHINE_ARCH are large enough in Linux that it's easier that way.
50.PATH:	${.CURDIR}/arch/${MACHINE_ARCH}
51.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
52
53# Always add MI sources
54.include	"${BOOTSRC}/loader.mk"
55.PATH:		${SYSDIR}/libkern
56CFLAGS+=	-I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH}
57
58CFLAGS+=	-Wall
59
60DPADD=		${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
61LDADD=		${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
62
63.include <bsd.prog.mk>
64