aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/boot/fdt/Makefile2
-rw-r--r--sys/boot/ficl.mk2
-rw-r--r--sys/boot/ficl/Makefile3
-rw-r--r--sys/boot/geli/Makefile2
-rw-r--r--sys/boot/ofw/libofw/Makefile6
-rw-r--r--sys/boot/uboot/fdt/Makefile12
-rw-r--r--sys/boot/uboot/lib/Makefile10
-rw-r--r--sys/boot/zfs/Makefile12
8 files changed, 26 insertions, 23 deletions
diff --git a/sys/boot/fdt/Makefile b/sys/boot/fdt/Makefile
index d0d0a58867ee..467e424c2baf 100644
--- a/sys/boot/fdt/Makefile
+++ b/sys/boot/fdt/Makefile
@@ -14,7 +14,7 @@ SRCS+= fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c \
# Loader's fdt commands extension sources.
SRCS+= fdt_loader_cmd.c fdt_overlay.c
-CFLAGS+= -I${SYSDIR}/contrib/libfdt/ -I${BOOTSRC}/common/
+CFLAGS+= -I${SYSDIR}/contrib/libfdt/ -I${LDRSRC}
CFLAGS+= -ffreestanding
diff --git a/sys/boot/ficl.mk b/sys/boot/ficl.mk
index 70b9c0a5382b..c26787b914ce 100644
--- a/sys/boot/ficl.mk
+++ b/sys/boot/ficl.mk
@@ -38,7 +38,7 @@ beforedepend ${OBJS}: machine
.endif
machine: .NOMETA
- ln -sf ${.CURDIR}/../../i386/include machine
+ ln -sf ${SYSDIR}/i386/include machine
CLEANFILES+= machine
.endif
diff --git a/sys/boot/ficl/Makefile b/sys/boot/ficl/Makefile
index 89213f389410..28c320d46620 100644
--- a/sys/boot/ficl/Makefile
+++ b/sys/boot/ficl/Makefile
@@ -1,7 +1,8 @@
# $FreeBSD$
#
-.include "../ficl.mk"
+.include <bsd.init.mk>
+.include "${BOOTSRC}/ficl.mk"
BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \
prefix.c search.c stack.c tools.c vm.c words.c
diff --git a/sys/boot/geli/Makefile b/sys/boot/geli/Makefile
index 9a044b3f3056..cf16c4115036 100644
--- a/sys/boot/geli/Makefile
+++ b/sys/boot/geli/Makefile
@@ -40,7 +40,7 @@ SRCS+= md5c.c
# AES implementation from sys/crypto
.PATH: ${SYSDIR}/crypto/rijndael
CFLAGS+= -I${SYSDIR}
-CFLAGS+= -I${.CURDIR}/../common/
+CFLAGS+= -I${LDRSRC}
# Remove asserts
CFLAGS+= -DNDEBUG
SRCS+= rijndael-alg-fst.c rijndael-api-fst.c rijndael-api.c
diff --git a/sys/boot/ofw/libofw/Makefile b/sys/boot/ofw/libofw/Makefile
index d1aa2d805320..55b17fa771c1 100644
--- a/sys/boot/ofw/libofw/Makefile
+++ b/sys/boot/ofw/libofw/Makefile
@@ -6,11 +6,11 @@ INTERNALLIB=
SRCS= devicename.c elf_freebsd.c ofw_console.c ofw_copy.c ofw_disk.c \
ofw_memory.c ofw_module.c ofw_net.c ofw_reboot.c \
ofw_time.c openfirm.c
-.PATH: ${.CURDIR}/../../zfs
+.PATH: ${BOOTSRC}/zfs
SRCS+= devicename_stubs.c
# Pick up the bootstrap header for some interface items
-CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
+CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I.
CFLAGS+= -ffreestanding
.if ${MACHINE_CPUARCH} == "powerpc"
@@ -24,7 +24,7 @@ CFLAGS+= -DDISK_DEBUG
.endif
machine: .NOMETA
- ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine
+ ln -sf ${SYSDIR}/${MACHINE_CPUARCH}/include machine
CLEANFILES+= machine
diff --git a/sys/boot/uboot/fdt/Makefile b/sys/boot/uboot/fdt/Makefile
index 0df20265a71a..1409e3e4696e 100644
--- a/sys/boot/uboot/fdt/Makefile
+++ b/sys/boot/uboot/fdt/Makefile
@@ -1,8 +1,8 @@
# $FreeBSD$
-.include <src.opts.mk>
+.include <bsd.init.mk>
-.PATH: ${.CURDIR}/../../common
+.PATH: ${LDRSRC}
LIB= uboot_fdt
INTERNALLIB=
@@ -13,16 +13,16 @@ SRCS= uboot_fdt.c
CFLAGS+= -ffreestanding -msoft-float
# U-Boot library headers
-CFLAGS+= -I${.CURDIR}/../lib
+CFLAGS+= -I${UBOOTSRC}/lib
# libfdt headers
-CFLAGS+= -I${.CURDIR}/../../fdt
+CFLAGS+= -I${FDTSRC}
# Pick up the bootstrap header for some interface items
-CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
+CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I.
machine: .NOMETA
- ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine
+ ln -sf ${SYSDIR}/${MACHINE_CPUARCH}/include machine
CLEANFILES+= machine
diff --git a/sys/boot/uboot/lib/Makefile b/sys/boot/uboot/lib/Makefile
index f88d0b3aaf15..8fce769c77c8 100644
--- a/sys/boot/uboot/lib/Makefile
+++ b/sys/boot/uboot/lib/Makefile
@@ -1,8 +1,8 @@
# $FreeBSD$
-.include <src.opts.mk>
+.include <bsd.init.mk>
-.PATH: ${.CURDIR}/../../common
+.PATH: ${LDRSRC}
LIB= uboot
INTERNALLIB=
@@ -24,14 +24,14 @@ LOADER_FDT_SUPPORT= no
.endif
.if ${LOADER_FDT_SUPPORT} == "yes"
-CFLAGS+= -DLOADER_FDT_SUPPORT -I${.CURDIR}/../../fdt
+CFLAGS+= -DLOADER_FDT_SUPPORT -I${FDTSRC}
.endif
# Pick up FDT includes
CFLAGS+= -I${SYSDIR}/contrib/libfdt/
# Pick up the bootstrap header for some interface items
-CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
+CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I.
.ifdef(BOOT_DISK_DEBUG)
# Make the disk code more talkative
@@ -39,7 +39,7 @@ CFLAGS+= -DDISK_DEBUG
.endif
machine: .NOMETA
- ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine
+ ln -sf ${SYSDIR}/${MACHINE_CPUARCH}/include machine
CLEANFILES+= machine
diff --git a/sys/boot/zfs/Makefile b/sys/boot/zfs/Makefile
index 1f07b79f4a8e..0125a3c7b54a 100644
--- a/sys/boot/zfs/Makefile
+++ b/sys/boot/zfs/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.init.mk>
+
LIB= zfsboot
INTERNALLIB=
@@ -8,12 +10,12 @@ SRCS+= zfs.c
SRCS+= skein.c skein_block.c
# Do not unroll skein loops, reduce code size
CFLAGS+= -DSKEIN_LOOP=111
-.PATH: ${.CURDIR}/../../crypto/skein
+.PATH: ${SYSDIR}/crypto/skein
CFLAGS+= -DBOOTPROG=\"zfsloader\"
-CFLAGS+= -I${.CURDIR}/../common -I${.CURDIR}/../.. -I.
-CFLAGS+= -I${.CURDIR}/../../cddl/boot/zfs
-CFLAGS+= -I${.CURDIR}/../../crypto/skein
+CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I.
+CFLAGS+= -I${SYSDIR}/cddl/boot/zfs
+CFLAGS+= -I${SYSDIR}/crypto/skein
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -march=i386
@@ -27,7 +29,7 @@ CFLAGS+= -Wformat -Wall
.if ${MACHINE_CPUARCH} == "amd64"
CLEANFILES+= machine
machine: .NOMETA
- ln -sf ${.CURDIR}/../../i386/include machine
+ ln -sf ${SYSDIR}/i386/include machine
.endif
.include <bsd.stand.mk>