Centralize several variables.

MK_CTF, MK_SSP, MK_PROFILE, NO_PIC, and INTERNALLIB are always the
same, so set them in defs.mk. MAN= is common, so set it here too.
This removes a lot of boring repetition from the Makefiles that added
almost no value.
This commit is contained in:
Warner Losh 2018-02-02 06:32:26 +00:00
parent 0fd19f4a95
commit 8299b37f85
35 changed files with 7 additions and 65 deletions

View File

@ -7,6 +7,13 @@ WARNS?=1
.if !defined(__BOOT_DEFS_MK__)
__BOOT_DEFS_MK__=${MFILE}
MK_CTF= no
MK_SSP= no
MK_PROFILE= no
NO_PIC=
MAN=
INTERNALLIB=
BOOTSRC= ${SRCTOP}/stand
EFISRC= ${BOOTSRC}/efi
EFIINC= ${EFISRC}/include

View File

@ -1,12 +1,7 @@
# $FreeBSD$
MAN=
.include <bsd.init.mk>
MK_SSP= no
MK_FORTH= no
PROG= boot1.sym
INTERNALPROG=
WARNS?= 6

View File

@ -5,7 +5,6 @@
.PATH: ${LDRSRC}
LIB= efi_fdt
INTERNALLIB=
WARNS?= 6
SRCS= efi_fdt.c

View File

@ -7,7 +7,6 @@
.endif
LIB= efi
INTERNALLIB=
WARNS?= 2
SRCS= delay.c devpath.c efi_console.c efichar.c efinet.c efipart.c env.c errno.c \

View File

@ -1,7 +1,5 @@
# $FreeBSD$
MAN=
LOADER_NET_SUPPORT?= yes
LOADER_MSDOS_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
@ -10,8 +8,6 @@ LOADER_EXT2FS_SUPPORT?= no
.include <bsd.init.mk>
MK_SSP= no
PROG= loader.sym
INTERNALPROG=
WARNS?= 3

View File

@ -5,7 +5,6 @@
.PATH: ${SYSDIR}/contrib/libfdt/
LIB= fdt
INTERNALLIB=
# Vendor sources of libfdt.
SRCS+= fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c \

View File

@ -20,7 +20,6 @@ PROG= testmain
.include <bsd.prog.mk>
.else
LIB= ficl
INTERNALLIB=
.include <bsd.lib.mk>
.endif

View File

@ -1,16 +1,11 @@
# $FreeBSD$
# libgeliboot
MAN=
DO32=1
.include <bsd.init.mk>
MK_SSP= no
LIB= geliboot
INTERNALLIB=
MK_PROFILE= no
NO_PIC=
# Our password input method
SRCS+= pwgets.c

View File

@ -3,7 +3,6 @@
PROG?= boot0
STRIP=
BINMODE=${NOBINMODE}
MAN=
SRCS= ${PROG}.S
# Additional options that you can specify with make OPTS="..."

View File

@ -4,7 +4,6 @@
PROG= btx
INTERNALPROG=
MAN=
SRCS= btx.S
.if defined(BOOT_BTX_NOHANG)

View File

@ -4,7 +4,6 @@
PROG= btxldr
INTERNALPROG=
MAN=
SRCS= btxldr.S
CFLAGS+=-DLOADER_ADDRESS=${LOADER_ADDRESS}

View File

@ -4,7 +4,6 @@
PROG= crt0.o
INTERNALPROG=
MAN=
SRCS= btxcsu.S btxsys.s btxv86.s
CFLAGS+=-I${BOOTSRC}/i386/common
LDFLAGS+=-Wl,-r

View File

@ -5,7 +5,6 @@
PROG= cdboot
STRIP=
BINMODE=${NOBINMODE}
MAN=
SRCS= ${PROG}.S
CFLAGS+=-I${BOOTSRC}/i386/common

View File

@ -6,7 +6,6 @@ PROG= kgzldr.o
STRIP=
BINMODE=${LIBMODE}
BINDIR= ${LIBDIR}
MAN=
SRCS= start.s boot.c inflate.c lib.c crt.s sio.s
CFLAGS= -Os

View File

@ -3,7 +3,6 @@
.include <bsd.init.mk>
LIB= firewire
INTERNALLIB=
.PATH: ${SYSDIR}/dev/dcons ${SYSDIR}/dev/firewire
SRCS+= firewire.c fwohci.c dconsole.c

View File

@ -5,7 +5,6 @@ HAVE_GELI= yes
.include <bsd.init.mk>
LIB= i386
INTERNALLIB=
SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \
biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \

View File

@ -14,11 +14,8 @@ LOADER_BZIP2_SUPPORT?= yes
.include <bsd.init.mk>
MK_SSP= no
LOADER?= loader
PROG= ${LOADER}.sym
MAN=
INTERNALPROG=
NEWVERSWHAT?= "bootstrap loader" x86
VERSION_FILE= ${.CURDIR}/../loader/version

View File

@ -3,7 +3,6 @@
PROG= mbr
STRIP=
BINMODE=${NOBINMODE}
MAN=
SRCS= ${PROG}.s
# MBR flags: 0x80 -- try packet interface (also known as EDD or LBA)

View File

@ -3,7 +3,6 @@
PROG= pmbr
STRIP=
BINMODE=${NOBINMODE}
MAN=
SRCS= ${PROG}.s
ORG= 0x600

View File

@ -6,17 +6,12 @@
# quite large.
#
MK_PROFILE= no
MK_SSP= no
.include <bsd.init.mk>
INTERNALLIB=
LIBSA_CPUARCH?=${MACHINE_CPUARCH}
LIBC_SRC= ${SRCTOP}/lib/libc
LIB?= sa
NO_PIC=
# standalone components and stuff we have modified locally
SRCS+= gzguts.h zutil.h __main.c abort.c assert.c bcd.c environment.c getopt.c gets.c \

View File

@ -43,8 +43,6 @@ SRCS= relocate.S \
cfi.c \
sdcard.c
MAN=
AFLAGS= -G0
CFLAGS+= -I${LDRSRC} \

View File

@ -38,9 +38,6 @@ LOADER_BZIP2_SUPPORT?= yes
.include <bsd.init.mk>
MK_SSP= no
MAN=
PROG?= loader
NEWVERSWHAT= "BERI loader" ${MACHINE_CPUARCH}
INSTALLFLAGS= -b

View File

@ -3,7 +3,6 @@
.include <bsd.init.mk>
LIB= ofw
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 \

View File

@ -9,8 +9,6 @@ INSTALLFLAGS= -b
FILES= boot1.hfs
SRCS= boot1.c ashldi3.c syncicache.c
MAN=
CFLAGS+=-I${LDRSRC}
LDFLAGS=-nostdlib -static -Wl,-N

View File

@ -11,8 +11,6 @@ LOADER_GZIP_SUPPORT?= yes
LOADER_BZIP2_SUPPORT?= no
.include <bsd.init.mk>
MK_SSP= no
MAN=
PROG= loader.kboot
NEWVERSWHAT= "kboot loader" ${MACHINE_ARCH}

View File

@ -11,8 +11,6 @@ LOADER_GZIP_SUPPORT?= yes
LOADER_BZIP2_SUPPORT?= no
.include <bsd.init.mk>
MK_SSP= no
MAN=
PROG= loader
NEWVERSWHAT= "Open Firmware loader" ${MACHINE_ARCH}

View File

@ -14,7 +14,6 @@ LOADER_BZIP2_SUPPORT?= no
PROG= ubldr
NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH}
INSTALLFLAGS= -b
MAN=
# Architecture-specific loader code
SRCS= start.S conf.c vers.c

View File

@ -4,7 +4,6 @@
PROG= boot1.elf
INTERNALPROG=
MAN=
FILES?= boot1
SRCS= _start.s boot1.c
CLEANFILES+=${FILES} boot1.aout

View File

@ -13,8 +13,6 @@ LOADER_BZIP2_SUPPORT?= no
LOADER_DEBUG?= no
.include <bsd.init.mk>
MK_SSP= no
MAN=
PROG?= loader
NEWVERSWHAT?= "bootstrap loader" sparc64

View File

@ -5,7 +5,6 @@
.PATH: ${LDRSRC}
LIB= uboot_fdt
INTERNALLIB=
WARNS?= 2
SRCS= uboot_fdt.c

View File

@ -5,7 +5,6 @@
.PATH: ${LDRSRC}
LIB= uboot
INTERNALLIB=
WARNS?= 2
SRCS= console.c copy.c devicename.c elf_freebsd.c glue.c

View File

@ -32,7 +32,6 @@
.PATH: ${.CURDIR}
PROG= usbloader
MAN=
SRCS=
CFLAGS+= -Wall

View File

@ -1,10 +1,6 @@
# $FreeBSD$
MAN=
.include <bsd.init.mk>
MK_SSP= no
PROG= test
INTERNALPROG=

View File

@ -1,7 +1,5 @@
# $FreeBSD$
MAN=
LOADER_MSDOS_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= no
@ -9,10 +7,7 @@ LOADER_EXT2FS_SUPPORT?= no
.include <bsd.init.mk>
MK_SSP= no
SHLIB_NAME= userboot.so
MK_CTF= no
STRIP=
LIBDIR= /boot

View File

@ -3,7 +3,6 @@
.include <bsd.init.mk>
LIB= zfsboot
INTERNALLIB=
.PATH: ${ZFSSRC}
SRCS+= zfs.c skein.c skein_block.c