Makefile revision 204315
1# $FreeBSD: head/sys/boot/powerpc/uboot/Makefile 204315 2010-02-25 15:21:37Z raj $ 2 3PROG= ubldr 4NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} 5BINDIR?= /boot 6INSTALLFLAGS= -b 7NO_MAN= 8 9# Architecture-specific loader code 10SRCS= start.S conf.c vers.c 11 12LOADER_DISK_SUPPORT?= yes 13LOADER_UFS_SUPPORT?= yes 14LOADER_CD9660_SUPPORT?= no 15LOADER_EXT2FS_SUPPORT?= no 16LOADER_NET_SUPPORT?= yes 17LOADER_NFS_SUPPORT?= yes 18LOADER_TFTP_SUPPORT?= no 19LOADER_GZIP_SUPPORT?= no 20LOADER_BZIP2_SUPPORT?= no 21 22.if ${LOADER_DISK_SUPPORT} == "yes" 23CFLAGS+= -DLOADER_DISK_SUPPORT 24.endif 25.if ${LOADER_UFS_SUPPORT} == "yes" 26CFLAGS+= -DLOADER_UFS_SUPPORT 27.endif 28.if ${LOADER_CD9660_SUPPORT} == "yes" 29CFLAGS+= -DLOADER_CD9660_SUPPORT 30.endif 31.if ${LOADER_EXT2FS_SUPPORT} == "yes" 32CFLAGS+= -DLOADER_EXT2FS_SUPPORT 33.endif 34.if ${LOADER_GZIP_SUPPORT} == "yes" 35CFLAGS+= -DLOADER_GZIP_SUPPORT 36.endif 37.if ${LOADER_BZIP2_SUPPORT} == "yes" 38CFLAGS+= -DLOADER_BZIP2_SUPPORT 39.endif 40.if ${LOADER_NET_SUPPORT} == "yes" 41CFLAGS+= -DLOADER_NET_SUPPORT 42.endif 43.if ${LOADER_NFS_SUPPORT} == "yes" 44CFLAGS+= -DLOADER_NFS_SUPPORT 45.endif 46.if ${LOADER_TFTP_SUPPORT} == "yes" 47CFLAGS+= -DLOADER_TFTP_SUPPORT 48.endif 49 50.if !defined(NO_FORTH) 51# Enable BootForth 52BOOT_FORTH= yes 53CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc 54LIBFICL= ${.OBJDIR}/../../ficl/libficl.a 55.endif 56 57# Always add MI sources 58.PATH: ${.CURDIR}/../../common 59.include "${.CURDIR}/../../common/Makefile.inc" 60CFLAGS+= -I${.CURDIR}/../../common 61CFLAGS+= -I. 62 63CLEANFILES+= vers.c ${PROG}.help 64 65CFLAGS+= -ffreestanding 66 67LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc 68 69# Pull in common loader code 70.PATH: ${.CURDIR}/../../uboot/common 71.include "${.CURDIR}/../../uboot/common/Makefile.inc" 72CFLAGS+= -I${.CURDIR}/../../uboot/common 73 74# U-Boot standalone support library 75LIBUBOOT= ${.OBJDIR}/../../uboot/lib/libuboot.a 76CFLAGS+= -I${.CURDIR}/../../uboot/lib 77CFLAGS+= -I${.OBJDIR}/../../uboot/lib 78 79# where to get libstand from 80CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ 81 82DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBSTAND} 83LDADD= ${LIBFICL} ${LIBUBOOT} -lstand 84 85vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version 86 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 87 88loader.help: help.common help.uboot 89 cat ${.ALLSRC} | \ 90 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} 91 92.PATH: ${.CURDIR}/../../forth 93FILES= loader.help 94 95.include <bsd.prog.mk> 96