diff options
author | Warner Losh <imp@FreeBSD.org> | 2017-10-16 03:59:38 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2017-10-16 03:59:38 +0000 |
commit | 8ed8e507755f93d82f5d5c0374de72cacef6ab2b (patch) | |
tree | c095bf3bb10bba5b79cc17d3255d53668635461a /sys/boot | |
parent | bcbe0c006e3e9403ac1386bbfe99ca8ee99a6635 (diff) | |
download | src-8ed8e507755f93d82f5d5c0374de72cacef6ab2b.tar.gz src-8ed8e507755f93d82f5d5c0374de72cacef6ab2b.zip |
create defs.mk for common definitions
Notes
Notes:
svn path=/head/; revision=324651
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/Makefile.inc | 8 | ||||
-rw-r--r-- | sys/boot/defs.mk | 17 | ||||
-rw-r--r-- | sys/boot/ficl.mk | 4 | ||||
-rw-r--r-- | sys/boot/loader.mk | 3 |
4 files changed, 22 insertions, 10 deletions
diff --git a/sys/boot/Makefile.inc b/sys/boot/Makefile.inc index eaa62df8fec3..b83216982df9 100644 --- a/sys/boot/Makefile.inc +++ b/sys/boot/Makefile.inc @@ -2,15 +2,11 @@ .include <src.opts.mk> +.include "defs.mk" + .if !defined(__BOOT_MAKEFILE_INC__) __BOOT_MAKEFILE_INC__=${MFILE} -SASRC=${SRCTOP}/sys/boot/libsa -# Normal Standalone library -LIBSA=${OBJTOP}/sys/boot/libsa/libsa.a -# Standalone library compiled for 32-bit version of the processor -LIBSA32=${OBJTOP}/sys/boot/libsa32/libsa32.a - CFLAGS+=-I${SASRC} SSP_CFLAGS= diff --git a/sys/boot/defs.mk b/sys/boot/defs.mk new file mode 100644 index 000000000000..a84598003567 --- /dev/null +++ b/sys/boot/defs.mk @@ -0,0 +1,17 @@ +# $FreeBSD$ + +.if !defined(__BOOT_DEFS_MK__) +__BOOT_DEFS_MK__=${MFILE} + +BOOTDIR= ${SRCTOP}/sys/boot +FICLDIR= ${SRCTOP}/sys/boot/ficl +LDR_MI= ${BOOTDIR}/common +SASRC= ${SRCTOP}/sys/boot/libsa +SYSDIR= ${SRCTOP}/sys + +# Normal Standalone library +LIBSA= ${OBJTOP}/sys/boot/libsa/libsa.a +# Standalone library compiled for 32-bit version of the processor +LIBSA32= ${OBJTOP}/sys/boot/libsa32/libsa32.a + +.endif # __BOOT_DEFS_MK__ diff --git a/sys/boot/ficl.mk b/sys/boot/ficl.mk index 31ca677e863e..8700362332f0 100644 --- a/sys/boot/ficl.mk +++ b/sys/boot/ficl.mk @@ -2,7 +2,7 @@ # Common flags to build FICL related files -FICLDIR?= ${SRCTOP}/sys/boot/ficl +.include "defs.mk" .if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) FICL_CPUARCH= i386 @@ -26,7 +26,7 @@ CFLAGS+= -fPIC CFLAGS+= -m32 -mcpu=powerpc -I. .endif -CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} -I${SRCTOP}/sys/boot/common +CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} -I${LDR_MI} .if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) .if !exists(machine) diff --git a/sys/boot/loader.mk b/sys/boot/loader.mk index bf241a127526..65ca86728a95 100644 --- a/sys/boot/loader.mk +++ b/sys/boot/loader.mk @@ -1,7 +1,6 @@ # $FreeBSD$ -BOOTDIR=${SRCTOP}/sys/boot -LDR_MI=${BOOTDIR}/common +.include "defs.mk" .PATH: ${LDR_MI} ${BOOTDIR}/libsa |