mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Move all the ficl common code into ficl.mk
There's a number of copies of basically identical code to enable building forth in /boot/loader. Move it all into ficl.mk.
This commit is contained in:
parent
8ed8e50775
commit
6b9f688352
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=324652
|
@ -81,14 +81,6 @@ LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt/libuboot_fdt.a
|
|||
LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
|
||||
.endif
|
||||
|
||||
.if ${MK_FORTH} != "no"
|
||||
# Enable BootForth
|
||||
BOOT_FORTH= yes
|
||||
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl/arm
|
||||
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
||||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.include "../../loader.mk"
|
||||
CFLAGS+= -I.
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
.if !defined(__BOOT_DEFS_MK__)
|
||||
__BOOT_DEFS_MK__=${MFILE}
|
||||
|
||||
|
@ -9,9 +11,12 @@ LDR_MI= ${BOOTDIR}/common
|
|||
SASRC= ${SRCTOP}/sys/boot/libsa
|
||||
SYSDIR= ${SRCTOP}/sys
|
||||
|
||||
# Normal Standalone library
|
||||
# NB: The makefiles depend on these being empty when we don't build forth.
|
||||
.if ${MK_FORTH} != "no"
|
||||
LIBFICL= ${OBJTOP}/sys/boot/ficl/libficl.a
|
||||
LIBFICL32= ${OBJTOP}/sys/boot/ficl32/libficl.a
|
||||
.endif
|
||||
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__
|
||||
|
|
|
@ -5,6 +5,7 @@ MAN=
|
|||
.include "../Makefile.inc"
|
||||
|
||||
MK_SSP= no
|
||||
MK_FORTH= no
|
||||
|
||||
PROG= boot1.sym
|
||||
INTERNALPROG=
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
.include <src.opts.mk>
|
||||
|
||||
.if ${MK_FORTH} != "no"
|
||||
CFLAGS+= -DBOOT_FORTH
|
||||
.include "../../ficl.mk"
|
||||
.endif
|
||||
|
||||
|
|
|
@ -78,14 +78,6 @@ CFLAGS+= -DSMBIOS_NETWORK_ENDIAN_UUID
|
|||
.endif
|
||||
.endif
|
||||
|
||||
.if ${MK_FORTH} != "no"
|
||||
BOOT_FORTH= yes
|
||||
CFLAGS+= -DBOOT_FORTH
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE_CPUARCH}
|
||||
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
||||
.endif
|
||||
|
||||
LOADER_FDT_SUPPORT?= no
|
||||
.if ${MK_FDT} != "no" && ${LOADER_FDT_SUPPORT} != "no"
|
||||
CFLAGS+= -I${.CURDIR}/../../fdt
|
||||
|
|
|
@ -27,6 +27,8 @@ CFLAGS+= -m32 -mcpu=powerpc -I.
|
|||
.endif
|
||||
|
||||
CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} -I${LDR_MI}
|
||||
CFLAGS+= -DBOOT_FORTH
|
||||
CFLAGS+= -DBF_DICTSIZE=15000
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
|
||||
.if !exists(machine)
|
||||
|
|
|
@ -42,17 +42,6 @@ HAVE_BCACHE= yes
|
|||
HAVE_PNP= yes
|
||||
HAVE_ISABUS= yes
|
||||
|
||||
.if ${MK_FORTH} != "no"
|
||||
# Enable BootForth
|
||||
BOOT_FORTH= yes
|
||||
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386
|
||||
.if ${MACHINE_CPUARCH} == "amd64"
|
||||
LIBFICL= ${.OBJDIR}/../../ficl32/libficl.a
|
||||
.else
|
||||
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if defined(LOADER_BZIP2_SUPPORT)
|
||||
CFLAGS+= -DLOADER_BZIP2_SUPPORT
|
||||
.endif
|
||||
|
@ -119,8 +108,15 @@ FILES+= loader.rc menu.rc
|
|||
# XXX crt0.o needs to be first for pxeboot(8) to work
|
||||
OBJS= ${BTXCRT}
|
||||
|
||||
DPADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32}
|
||||
LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32}
|
||||
# XXX not happy with this construct, revisit
|
||||
.if ${MACHINE_CPUARCH} == "amd64"
|
||||
FICL= ${LIBFICL32}
|
||||
.else
|
||||
FICL= ${LIBFICL}
|
||||
.endif
|
||||
|
||||
DPADD= ${FICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32}
|
||||
LDADD= ${FICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ SRCS+= pnp.c
|
|||
.endif
|
||||
|
||||
# Forth interpreter
|
||||
.if defined(BOOT_FORTH)
|
||||
.if ${MK_FORTH} != "no"
|
||||
SRCS+= interp_forth.c
|
||||
.include "${BOOTDIR}/ficl.mk"
|
||||
.endif
|
||||
|
|
|
@ -68,14 +68,6 @@ CFLAGS+= -DLOADER_BZIP2_SUPPORT
|
|||
#CFLAGS+= -DLOADER_NFS_SUPPORT
|
||||
#CFLAGS+= -DLOADER_TFTP_SUPPORT
|
||||
|
||||
.if ${MK_FORTH} != "no"
|
||||
# Enable BootForth
|
||||
BOOT_FORTH= yes
|
||||
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../../ficl
|
||||
CFLAGS+= -I${.CURDIR}/../../../ficl/mips64
|
||||
LIBFICL= ${.OBJDIR}/../../../ficl/libficl.a
|
||||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.include "../../../loader.mk"
|
||||
|
||||
|
|
|
@ -81,18 +81,6 @@ LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt/libuboot_fdt.a
|
|||
LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
|
||||
.endif
|
||||
|
||||
.if ${MK_FORTH} != "no"
|
||||
# Enable BootForth
|
||||
BOOT_FORTH= yes
|
||||
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
|
||||
.if ${MACHINE_ARCH:Mmips64*} != ""
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl/mips64
|
||||
.else
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl/mips
|
||||
.endif
|
||||
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
||||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.include "../../loader.mk"
|
||||
CFLAGS+= -I.
|
||||
|
|
|
@ -60,15 +60,6 @@ CFLAGS+= -DLOADER_FDT_SUPPORT
|
|||
LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
|
||||
.endif
|
||||
|
||||
|
||||
.if ${MK_FORTH} != "no"
|
||||
# Enable BootForth
|
||||
BOOT_FORTH= yes
|
||||
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl/powerpc
|
||||
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
||||
.endif
|
||||
|
||||
CFLAGS+= -mcpu=powerpc64
|
||||
|
||||
# Always add MI sources
|
||||
|
|
|
@ -60,16 +60,9 @@ CFLAGS+= -DLOADER_FDT_SUPPORT
|
|||
LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
|
||||
.endif
|
||||
|
||||
.if ${MK_FORTH} != "no"
|
||||
# Enable BootForth
|
||||
BOOT_FORTH= yes
|
||||
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl/powerpc
|
||||
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
||||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.include "../../loader.mk"
|
||||
|
||||
.PATH: ${.CURDIR}/../../../libkern
|
||||
CFLAGS+= -I${.CURDIR}/../../..
|
||||
CFLAGS+= -I.
|
||||
|
|
|
@ -61,14 +61,6 @@ LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
|
|||
.endif
|
||||
|
||||
|
||||
.if ${MK_FORTH} != "no"
|
||||
# Enable BootForth
|
||||
BOOT_FORTH= yes
|
||||
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl/powerpc
|
||||
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
||||
.endif
|
||||
|
||||
CFLAGS+= -mcpu=powerpc64
|
||||
|
||||
# Always add MI sources
|
||||
|
|
|
@ -66,14 +66,6 @@ LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt/libuboot_fdt.a
|
|||
LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
|
||||
.endif
|
||||
|
||||
.if ${MK_FORTH} != "no"
|
||||
# Enable BootForth
|
||||
BOOT_FORTH= yes
|
||||
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl/powerpc
|
||||
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
||||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.include "../../loader.mk"
|
||||
.PATH: ${.CURDIR}/../../../libkern
|
||||
|
|
|
@ -57,14 +57,6 @@ CFLAGS+= -DLOADER_NFS_SUPPORT
|
|||
CFLAGS+= -DLOADER_TFTP_SUPPORT
|
||||
.endif
|
||||
|
||||
.if ${MK_FORTH} != "no"
|
||||
# Enable BootForth
|
||||
BOOT_FORTH= yes
|
||||
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl/sparc64
|
||||
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
||||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.include "../../loader.mk"
|
||||
CFLAGS+= -I.
|
||||
|
|
|
@ -39,14 +39,6 @@ LDFLAGS+= -nostdlib -Wl,-Bsymbolic
|
|||
|
||||
NEWVERSWHAT= "User boot" ${MACHINE_CPUARCH}
|
||||
|
||||
.if ${MK_FORTH} != "no"
|
||||
BOOT_FORTH= yes
|
||||
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl/i386
|
||||
CFLAGS+= -DBF_DICTSIZE=15000
|
||||
LIBFICL= ${.OBJDIR}/../ficl/libficl.a
|
||||
.endif
|
||||
|
||||
.if ${MK_ZFS} != "no"
|
||||
CFLAGS+= -DUSERBOOT_ZFS_SUPPORT
|
||||
LIBZFSBOOT= ${.OBJDIR}/../zfs/libzfsboot.a
|
||||
|
|
Loading…
Reference in a new issue