Makefile revision 176185
167204Sobrien# $FreeBSD: head/sys/boot/powerpc/ofw/Makefile 176185 2008-02-11 12:30:32Z raj $ 267204Sobrien 3156813Sru.include <bsd.own.mk> 4156813Sru 5125634SgrehanPROG= loader 6174930SmarcelNEWVERSWHAT= "Open Firmware loader" ${MACHINE_ARCH} 767204SobrienBINDIR?= /boot 883368SruINSTALLFLAGS= -b 967204Sobrien 10125634Sgrehan# Architecture-specific loader code 11123375SgrehanSRCS= conf.c metadata.c vers.c start.c 12123375Sgrehan 1368548SbennoLOADER_DISK_SUPPORT?= yes 14123375SgrehanLOADER_UFS_SUPPORT?= yes 15123375SgrehanLOADER_CD9660_SUPPORT?= yes 16123375SgrehanLOADER_EXT2FS_SUPPORT?= no 1768548SbennoLOADER_NET_SUPPORT?= yes 18123375SgrehanLOADER_NFS_SUPPORT?= yes 19176185SrajLOADER_TFTP_SUPPORT?= no 20123375SgrehanLOADER_GZIP_SUPPORT?= yes 21123375SgrehanLOADER_BZIP2_SUPPORT?= no 2267204Sobrien 23125634Sgrehan.if ${LOADER_DISK_SUPPORT} == "yes" 2467204SobrienCFLAGS+= -DLOADER_DISK_SUPPORT 2568548Sbenno.endif 26123375Sgrehan.if ${LOADER_UFS_SUPPORT} == "yes" 27123375SgrehanCFLAGS+= -DLOADER_UFS_SUPPORT 28123375Sgrehan.endif 29123375Sgrehan.if ${LOADER_CD9660_SUPPORT} == "yes" 30123375SgrehanCFLAGS+= -DLOADER_CD9660_SUPPORT 31123375Sgrehan.endif 32123375Sgrehan.if ${LOADER_EXT2FS_SUPPORT} == "yes" 33123375SgrehanCFLAGS+= -DLOADER_EXT2FS_SUPPORT 34123375Sgrehan.endif 35125634Sgrehan.if ${LOADER_GZIP_SUPPORT} == "yes" 36125634SgrehanCFLAGS+= -DLOADER_GZIP_SUPPORT 37125634Sgrehan.endif 38125634Sgrehan.if ${LOADER_BZIP2_SUPPORT} == "yes" 39125634SgrehanCFLAGS+= -DLOADER_BZIP2_SUPPORT 40125634Sgrehan.endif 41125634Sgrehan.if ${LOADER_NET_SUPPORT} == "yes" 4268548SbennoCFLAGS+= -DLOADER_NET_SUPPORT 4368548Sbenno.endif 44123375Sgrehan.if ${LOADER_NFS_SUPPORT} == "yes" 45123375SgrehanCFLAGS+= -DLOADER_NFS_SUPPORT 46123375Sgrehan.endif 47123375Sgrehan.if ${LOADER_TFTP_SUPPORT} == "yes" 48123375SgrehanCFLAGS+= -DLOADER_TFTP_SUPPORT 49123375Sgrehan.endif 5067204Sobrien 51156813Sru.if ${MK_FORTH} != "no" 52123375Sgrehan# Enable BootForth 53123375SgrehanBOOT_FORTH= yes 54123375SgrehanCFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc 55123375SgrehanLIBFICL= ${.OBJDIR}/../../ficl/libficl.a 56123375Sgrehan.endif 5767204Sobrien 58125634Sgrehan# Always add MI sources 5968548Sbenno.PATH: ${.CURDIR}/../../common 60125634Sgrehan.include "${.CURDIR}/../../common/Makefile.inc" 6168548SbennoCFLAGS+= -I${.CURDIR}/../../common 62125634SgrehanCFLAGS+= -I. 6367204Sobrien 64125634SgrehanCLEANFILES+= vers.c loader.help 6567204Sobrien 66123375SgrehanCFLAGS+= -ffreestanding 67131811Sgrehan# load address. set in linker script 68123375SgrehanRELOC?= 0x1C00000 69123375SgrehanCFLAGS+= -DRELOC=${RELOC} 7067204Sobrien 71131811SgrehanLDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc 72131811Sgrehan 73132997Sgrehan# 64-bit bridge extensions 74132997SgrehanCFLAGS+= -Wa,-mppc64bridge 75132997Sgrehan 76123375Sgrehan# Pull in common loader code 77123375Sgrehan.PATH: ${.CURDIR}/../../ofw/common 78125634Sgrehan.include "${.CURDIR}/../../ofw/common/Makefile.inc" 79123375Sgrehan 80133862Smarius# Open Firmware standalone support library 8167204SobrienLIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a 8267204SobrienCFLAGS+= -I${.CURDIR}/../../ofw/libofw 8367204Sobrien 8467204Sobrien# where to get libstand from 8567204SobrienCFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ 8667204Sobrien 87125634SgrehanDPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} 88125634SgrehanLDADD= ${LIBFICL} ${LIBOFW} -lstand 8967204Sobrien 90123375Sgrehanvers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version 9167204Sobrien sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 9267204Sobrien 93125634Sgrehanloader.help: help.common help.ofw 94123375Sgrehan cat ${.ALLSRC} | \ 95123375Sgrehan awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} 9667204Sobrien 97123375Sgrehan.PATH: ${.CURDIR}/../../forth 98125634SgrehanFILES= loader.help loader.4th support.4th loader.conf 99123375SgrehanFILESDIR_loader.conf= /boot/defaults 100123375Sgrehan 10167204Sobrien.if !exists(${DESTDIR}/boot/loader.rc) 102123375SgrehanFILES+= loader.rc 10367204Sobrien.endif 10467204Sobrien 10567204Sobrien.include <bsd.prog.mk> 106