mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Move common/Makefile.inc to sys/boot/loader.mk.
Makefile.inc has a specific meaning in the tree, and common/Makefile.inc doesn't quite fit into that. Rename it to loader.mk and it will be a place to collect common things to all /boot/loader programs there. Sponsored by: Netflix
This commit is contained in:
parent
7e705f54f8
commit
7f20726e4b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=324649
|
@ -90,9 +90,7 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
|||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../common
|
||||
.include "${.CURDIR}/../../common/Makefile.inc"
|
||||
CFLAGS+= -I${.CURDIR}/../../common
|
||||
.include "../../loader.mk"
|
||||
CFLAGS+= -I.
|
||||
|
||||
CLEANFILES+= loader.help
|
||||
|
@ -124,7 +122,7 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
|
|||
|
||||
loader.help: help.common help.uboot ${.CURDIR}/../../fdt/help.fdt
|
||||
cat ${.ALLSRC} | \
|
||||
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
||||
awk -f ${LDR_MI}/merge_help.awk > ${.TARGET}
|
||||
|
||||
ldscript.abs:
|
||||
echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET}
|
||||
|
|
|
@ -53,9 +53,7 @@ CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized
|
|||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../common
|
||||
.include "${.CURDIR}/../../common/Makefile.inc"
|
||||
CFLAGS+= -I${.CURDIR}/../../common
|
||||
.include "../../loader.mk"
|
||||
|
||||
.PATH: ${.CURDIR}/arch/${MACHINE}
|
||||
|
||||
|
|
|
@ -103,9 +103,7 @@ CFLAGS+= -DEFI_STAGING_SIZE=${EFI_STAGING_SIZE}
|
|||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../common
|
||||
.include "${.CURDIR}/../../common/Makefile.inc"
|
||||
CFLAGS+= -I${.CURDIR}/../../common
|
||||
.include "../../loader.mk"
|
||||
|
||||
FILES+= loader.efi
|
||||
FILESMODE_loader.efi= ${BINMODE}
|
||||
|
|
|
@ -72,9 +72,7 @@ CFLAGS+= -I${.CURDIR}/../../.. -D_STAND
|
|||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../common
|
||||
.include "${.CURDIR}/../../common/Makefile.inc"
|
||||
CFLAGS+= -I${.CURDIR}/../../common
|
||||
.include "../../loader.mk"
|
||||
CFLAGS+= -I.
|
||||
|
||||
CLEANFILES= ${LOADER} ${LOADER}.bin loader.help
|
||||
|
@ -104,7 +102,7 @@ ${LOADER}.bin: ${LOADER}.sym
|
|||
strip -R .comment -R .note -o ${.TARGET} ${.ALLSRC}
|
||||
|
||||
loader.help: help.common help.i386
|
||||
cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
||||
cat ${.ALLSRC} | awk -f ${LDR_MI}/merge_help.awk > ${.TARGET}
|
||||
|
||||
FILES= ${LOADER}
|
||||
# XXX INSTALLFLAGS_loader= -b
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
# $FreeBSD$
|
||||
|
||||
.PATH: ${SRCTOP}/sys/boot/common ${SRCTOP}/sys/boot/libsa
|
||||
BOOTDIR=${SRCTOP}/sys/boot
|
||||
LDR_MI=${BOOTDIR}/common
|
||||
|
||||
.PATH: ${LDR_MI} ${BOOTDIR}/libsa
|
||||
|
||||
CFLAGS+=-I${LDR_MI}
|
||||
|
||||
SRCS+= boot.c commands.c console.c devopen.c interp.c
|
||||
SRCS+= interp_backslash.c interp_parse.c ls.c misc.c
|
||||
|
@ -62,7 +67,7 @@ SRCS+= pnp.c
|
|||
# Forth interpreter
|
||||
.if defined(BOOT_FORTH)
|
||||
SRCS+= interp_forth.c
|
||||
.include "../ficl.mk"
|
||||
.include "${BOOTDIR}/ficl.mk"
|
||||
.endif
|
||||
|
||||
.if defined(BOOT_PROMPT_123)
|
||||
|
@ -78,6 +83,6 @@ VERSION_FILE?= ${.CURDIR}/version
|
|||
.if ${MK_REPRODUCIBLE_BUILD} != no
|
||||
REPRO_FLAG= -r
|
||||
.endif
|
||||
vers.c: ${SRCTOP}/sys/boot/common/newvers.sh ${VERSION_FILE}
|
||||
sh ${SRCTOP}/sys/boot/common/newvers.sh ${REPRO_FLAG} ${VERSION_FILE} \
|
||||
vers.c: ${LDR_MI}/newvers.sh ${VERSION_FILE}
|
||||
sh ${LDR_MI}/newvers.sh ${REPRO_FLAG} ${VERSION_FILE} \
|
||||
${NEWVERSWHAT}
|
|
@ -76,14 +76,8 @@ CFLAGS+= -I${.CURDIR}/../../../ficl/mips64
|
|||
LIBFICL= ${.OBJDIR}/../../../ficl/libficl.a
|
||||
.endif
|
||||
|
||||
# Common code across BERI boot loader parts
|
||||
.PATH: ${.CURDIR}/../common
|
||||
CFLAGS+= -I${.CURDIR}/../common
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../../common
|
||||
.include "${.CURDIR}/../../../common/Makefile.inc"
|
||||
CFLAGS+= -I${.CURDIR}/../../../common
|
||||
.include "../../../loader.mk"
|
||||
|
||||
# BERI files common to boot2 and loader
|
||||
.PATH: ${.CURDIR}/../common
|
||||
|
@ -112,7 +106,7 @@ LDADD= ${LIBFICL} ${LIBSA}
|
|||
|
||||
loader.help: help.common help.mips
|
||||
cat ${.ALLSRC} | \
|
||||
awk -f ${.CURDIR}/../../../common/merge_help.awk > ${.TARGET}
|
||||
awk -f ${LDR_MI}/merge_help.awk > ${.TARGET}
|
||||
|
||||
.PATH: ${.CURDIR}/../../../forth
|
||||
.include "${.CURDIR}/../../../forth/Makefile.inc"
|
||||
|
|
|
@ -94,9 +94,7 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
|||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../common
|
||||
.include "${.CURDIR}/../../common/Makefile.inc"
|
||||
CFLAGS+= -I${.CURDIR}/../../common
|
||||
.include "../../loader.mk"
|
||||
CFLAGS+= -I.
|
||||
|
||||
CLEANFILES+= loader.help
|
||||
|
@ -126,7 +124,7 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
|
|||
|
||||
loader.help: help.common help.uboot ${.CURDIR}/../../fdt/help.fdt
|
||||
cat ${.ALLSRC} | \
|
||||
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
||||
awk -f ${LDR_MI}/merge_help.awk > ${.TARGET}
|
||||
|
||||
ldscript.abs:
|
||||
echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET}
|
||||
|
|
|
@ -72,9 +72,9 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
|||
CFLAGS+= -mcpu=powerpc64
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
|
||||
.include "${.CURDIR}/../../common/Makefile.inc"
|
||||
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
|
||||
.include "../../loader.mk"
|
||||
.PATH: ${.CURDIR}/../../../libkern
|
||||
CFLAGS+= -I${.CURDIR}/../../..
|
||||
CFLAGS+= -I.
|
||||
|
||||
CLEANFILES+= loader.help
|
||||
|
@ -98,7 +98,7 @@ LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32}
|
|||
|
||||
loader.help: help.common help.kboot ${.CURDIR}/../../fdt/help.fdt
|
||||
cat ${.ALLSRC} | \
|
||||
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
||||
awk -f ${LDR_MI}/merge_help.awk > ${.TARGET}
|
||||
|
||||
.PATH: ${.CURDIR}/../../forth
|
||||
.include "${.CURDIR}/../../forth/Makefile.inc"
|
||||
|
|
|
@ -69,9 +69,9 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
|||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
|
||||
.include "${.CURDIR}/../../common/Makefile.inc"
|
||||
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
|
||||
.include "../../loader.mk"
|
||||
.PATH: ${.CURDIR}/../../../libkern
|
||||
CFLAGS+= -I${.CURDIR}/../../..
|
||||
CFLAGS+= -I.
|
||||
|
||||
CLEANFILES+= loader.help
|
||||
|
@ -96,7 +96,7 @@ LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32}
|
|||
|
||||
loader.help: help.common help.ofw ${.CURDIR}/../../fdt/help.fdt
|
||||
cat ${.ALLSRC} | \
|
||||
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
||||
awk -f ${LDR_MI}/merge_help.awk > ${.TARGET}
|
||||
|
||||
.PATH: ${.CURDIR}/../../forth
|
||||
.include "${.CURDIR}/../../forth/Makefile.inc"
|
||||
|
|
|
@ -72,9 +72,9 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
|||
CFLAGS+= -mcpu=powerpc64
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
|
||||
.include "${.CURDIR}/../../common/Makefile.inc"
|
||||
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
|
||||
.include "../../loader.mk"
|
||||
.PATH: ${.CURDIR}/../../../libkern
|
||||
CFLAGS+= -I${.CURDIR}/../../..
|
||||
CFLAGS+= -I.
|
||||
|
||||
CLEANFILES+= loader.help
|
||||
|
@ -100,7 +100,7 @@ font.h:
|
|||
|
||||
loader.help: help.common help.ps3 ${.CURDIR}/../../fdt/help.fdt
|
||||
cat ${.ALLSRC} | \
|
||||
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
||||
awk -f ${LDR_MI}/merge_help.awk > ${.TARGET}
|
||||
|
||||
.PATH: ${.CURDIR}/../../forth
|
||||
.include "${.CURDIR}/../../forth/Makefile.inc"
|
||||
|
|
|
@ -75,9 +75,9 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
|||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
|
||||
.include "${.CURDIR}/../../common/Makefile.inc"
|
||||
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
|
||||
.include "../../loader.mk"
|
||||
.PATH: ${.CURDIR}/../../../libkern
|
||||
CFLAGS+= -I${.CURDIR}/../../..
|
||||
CFLAGS+= -I.
|
||||
|
||||
CLEANFILES+= ${PROG}.help
|
||||
|
@ -101,7 +101,7 @@ LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32}
|
|||
|
||||
loader.help: help.common help.uboot ${.CURDIR}/../../fdt/help.fdt
|
||||
cat ${.ALLSRC} | \
|
||||
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
||||
awk -f ${LDR_MI}/merge_help.awk > ${.TARGET}
|
||||
|
||||
.PATH: ${.CURDIR}/../../forth
|
||||
FILES= loader.help
|
||||
|
|
|
@ -66,9 +66,7 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
|||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../common
|
||||
.include "${.CURDIR}/../../common/Makefile.inc"
|
||||
CFLAGS+= -I${.CURDIR}/../../common
|
||||
.include "../../loader.mk"
|
||||
CFLAGS+= -I.
|
||||
|
||||
CLEANFILES+= loader.help
|
||||
|
@ -87,7 +85,7 @@ LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA}
|
|||
|
||||
loader.help: help.common help.sparc64
|
||||
cat ${.ALLSRC} | \
|
||||
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
||||
awk -f ${LDR_MI}/merge_help.awk > ${.TARGET}
|
||||
|
||||
.PATH: ${.CURDIR}/../../forth
|
||||
.include "${.CURDIR}/../../forth/Makefile.inc"
|
||||
|
|
|
@ -30,7 +30,6 @@ SRCS+= vers.c
|
|||
|
||||
CFLAGS+= -Wall
|
||||
CFLAGS+= -I${.CURDIR}/..
|
||||
CFLAGS+= -I${.CURDIR}/../../common
|
||||
CFLAGS+= -I${.CURDIR}/../../..
|
||||
CFLAGS+= -ffreestanding -I.
|
||||
|
||||
|
@ -54,9 +53,7 @@ LIBZFSBOOT= ${.OBJDIR}/../zfs/libzfsboot.a
|
|||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../common
|
||||
.include "${.CURDIR}/../../common/Makefile.inc"
|
||||
CFLAGS+= -I${.CURDIR}/../../common
|
||||
.include "../../loader.mk"
|
||||
CFLAGS+= -I.
|
||||
DPADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSA}
|
||||
LDADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSA}
|
||||
|
|
Loading…
Reference in a new issue