1# $FreeBSD$ 2 3.include <bsd.init.mk> 4 5SSP_CFLAGS= 6 7PROG= boot1.elf 8NEWVERSWHAT= "Open Firmware boot block" ${MACHINE_ARCH} 9INSTALLFLAGS= -b 10 11FILES= boot1.hfs 12SRCS= boot1.c ashldi3.c syncicache.c 13 14MAN= 15 16CFLAGS= -ffreestanding -msoft-float \ 17 -I${LDRSRC} -I${SYSDIR} -I${SASRC} \ 18 -D_STANDALONE 19LDFLAGS=-nostdlib -static -Wl,-N 20 21.PATH: ${SYSDIR}/libkern ${SRCTOP}/lib/libc/powerpc/gen ${.CURDIR} 22 23# The following inserts out objects into a template HFS 24# created by generate-hfs.sh 25 26.include "${.CURDIR}/Makefile.hfs" 27 28boot1.hfs: boot1.elf bootinfo.txt 29 echo ${.OBJDIR} 30 uudecode ${.CURDIR}/hfs.tmpl.bz2.uu 31 mv hfs.tmpl.bz2 ${.TARGET}.bz2 32 bzip2 -f -d ${.TARGET}.bz2 33 ${DD} if=boot1.elf of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc 34 ${DD} if=${.CURDIR}/bootinfo.txt of=${.TARGET} seek=${BOOTINFO_OFFSET} \ 35 conv=notrunc 36 37CLEANFILES+= boot1.hfs 38 39boot1.o: ${SASRC}/ufsread.c 40 41.include <bsd.prog.mk> 42 43