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= -I${LDRSRC} -I${SYSDIR} -I${SASRC} -D_STANDALONE 17LDFLAGS=-nostdlib -static -Wl,-N 18 19.PATH: ${SYSDIR}/libkern ${SRCTOP}/lib/libc/powerpc/gen ${.CURDIR} 20 21# The following inserts out objects into a template HFS 22# created by generate-hfs.sh 23 24.include "${.CURDIR}/Makefile.hfs" 25 26boot1.hfs: boot1.elf bootinfo.txt 27 echo ${.OBJDIR} 28 uudecode ${.CURDIR}/hfs.tmpl.bz2.uu 29 mv hfs.tmpl.bz2 ${.TARGET}.bz2 30 bzip2 -f -d ${.TARGET}.bz2 31 ${DD} if=boot1.elf of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc 32 ${DD} if=${.CURDIR}/bootinfo.txt of=${.TARGET} seek=${BOOTINFO_OFFSET} \ 33 conv=notrunc 34 35CLEANFILES+= boot1.hfs 36 37boot1.o: ${SASRC}/ufsread.c 38 39.include <bsd.prog.mk> 40 41