xref: /freebsd/stand/kboot/Makefile (revision cbb3ec25236ba72f91cbdf23f8b78b9d1af0cedf)
1
2LOADER_DISK_SUPPORT?=	yes
3LOADER_CD9660_SUPPORT?=	yes
4LOADER_MSDOS_SUPPORT?=	no
5LOADER_EXT2FS_SUPPORT?=	yes
6LOADER_UFS_SUPPORT?=	yes
7LOADER_ZFS_SUPPORT?=	yes
8LOADER_NET_SUPPORT?=	no
9LOADER_NFS_SUPPORT?=	no
10LOADER_TFTP_SUPPORT?=	no
11LOADER_GZIP_SUPPORT?=	no
12LOADER_BZIP2_SUPPORT?=	no
13
14.include <bsd.init.mk>
15
16PROG=		loader.kboot
17NEWVERSWHAT=	"kboot loader" ${MACHINE_ARCH}
18INSTALLFLAGS=	-b
19
20# Architecture-specific loader code
21SRCS=	\
22		bootinfo.c \
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
46HELP_FILENAME=	loader.help.kboot
47
48.include	"${BOOTSRC}/fdt.mk"
49
50# We share bootinfo.c with efi
51.PATH:		${BOOTSRC}/efi/loader
52
53# Note: Since we're producing a userland binary, we key off of MACHINE_ARCH
54# instead of the more normal MACHINE since the changes between different flavors
55# of MACHINE_ARCH are large enough in Linux that it's easier that way.
56.PATH:	${.CURDIR}/arch/${MACHINE_ARCH}
57.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
58
59# Always add MI sources
60.include	"${BOOTSRC}/loader.mk"
61.PATH:		${SYSDIR}/libkern
62CFLAGS+=	-I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH}
63
64CFLAGS+=	-Wall
65
66DPADD=		${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
67LDADD=		${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
68
69.include <bsd.prog.mk>
70