Makefile revision 204129
1# $FreeBSD: head/sys/boot/powerpc/ofw/Makefile 204129 2010-02-20 16:28:37Z nwhitehorn $ 2 3.include <bsd.own.mk> 4MK_SSP= no 5 6PROG= loader 7NEWVERSWHAT= "Open Firmware loader" ${MACHINE_ARCH} 8BINDIR?= /boot 9INSTALLFLAGS= -b 10 11# Architecture-specific loader code 12SRCS= conf.c metadata.c vers.c start.c 13 14LOADER_DISK_SUPPORT?= yes 15LOADER_UFS_SUPPORT?= yes 16LOADER_CD9660_SUPPORT?= yes 17LOADER_EXT2FS_SUPPORT?= no 18LOADER_NET_SUPPORT?= yes 19LOADER_NFS_SUPPORT?= yes 20LOADER_TFTP_SUPPORT?= no 21LOADER_GZIP_SUPPORT?= yes 22LOADER_BZIP2_SUPPORT?= no 23 24.if ${LOADER_DISK_SUPPORT} == "yes" 25CFLAGS+= -DLOADER_DISK_SUPPORT 26.endif 27.if ${LOADER_UFS_SUPPORT} == "yes" 28CFLAGS+= -DLOADER_UFS_SUPPORT 29.endif 30.if ${LOADER_CD9660_SUPPORT} == "yes" 31CFLAGS+= -DLOADER_CD9660_SUPPORT 32.endif 33.if ${LOADER_EXT2FS_SUPPORT} == "yes" 34CFLAGS+= -DLOADER_EXT2FS_SUPPORT 35.endif 36.if ${LOADER_GZIP_SUPPORT} == "yes" 37CFLAGS+= -DLOADER_GZIP_SUPPORT 38.endif 39.if ${LOADER_BZIP2_SUPPORT} == "yes" 40CFLAGS+= -DLOADER_BZIP2_SUPPORT 41.endif 42.if ${LOADER_NET_SUPPORT} == "yes" 43CFLAGS+= -DLOADER_NET_SUPPORT 44.endif 45.if ${LOADER_NFS_SUPPORT} == "yes" 46CFLAGS+= -DLOADER_NFS_SUPPORT 47.endif 48.if ${LOADER_TFTP_SUPPORT} == "yes" 49CFLAGS+= -DLOADER_TFTP_SUPPORT 50.endif 51 52.if ${MK_FORTH} != "no" 53# Enable BootForth 54BOOT_FORTH= yes 55CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc 56LIBFICL= ${.OBJDIR}/../../ficl/libficl.a 57.endif 58 59# Avoid the open-close-dance for every file access as some firmwares perform 60# an auto-negotiation on every open of the network interface and thus causes 61# netbooting to take horribly long. 62CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE 63 64# Always add MI sources 65.PATH: ${.CURDIR}/../../common 66.include "${.CURDIR}/../../common/Makefile.inc" 67CFLAGS+= -I${.CURDIR}/../../common 68CFLAGS+= -I. 69 70CLEANFILES+= vers.c loader.help 71 72CFLAGS+= -ffreestanding -msoft-float 73# load address. set in linker script 74RELOC?= 0x1C00000 75CFLAGS+= -DRELOC=${RELOC} 76 77LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc 78 79# 64-bit bridge extensions 80CFLAGS+= -Wa,-mppc64bridge 81 82# Pull in common loader code 83.PATH: ${.CURDIR}/../../ofw/common 84.include "${.CURDIR}/../../ofw/common/Makefile.inc" 85 86# Open Firmware standalone support library 87LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a 88CFLAGS+= -I${.CURDIR}/../../ofw/libofw 89 90# where to get libstand from 91CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ 92 93DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} 94LDADD= ${LIBFICL} ${LIBOFW} -lstand 95 96vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version 97 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 98 99loader.help: help.common help.ofw 100 cat ${.ALLSRC} | \ 101 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} 102 103.PATH: ${.CURDIR}/../../forth 104FILES= loader.help loader.4th support.4th loader.conf 105FILESDIR_loader.conf= /boot/defaults 106 107.if !exists(${DESTDIR}/boot/loader.rc) 108FILES+= loader.rc 109.endif 110 111.include <bsd.prog.mk> 112