svn commit: r324651 - head/sys/boot

Warner Losh imp at FreeBSD.org
Mon Oct 16 03:59:40 UTC 2017


Author: imp
Date: Mon Oct 16 03:59:38 2017
New Revision: 324651
URL: https://svnweb.freebsd.org/changeset/base/324651

Log:
  create defs.mk for common definitions

Added:
  head/sys/boot/defs.mk   (contents, props changed)
Modified:
  head/sys/boot/Makefile.inc
  head/sys/boot/ficl.mk
  head/sys/boot/loader.mk

Modified: head/sys/boot/Makefile.inc
==============================================================================
--- head/sys/boot/Makefile.inc	Mon Oct 16 03:59:33 2017	(r324650)
+++ head/sys/boot/Makefile.inc	Mon Oct 16 03:59:38 2017	(r324651)
@@ -2,14 +2,10 @@
 
 .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}
 

Added: head/sys/boot/defs.mk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/boot/defs.mk	Mon Oct 16 03:59:38 2017	(r324651)
@@ -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__

Modified: head/sys/boot/ficl.mk
==============================================================================
--- head/sys/boot/ficl.mk	Mon Oct 16 03:59:33 2017	(r324650)
+++ head/sys/boot/ficl.mk	Mon Oct 16 03:59:38 2017	(r324651)
@@ -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)

Modified: head/sys/boot/loader.mk
==============================================================================
--- head/sys/boot/loader.mk	Mon Oct 16 03:59:33 2017	(r324650)
+++ head/sys/boot/loader.mk	Mon Oct 16 03:59:38 2017	(r324651)
@@ -1,7 +1,6 @@
 # $FreeBSD$
 
-BOOTDIR=${SRCTOP}/sys/boot
-LDR_MI=${BOOTDIR}/common
+.include "defs.mk"
 
 .PATH: ${LDR_MI} ${BOOTDIR}/libsa
 


More information about the svn-src-head mailing list