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