freebsd-dev/stand/powerpc/boot1.chrp/Makefile
Warner Losh 8299b37f85 Centralize several variables.
MK_CTF, MK_SSP, MK_PROFILE, NO_PIC, and INTERNALLIB are always the
same, so set them in defs.mk. MAN= is common, so set it here too.
This removes a lot of boring repetition from the Makefiles that added
almost no value.
2018-02-02 06:32:26 +00:00

35 lines
802 B
Makefile

# $FreeBSD$
.include <bsd.init.mk>
PROG= boot1.elf
NEWVERSWHAT= "Open Firmware boot block" ${MACHINE_ARCH}
INSTALLFLAGS= -b
FILES= boot1.hfs
SRCS= boot1.c ashldi3.c syncicache.c
CFLAGS+=-I${LDRSRC}
LDFLAGS=-nostdlib -static -Wl,-N
.PATH: ${SYSDIR}/libkern ${SRCTOP}/lib/libc/powerpc/gen ${.CURDIR}
# The following inserts out objects into a template HFS
# created by generate-hfs.sh
.include "${.CURDIR}/Makefile.hfs"
boot1.hfs: boot1.elf bootinfo.txt
echo ${.OBJDIR}
uudecode ${.CURDIR}/hfs.tmpl.bz2.uu
mv hfs.tmpl.bz2 ${.TARGET}.bz2
bzip2 -f -d ${.TARGET}.bz2
${DD} if=boot1.elf of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc
${DD} if=${.CURDIR}/bootinfo.txt of=${.TARGET} seek=${BOOTINFO_OFFSET} \
conv=notrunc
CLEANFILES+= boot1.hfs
.include <bsd.prog.mk>