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 47.include "${BOOTSRC}/fdt.mk" 48 49# We share bootinfo.c with efi 50.PATH: ${BOOTSRC}/efi/loader 51 52# Note: Since we're producing a userland binary, we key off of MACHINE_ARCH 53# instead of the more normal MACHINE since the changes between different flavors 54# of MACHINE_ARCH are large enough in Linux that it's easier that way. 55.PATH: ${.CURDIR}/arch/${MACHINE_ARCH} 56.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" 57 58# Always add MI sources 59.include "${BOOTSRC}/loader.mk" 60.PATH: ${SYSDIR}/libkern 61CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} 62 63CFLAGS+= -Wall 64 65DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} 66LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} 67 68.include <bsd.prog.mk> 69