Makefile revision 235537
1183878Sraj# $FreeBSD: head/sys/boot/arm/uboot/Makefile 235537 2012-05-17 10:11:18Z gber $ 2183878Sraj 3209125Sraj.include <bsd.own.mk> 4209125Sraj 5183878SrajPROG= ubldr 6183878SrajNEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} 7183878SrajBINDIR?= /boot 8183878SrajINSTALLFLAGS= -b 9183878SrajWARNS?= 1 10183878Sraj 11183878Sraj# Architecture-specific loader code 12183878SrajSRCS= start.S conf.c vers.c 13183878Sraj 14185099SrajLOADER_DISK_SUPPORT?= yes 15185099SrajLOADER_UFS_SUPPORT?= yes 16183878SrajLOADER_CD9660_SUPPORT?= no 17183878SrajLOADER_EXT2FS_SUPPORT?= no 18235537Sgber.if ${MK_NAND} != "no" 19235537SgberLOADER_NANDFS_SUPPORT?= yes 20235537Sgber.else 21235537SgberLOADER_NANDFS_SUPPORT?= no 22235537Sgber.endif 23183878SrajLOADER_NET_SUPPORT?= yes 24183878SrajLOADER_NFS_SUPPORT?= yes 25183878SrajLOADER_TFTP_SUPPORT?= no 26183878SrajLOADER_GZIP_SUPPORT?= no 27183878SrajLOADER_BZIP2_SUPPORT?= no 28209125Sraj.if ${MK_FDT} != "no" 29208538SrajLOADER_FDT_SUPPORT= yes 30208538Sraj.else 31208538SrajLOADER_FDT_SUPPORT= no 32208538Sraj.endif 33183878Sraj 34183878Sraj.if ${LOADER_DISK_SUPPORT} == "yes" 35183878SrajCFLAGS+= -DLOADER_DISK_SUPPORT 36183878Sraj.endif 37183878Sraj.if ${LOADER_UFS_SUPPORT} == "yes" 38183878SrajCFLAGS+= -DLOADER_UFS_SUPPORT 39183878Sraj.endif 40183878Sraj.if ${LOADER_CD9660_SUPPORT} == "yes" 41183878SrajCFLAGS+= -DLOADER_CD9660_SUPPORT 42183878Sraj.endif 43183878Sraj.if ${LOADER_EXT2FS_SUPPORT} == "yes" 44183878SrajCFLAGS+= -DLOADER_EXT2FS_SUPPORT 45183878Sraj.endif 46235537Sgber.if ${LOADER_NANDFS_SUPPORT} == "yes" 47235537SgberCFLAGS+= -DLOADER_NANDFS_SUPPORT 48235537Sgber.endif 49183878Sraj.if ${LOADER_GZIP_SUPPORT} == "yes" 50183878SrajCFLAGS+= -DLOADER_GZIP_SUPPORT 51183878Sraj.endif 52183878Sraj.if ${LOADER_BZIP2_SUPPORT} == "yes" 53183878SrajCFLAGS+= -DLOADER_BZIP2_SUPPORT 54183878Sraj.endif 55183878Sraj.if ${LOADER_NET_SUPPORT} == "yes" 56183878SrajCFLAGS+= -DLOADER_NET_SUPPORT 57183878Sraj.endif 58183878Sraj.if ${LOADER_NFS_SUPPORT} == "yes" 59183878SrajCFLAGS+= -DLOADER_NFS_SUPPORT 60183878Sraj.endif 61183878Sraj.if ${LOADER_TFTP_SUPPORT} == "yes" 62183878SrajCFLAGS+= -DLOADER_TFTP_SUPPORT 63183878Sraj.endif 64208538Sraj.if ${LOADER_FDT_SUPPORT} == "yes" 65208538SrajCFLAGS+= -I${.CURDIR}/../../fdt 66208538SrajCFLAGS+= -I${.OBJDIR}/../../fdt 67208538SrajCFLAGS+= -DLOADER_FDT_SUPPORT 68208538SrajLIBFDT= ${.OBJDIR}/../../fdt/libfdt.a 69208538Sraj.endif 70183878Sraj 71183878Sraj.if !defined(NO_FORTH) 72183878Sraj# Enable BootForth 73183878SrajBOOT_FORTH= yes 74183878SrajCFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/arm 75183878SrajLIBFICL= ${.OBJDIR}/../../ficl/libficl.a 76183878Sraj.endif 77183878Sraj 78183878Sraj# Always add MI sources 79183878Sraj.PATH: ${.CURDIR}/../../common 80183878Sraj.include "${.CURDIR}/../../common/Makefile.inc" 81183878SrajCFLAGS+= -I${.CURDIR}/../../common 82183878SrajCFLAGS+= -I. 83183878Sraj 84185375SrajCLEANFILES+= vers.c loader.help 85183878Sraj 86183878SrajCFLAGS+= -ffreestanding 87183878Sraj 88211676SimpLDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH} 89183878Sraj 90183878Sraj# Pull in common loader code 91183878Sraj.PATH: ${.CURDIR}/../../uboot/common 92183878Sraj.include "${.CURDIR}/../../uboot/common/Makefile.inc" 93183878SrajCFLAGS+= -I${.CURDIR}/../../uboot/common 94183878Sraj 95183878Sraj# U-Boot standalone support library 96183878SrajLIBUBOOT= ${.OBJDIR}/../../uboot/lib/libuboot.a 97183878SrajCFLAGS+= -I${.CURDIR}/../../uboot/lib 98183878SrajCFLAGS+= -I${.OBJDIR}/../../uboot/lib 99183878Sraj 100183878Sraj# where to get libstand from 101183878SrajCFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ 102183878Sraj 103208538SrajDPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND} 104208538SrajLDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} -lstand 105183878Sraj 106183878Srajvers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version 107183878Sraj sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 108183878Sraj 109185375Srajloader.help: help.common help.uboot 110183878Sraj cat ${.ALLSRC} | \ 111183878Sraj awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} 112183878Sraj 113183878Sraj.PATH: ${.CURDIR}/../../forth 114185375SrajFILES= loader.help 115183878Sraj 116183878Sraj.include <bsd.prog.mk> 117