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 bootinfo.c \ 24 conf.c \ 25 crt1.c \ 26 gfx_fb_stub.c \ 27 host_syscalls.c \ 28 hostcons.c \ 29 hostdisk.c \ 30 hostfs.c \ 31 init.c \ 32 kbootfdt.c \ 33 main.c \ 34 seg.c \ 35 termios.c \ 36 util.c \ 37 vers.c 38 39CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken 40.if ${MK_LOADER_ZFS} != "no" 41CFLAGS+= -I${ZFSSRC} 42CFLAGS+= -I${SYSDIR}/contrib/openzfs/include 43CFLAGS+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs 44HAVE_ZFS=yes 45.endif 46 47HELP_FILENAME= loader.help.kboot 48 49.include "${BOOTSRC}/fdt.mk" 50 51# We share bootinfo.c with efi 52.PATH: ${BOOTSRC}/efi/loader 53 54# Note: Since we're producing a userland binary, we key off of MACHINE_ARCH 55# instead of the more normal MACHINE since the changes between different flavors 56# of MACHINE_ARCH are large enough in Linux that it's easier that way. 57.PATH: ${.CURDIR}/arch/${MACHINE_ARCH} 58.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" 59 60# Always add MI sources 61.include "${BOOTSRC}/loader.mk" 62.PATH: ${SYSDIR}/libkern 63CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} 64 65CFLAGS+= -Wall 66 67DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} 68LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} 69 70.include <bsd.prog.mk> 71