Makefile revision 183878
1235368Sgnn# $FreeBSD: head/sys/boot/arm/uboot/Makefile 183878 2008-10-14 10:11:14Z raj $ 2235368Sgnn 3235368SgnnPROG= ubldr 4235368SgnnNEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} 5235368SgnnBINDIR?= /boot 6235368SgnnINSTALLFLAGS= -b 7235368SgnnNO_MAN= 8235368SgnnWARNS?= 1 9235368Sgnn 10235368Sgnn# Architecture-specific loader code 11235368SgnnSRCS= start.S conf.c vers.c 12235368Sgnn 13235368SgnnLOADER_DISK_SUPPORT?= no 14235368SgnnLOADER_UFS_SUPPORT?= no 15235368SgnnLOADER_CD9660_SUPPORT?= no 16235368SgnnLOADER_EXT2FS_SUPPORT?= no 17235368SgnnLOADER_NET_SUPPORT?= yes 18235368SgnnLOADER_NFS_SUPPORT?= yes 19235368SgnnLOADER_TFTP_SUPPORT?= no 20235368SgnnLOADER_GZIP_SUPPORT?= no 21235368SgnnLOADER_BZIP2_SUPPORT?= no 22235368Sgnn 23235368Sgnn.if ${LOADER_DISK_SUPPORT} == "yes" 24235368SgnnCFLAGS+= -DLOADER_DISK_SUPPORT 25235368Sgnn.endif 26235368Sgnn.if ${LOADER_UFS_SUPPORT} == "yes" 27235368SgnnCFLAGS+= -DLOADER_UFS_SUPPORT 28235368Sgnn.endif 29235368Sgnn.if ${LOADER_CD9660_SUPPORT} == "yes" 30235368SgnnCFLAGS+= -DLOADER_CD9660_SUPPORT 31235368Sgnn.endif 32235368Sgnn.if ${LOADER_EXT2FS_SUPPORT} == "yes" 33235368SgnnCFLAGS+= -DLOADER_EXT2FS_SUPPORT 34235368Sgnn.endif 35235368Sgnn.if ${LOADER_GZIP_SUPPORT} == "yes" 36235368SgnnCFLAGS+= -DLOADER_GZIP_SUPPORT 37235368Sgnn.endif 38235368Sgnn.if ${LOADER_BZIP2_SUPPORT} == "yes" 39235368SgnnCFLAGS+= -DLOADER_BZIP2_SUPPORT 40235368Sgnn.endif 41235368Sgnn.if ${LOADER_NET_SUPPORT} == "yes" 42235368SgnnCFLAGS+= -DLOADER_NET_SUPPORT 43235368Sgnn.endif 44235368Sgnn.if ${LOADER_NFS_SUPPORT} == "yes" 45235368SgnnCFLAGS+= -DLOADER_NFS_SUPPORT 46235368Sgnn.endif 47235368Sgnn.if ${LOADER_TFTP_SUPPORT} == "yes" 48235368SgnnCFLAGS+= -DLOADER_TFTP_SUPPORT 49235368Sgnn.endif 50235368Sgnn 51235368Sgnn.if !defined(NO_FORTH) 52235368Sgnn# Enable BootForth 53235368SgnnBOOT_FORTH= yes 54235368SgnnCFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/arm 55235368SgnnLIBFICL= ${.OBJDIR}/../../ficl/libficl.a 56235368Sgnn.endif 57235368Sgnn 58235368Sgnn# Always add MI sources 59235368Sgnn.PATH: ${.CURDIR}/../../common 60235368Sgnn.include "${.CURDIR}/../../common/Makefile.inc" 61235368SgnnCFLAGS+= -I${.CURDIR}/../../common 62235368SgnnCFLAGS+= -I. 63235368Sgnn 64235368SgnnCLEANFILES+= vers.c ${PROG}.help 65235368Sgnn 66235368SgnnCFLAGS+= -ffreestanding 67235368Sgnn 68235368SgnnLDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.arm 69235368Sgnn 70235368Sgnn# Pull in common loader code 71235368Sgnn.PATH: ${.CURDIR}/../../uboot/common 72235368Sgnn.include "${.CURDIR}/../../uboot/common/Makefile.inc" 73235368SgnnCFLAGS+= -I${.CURDIR}/../../uboot/common 74235368Sgnn 75235368Sgnn# U-Boot standalone support library 76235368SgnnLIBUBOOT= ${.OBJDIR}/../../uboot/lib/libuboot.a 77235368SgnnCFLAGS+= -I${.CURDIR}/../../uboot/lib 78235368SgnnCFLAGS+= -I${.OBJDIR}/../../uboot/lib 79235368Sgnn 80235368Sgnn# where to get libstand from 81235368SgnnCFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ 82235368Sgnn 83235368SgnnDPADD= ${LIBFICL} ${LIBUBOOT} ${LIBSTAND} 84235368SgnnLDADD= ${LIBFICL} ${LIBUBOOT} -lstand 85235368Sgnn 86235368Sgnnvers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version 87235368Sgnn sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 88235368Sgnn 89235368Sgnn${PROG}.help: help.common help.uboot 90235368Sgnn cat ${.ALLSRC} | \ 91235368Sgnn awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} 92235368Sgnn 93235368Sgnn.PATH: ${.CURDIR}/../../forth 94235368SgnnFILES= ${PROG}.help 95235368Sgnn 96235368Sgnn.include <bsd.prog.mk> 97235368Sgnn