xref: /freebsd/stand/kboot/Makefile (revision 08779e839ac11c410d314ce225e2246ac4d2e8c0)
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		seg.c \
34		termios.c \
35		util.c \
36		vers.c
37
38CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken
39.if ${MK_LOADER_ZFS} != "no"
40CFLAGS+=	-I${ZFSSRC}
41CFLAGS+=        -I${SYSDIR}/contrib/openzfs/include
42CFLAGS+=        -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs
43HAVE_ZFS=yes
44.endif
45
46.include	"${BOOTSRC}/fdt.mk"
47
48# Note: Since we're producing a userland binary, we key off of MACHINE_ARCH
49# instead of the more normal MACHINE since the changes between different flavors
50# of MACHINE_ARCH are large enough in Linux that it's easier that way.
51.PATH:	${.CURDIR}/arch/${MACHINE_ARCH}
52.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
53
54# Always add MI sources
55.include	"${BOOTSRC}/loader.mk"
56.PATH:		${SYSDIR}/libkern
57CFLAGS+=	-I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH}
58
59CFLAGS+=	-Wall
60
61DPADD=		${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
62LDADD=		${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
63
64.include <bsd.prog.mk>
65