Makefile revision 281843
1205194Sdelphij# $FreeBSD: stable/10/sys/boot/powerpc/ofw/Makefile 281843 2015-04-22 01:08:40Z dteske $ 2205194Sdelphij 3205194Sdelphij.include <bsd.own.mk> 4205194SdelphijMK_SSP= no 5205194Sdelphij 6205194SdelphijPROG= loader 7205194SdelphijNEWVERSWHAT= "Open Firmware loader" ${MACHINE_ARCH} 8205194SdelphijBINDIR?= /boot 9205194SdelphijINSTALLFLAGS= -b 10205194Sdelphij 11205194Sdelphij# Architecture-specific loader code 12205194SdelphijSRCS= conf.c metadata.c vers.c start.c 13205194SdelphijSRCS+= ucmpdi2.c 14205194Sdelphij 15205194SdelphijLOADER_DISK_SUPPORT?= yes 16205194SdelphijLOADER_UFS_SUPPORT?= yes 17205194SdelphijLOADER_CD9660_SUPPORT?= yes 18205194SdelphijLOADER_EXT2FS_SUPPORT?= no 19205194SdelphijLOADER_NET_SUPPORT?= yes 20205194SdelphijLOADER_NFS_SUPPORT?= yes 21205194SdelphijLOADER_TFTP_SUPPORT?= no 22205194SdelphijLOADER_GZIP_SUPPORT?= yes 23205194SdelphijLOADER_BZIP2_SUPPORT?= no 24205194Sdelphij 25205194Sdelphij.if ${LOADER_DISK_SUPPORT} == "yes" 26205194SdelphijCFLAGS+= -DLOADER_DISK_SUPPORT 27205194Sdelphij.endif 28205194Sdelphij.if ${LOADER_UFS_SUPPORT} == "yes" 29205194SdelphijCFLAGS+= -DLOADER_UFS_SUPPORT 30205194Sdelphij.endif 31205194Sdelphij.if ${LOADER_CD9660_SUPPORT} == "yes" 32205194SdelphijCFLAGS+= -DLOADER_CD9660_SUPPORT 33205194Sdelphij.endif 34205194Sdelphij.if ${LOADER_EXT2FS_SUPPORT} == "yes" 35205194SdelphijCFLAGS+= -DLOADER_EXT2FS_SUPPORT 36205194Sdelphij.endif 37205194Sdelphij.if ${LOADER_GZIP_SUPPORT} == "yes" 38205194SdelphijCFLAGS+= -DLOADER_GZIP_SUPPORT 39205194Sdelphij.endif 40205194Sdelphij.if ${LOADER_BZIP2_SUPPORT} == "yes" 41205194SdelphijCFLAGS+= -DLOADER_BZIP2_SUPPORT 42205194Sdelphij.endif 43205194Sdelphij.if ${LOADER_NET_SUPPORT} == "yes" 44205194SdelphijCFLAGS+= -DLOADER_NET_SUPPORT 45205194Sdelphij.endif 46205194Sdelphij.if ${LOADER_NFS_SUPPORT} == "yes" 47205194SdelphijCFLAGS+= -DLOADER_NFS_SUPPORT 48205194Sdelphij.endif 49205194Sdelphij.if ${LOADER_TFTP_SUPPORT} == "yes" 50205194SdelphijCFLAGS+= -DLOADER_TFTP_SUPPORT 51205194Sdelphij.endif 52205194Sdelphij 53205194Sdelphij.if ${MK_FORTH} != "no" 54205194Sdelphij# Enable BootForth 55205194SdelphijBOOT_FORTH= yes 56205194SdelphijCFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc 57205194SdelphijLIBFICL= ${.OBJDIR}/../../ficl/libficl.a 58205194Sdelphij.endif 59205194Sdelphij 60205194Sdelphij# Avoid the open-close-dance for every file access as some firmwares perform 61205194Sdelphij# an auto-negotiation on every open of the network interface and thus causes 62205194Sdelphij# netbooting to take horribly long. 63205194SdelphijCFLAGS+= -DNETIF_OPEN_CLOSE_ONCE 64205194Sdelphij 65205194Sdelphij# Always add MI sources 66205194Sdelphij.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern 67205194Sdelphij.include "${.CURDIR}/../../common/Makefile.inc" 68205194SdelphijCFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. 69205194SdelphijCFLAGS+= -I. 70205194Sdelphij 71205194SdelphijCLEANFILES+= vers.c loader.help 72205194Sdelphij 73205194SdelphijCFLAGS+= -ffreestanding -msoft-float 74205194Sdelphij# load address. set in linker script 75205194SdelphijRELOC?= 0x1C00000 76205194SdelphijCFLAGS+= -DRELOC=${RELOC} 77205194Sdelphij 78205194SdelphijLDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc 79205194Sdelphij 80205194Sdelphij# 64-bit bridge extensions 81205194SdelphijCFLAGS+= -Wa,-mppc64bridge 82205194Sdelphij 83205194Sdelphij# Pull in common loader code 84205194Sdelphij.PATH: ${.CURDIR}/../../ofw/common 85205194Sdelphij.include "${.CURDIR}/../../ofw/common/Makefile.inc" 86205194Sdelphij 87205194Sdelphij# Open Firmware standalone support library 88205194SdelphijLIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a 89205194SdelphijCFLAGS+= -I${.CURDIR}/../../ofw/libofw 90205194Sdelphij 91205194Sdelphij# where to get libstand from 92205194SdelphijLIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a 93205194SdelphijCFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ 94205194Sdelphij 95205194SdelphijDPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} 96205194SdelphijLDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} 97205194Sdelphij 98205194Sdelphijvers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version 99205194Sdelphij sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 100205194Sdelphij 101205194Sdelphijloader.help: help.common help.ofw 102205194Sdelphij cat ${.ALLSRC} | \ 103205194Sdelphij awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} 104205194Sdelphij 105205194Sdelphij.PATH: ${.CURDIR}/../../forth 106205194Sdelphij.include "${.CURDIR}/../../forth/Makefile.inc" 107205194Sdelphij 108205194Sdelphij.if !exists(${DESTDIR}/boot/loader.rc) 109205194SdelphijFILES+= loader.rc 110205194Sdelphij.endif 111205194Sdelphij 112205194Sdelphij.if !exists(${DESTDIR}/boot/menu.rc) 113205194SdelphijFILES+= menu.rc 114205194Sdelphij.endif 115205194Sdelphij 116205194Sdelphij.include <bsd.prog.mk> 117205194Sdelphij