Define SASRC and use it
Define SASRC to point to the current libstand sources. Include ../Makefile.inc early enough in a few places so we can .include "${SASRC}/Makefile" and have it work. Create a new pass-up Makefile.inc in sys/boot/userboot to allow this pattern to work. Sponsored by: Netflix
This commit is contained in:
parent
6a971c1732
commit
eca8b9c449
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=324450
@ -2,6 +2,11 @@
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
.if !defined(__BOOT_MAKEFILE_INC__)
|
||||
__BOOT_MAKEFILE_INC__=${MFILE}
|
||||
|
||||
SASRC=${SRCTOP}/lib/libstand
|
||||
|
||||
SSP_CFLAGS=
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "arm"
|
||||
@ -24,9 +29,9 @@ DD_NOSTATUS!=(dd status=none count=0 2> /dev/null && echo status=none) || true
|
||||
DD=dd ${DD_NOSTATUS}
|
||||
|
||||
.if ${MK_LOADER_FORCE_LE} != "no"
|
||||
|
||||
.if ${MACHINE_ARCH} == "powerpc64"
|
||||
CFLAGS+= -mlittle-endian
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.endif
|
||||
|
@ -113,7 +113,7 @@ CFLAGS+= -I${.CURDIR}/../../uboot/lib
|
||||
CFLAGS+= -I${.OBJDIR}/../../uboot/lib
|
||||
|
||||
# where to get libstand from
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
|
||||
CFLAGS+= -fPIC
|
||||
|
||||
|
@ -70,7 +70,7 @@ CFLAGS+= -DBOOT_PROMPT_123
|
||||
|
||||
.if defined(LOADER_INSTALL_SUPPORT)
|
||||
SRCS+= install.c
|
||||
CFLAGS+=-I${.CURDIR}/../../../../lib/libstand
|
||||
CFLAGS+=-I${SASRC}
|
||||
.endif
|
||||
|
||||
CLEANFILES+= vers.c
|
||||
|
@ -17,7 +17,7 @@ CFLAGS+= -mgeneral-regs-only
|
||||
CFLAGS+= -msoft-float
|
||||
.endif
|
||||
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
|
||||
# EFI library headers
|
||||
CFLAGS+= -I${.CURDIR}/../include
|
||||
|
@ -37,7 +37,7 @@ CFLAGS+= -fPIC -mno-red-zone
|
||||
.endif
|
||||
CFLAGS+= -I${.CURDIR}/../include
|
||||
CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
|
||||
CFLAGS+= -I${SASRC}
|
||||
.if ${MK_ZFS} != "no"
|
||||
CFLAGS+= -I${.CURDIR}/../../zfs
|
||||
CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs
|
||||
|
@ -37,7 +37,7 @@ CWARNFLAGS.zfs.c+= -Wno-missing-prototypes
|
||||
.endif
|
||||
|
||||
.if defined(LOADER_NET_SUPPORT)
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
|
||||
CFLAGS+= -I${SASRC}
|
||||
.endif
|
||||
|
||||
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201
|
||||
|
@ -10,7 +10,7 @@ SRCS+= dcons.c fwcrom.c
|
||||
CFLAGS+= -D_BOOT
|
||||
|
||||
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
|
||||
CFLAGS+= -I${SASRC}
|
||||
CFLAGS+= -I${.CURDIR}/../btx/lib
|
||||
CFLAGS+= -I${.CURDIR}/../libi386
|
||||
|
||||
|
@ -60,7 +60,7 @@ CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 \
|
||||
-I${.CURDIR}/../../../contrib/dev/acpica/include \
|
||||
-I${.CURDIR}/../../.. -I.
|
||||
# the location of libstand
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
|
||||
# Handle FreeBSD specific %b and %D printf format specifiers
|
||||
CFLAGS+= ${FORMAT_EXTENSIONS}
|
||||
|
@ -29,7 +29,7 @@ LIBZFSBOOT= ${.OBJDIR}/../../zfs/libzfsboot.a
|
||||
.endif
|
||||
|
||||
.if defined(LOADER_NET_SUPPORT)
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
|
||||
CFLAGS+= -I${SASRC}
|
||||
.endif
|
||||
|
||||
.if defined(LOADER_TFTP_SUPPORT)
|
||||
|
@ -2,23 +2,25 @@
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
LIBSTAND_SRC= ${.CURDIR}/../../../lib/libstand
|
||||
.include "../Makefile.inc"
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "amd64"
|
||||
LIBSTAND_CPUARCH=i386
|
||||
.else
|
||||
LIBSTAND_CPUARCH=${MACHINE_CPUARCH}
|
||||
.endif
|
||||
LIBC_SRC= ${LIBSTAND_SRC}/../libc
|
||||
LIBSTAND_SRC= ${SASRC}
|
||||
LIBC_SRC= ${SRCTOP}/lib/libc
|
||||
INTERNALLIB=
|
||||
INCS=
|
||||
MAN=
|
||||
.PATH: ${LIBSTAND_SRC}
|
||||
.PATH: ${SASRC}
|
||||
|
||||
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64"
|
||||
CFLAGS+= -m32 -I.
|
||||
.endif
|
||||
|
||||
.include "${LIBSTAND_SRC}/Makefile"
|
||||
.include "${SASRC}/Makefile"
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "amd64"
|
||||
CLEANFILES+= machine
|
||||
|
@ -58,7 +58,7 @@ CFLAGS= -ffreestanding \
|
||||
-g
|
||||
|
||||
# where to get libstand from
|
||||
CFLAGS+= -I${.CURDIR}/../../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
LIBSTAND= ${.OBJDIR}/../../../../../lib/libstand/libstand.a
|
||||
|
||||
LDFLAGS= -nostdlib \
|
||||
|
@ -108,7 +108,7 @@ LDFLAGS= -nostdlib \
|
||||
-e __start
|
||||
|
||||
# where to get libstand from
|
||||
CFLAGS+= -I${.CURDIR}/../../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
LIBSTAND= ${.OBJDIR}/../../../../../lib/libstand/libstand.a
|
||||
|
||||
DPADD= ${LIBFICL} ${LIBSTAND}
|
||||
|
@ -116,7 +116,7 @@ CFLAGS+= -I${.CURDIR}/../../uboot/lib
|
||||
CFLAGS+= -I${.OBJDIR}/../../uboot/lib
|
||||
|
||||
# where to get libstand from
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a
|
||||
|
||||
# clang doesn't understand %D as a specifier to printf
|
||||
|
@ -9,7 +9,7 @@ SRCS= devicename.c elf_freebsd.c ofw_console.c ofw_copy.c ofw_disk.c \
|
||||
.PATH: ${.CURDIR}/../../zfs
|
||||
SRCS+= devicename_stubs.c
|
||||
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
|
||||
# Pick up the bootstrap header for some interface items
|
||||
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
|
||||
|
@ -95,7 +95,7 @@ CFLAGS+= -Wa,-mppc64bridge
|
||||
|
||||
# where to get libstand from
|
||||
LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
|
||||
DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
|
||||
LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
|
||||
|
@ -93,7 +93,7 @@ CFLAGS+= -I${.CURDIR}/../../ofw/libofw
|
||||
|
||||
# where to get libstand from
|
||||
LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
|
||||
DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
|
||||
LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
|
||||
|
@ -92,7 +92,7 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
|
||||
|
||||
# where to get libstand from
|
||||
LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
|
||||
DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
|
||||
LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
|
||||
|
@ -98,7 +98,7 @@ CFLAGS+= -I${.OBJDIR}/../../uboot/lib
|
||||
|
||||
# where to get libstand from
|
||||
LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
|
||||
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND}
|
||||
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND}
|
||||
|
@ -80,7 +80,7 @@ LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
|
||||
CFLAGS+= -I${.CURDIR}/../../ofw/libofw/
|
||||
|
||||
# where to get libstand from
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
|
||||
# Need sys/ for crypto/intake.h
|
||||
CFLAGS+= -I${SRCTOP}/sys
|
||||
|
@ -12,7 +12,7 @@ SRCS= uboot_fdt.c
|
||||
|
||||
CFLAGS+= -ffreestanding -msoft-float
|
||||
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
|
||||
# U-Boot library headers
|
||||
CFLAGS+= -I${.CURDIR}/../lib
|
||||
|
@ -13,7 +13,7 @@ SRCS+= module.c net.c reboot.c time.c
|
||||
|
||||
CFLAGS+= -ffreestanding -msoft-float
|
||||
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
CFLAGS+= -I${SASRC}
|
||||
|
||||
.if !defined(LOADER_NO_DISK_SUPPORT)
|
||||
SRCS+= disk.c
|
||||
|
3
sys/boot/userboot/Makefile.inc
Normal file
3
sys/boot/userboot/Makefile.inc
Normal file
@ -0,0 +1,3 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include "../Makefile.inc"
|
@ -1,8 +1,9 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
.include "../Makefile.inc"
|
||||
|
||||
LIBSTAND_SRC= ${.CURDIR}/../../../../lib/libstand
|
||||
LIBSTAND_SRC= ${SASRC}
|
||||
|
||||
INTERNALLIB=
|
||||
INCS=
|
||||
|
@ -32,7 +32,7 @@ CFLAGS+= -Wall
|
||||
CFLAGS+= -I${.CURDIR}/..
|
||||
CFLAGS+= -I${.CURDIR}/../../common
|
||||
CFLAGS+= -I${.CURDIR}/../../..
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
|
||||
CFLAGS+= -I${SASRC}
|
||||
CFLAGS+= -ffreestanding -I.
|
||||
|
||||
CWARNFLAGS.main.c += -Wno-implicit-function-declaration
|
||||
|
@ -12,7 +12,7 @@ SRCS+= zfs.c skein.c skein_block.c
|
||||
CFLAGS+= -DSKEIN_LOOP=111
|
||||
|
||||
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
|
||||
CFLAGS+= -I${SASRC}
|
||||
CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs
|
||||
CFLAGS+= -I${.CURDIR}/../../../crypto/skein
|
||||
|
||||
|
@ -12,7 +12,7 @@ CFLAGS+= -DSKEIN_LOOP=111
|
||||
|
||||
CFLAGS+= -DBOOTPROG=\"zfsloader\"
|
||||
CFLAGS+= -I${.CURDIR}/../common -I${.CURDIR}/../.. -I.
|
||||
CFLAGS+= -I${.CURDIR}/../../../lib/libstand
|
||||
CFLAGS+= -I${SASRC}
|
||||
CFLAGS+= -I${.CURDIR}/../../cddl/boot/zfs
|
||||
CFLAGS+= -I${.CURDIR}/../../crypto/skein
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user