create defs.mk for common definitions

This commit is contained in:
Warner Losh 2017-10-16 03:59:38 +00:00
parent bcbe0c006e
commit 8ed8e50775
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=324651
4 changed files with 22 additions and 10 deletions

View File

@ -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=

17
sys/boot/defs.mk Normal file
View File

@ -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__

View File

@ -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)

View File

@ -1,7 +1,6 @@
# $FreeBSD$
BOOTDIR=${SRCTOP}/sys/boot
LDR_MI=${BOOTDIR}/common
.include "defs.mk"
.PATH: ${LDR_MI} ${BOOTDIR}/libsa