initial commit
[freebsd-arm:freebsd-arm.git] / boot / powerpc / boot1.chrp / Makefile
1 # $FreeBSD$
2
3 WITHOUT_SSP=
4
5 PROG=           boot1.elf
6 NEWVERSWHAT=    "Open Firmware boot block" ${MACHINE_ARCH}
7 BINDIR?=        /boot
8 INSTALLFLAGS=   -b
9
10 FILES=          boot1.hfs
11 SRCS=           boot1.c ashldi3.c
12
13 INTERNALPROG=
14 NO_MAN=
15
16 CFLAGS= -ffreestanding -msoft-float -Os -D_KERNEL \
17         -I${.CURDIR}/../../common -I${.CURDIR}/../../../
18 LDFLAGS=-nostdlib -static -N
19
20 .include "${.CURDIR}/../Makefile.inc"
21 .PATH:  ${.CURDIR}/../../../libkern ${.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
28 boot1.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
37 CLEANFILES= boot1.hfs
38
39 boot1.o: ${.CURDIR}/../../common/ufsread.c
40
41 .include <bsd.prog.mk>
42