summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-02-09 14:17:02 +0000
committerru <ru@FreeBSD.org>2004-02-09 14:17:02 +0000
commit7d2a30ec45c5332e217c7c4c3602909138da8206 (patch)
treef26e9fe565c31b130d64997f1f0047b5e1c8d8fd /sys/boot
parent5d659b9c9153cac8ef26ac894913d84a6772d779 (diff)
downloadFreeBSD-src-7d2a30ec45c5332e217c7c4c3602909138da8206.zip
FreeBSD-src-7d2a30ec45c5332e217c7c4c3602909138da8206.tar.gz
MFi386.
- Factor out common settings and put them in an upper level Makefile.inc. - Properly use PROG for real programs, not their products. - Further reduce diffs to i386 versions. Tested on: sparc64 (panther)
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/sparc64/Makefile.inc5
-rw-r--r--sys/boot/sparc64/boot1/Makefile31
-rw-r--r--sys/boot/sparc64/loader/Makefile44
3 files changed, 28 insertions, 52 deletions
diff --git a/sys/boot/sparc64/Makefile.inc b/sys/boot/sparc64/Makefile.inc
new file mode 100644
index 0000000..f2170c8
--- /dev/null
+++ b/sys/boot/sparc64/Makefile.inc
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+BINDIR?= /boot
+CFLAGS+= -ffreestanding
+LDFLAGS+= -nostdlib
diff --git a/sys/boot/sparc64/boot1/Makefile b/sys/boot/sparc64/boot1/Makefile
index b77671b..6ad039b 100644
--- a/sys/boot/sparc64/boot1/Makefile
+++ b/sys/boot/sparc64/boot1/Makefile
@@ -1,30 +1,27 @@
# $FreeBSD$
-PROG= boot1
-SRCS= _start.S boot1.c
+PROG= boot1.elf
+INTERNALPROG=
NOMAN=
-STRIP=
-BINDIR?= /boot
-BINMODE= 444
+FILES= boot1
+SRCS= _start.S boot1.c
-BOOTBLOCKBASE= 0x4000
+BOOTBLOCKBASE= 0x4000
-CFLAGS= -ffreestanding -mcmodel=medlow -Os -I../.. -I../../common -I${.CURDIR}/../../common
+CFLAGS= -mcmodel=medlow -Os -I${.CURDIR}/../../common
+LDFLAGS=-N -Ttext ${BOOTBLOCKBASE}
-boot1.elf: _start.o boot1.o
- ${LD} -N -Ttext ${BOOTBLOCKBASE} -o ${.TARGET} ${.ALLSRC}
-
-boot1.aout: boot1.elf
- elf2aout -o ${.TARGET} ${.ALLSRC}
-
-boot1.o: ${.CURDIR}/../../common/ufsread.c
-
-# Construct boot1. disklabel expects it to contain zeroed-out space for the
+# Construct boot1. sunlabel expects it to contain zeroed-out space for the
# label, and to be of the correct size.
boot1: boot1.aout
dd if=/dev/zero of=${.TARGET} bs=512 count=16
dd if=boot1.aout of=${.TARGET} bs=512 oseek=1 conv=notrunc
-CLEANFILES+= boot1.elf boot1.aout
+CLEANFILES= boot1.aout
+
+boot1.aout: boot1.elf
+ elf2aout -o ${.TARGET} ${.ALLSRC}
+
+boot1.o: ${.CURDIR}/../../common/ufsread.c
.include <bsd.prog.mk>
diff --git a/sys/boot/sparc64/loader/Makefile b/sys/boot/sparc64/loader/Makefile
index b6f02e1..6732494 100644
--- a/sys/boot/sparc64/loader/Makefile
+++ b/sys/boot/sparc64/loader/Makefile
@@ -1,10 +1,8 @@
# $FreeBSD$
-BASE= loader
-PROG= ${BASE}
+PROG= loader
STRIP=
NEWVERSWHAT= "bootstrap loader" sparc64
-BINDIR?= /boot
INSTALLFLAGS= -b
# Architecture-specific loader code
@@ -48,66 +46,42 @@ CFLAGS+= -DLOADER_TFTP_SUPPORT
# Enable BootForth
BOOT_FORTH= yes
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/sparc64
-.if exists(${.OBJDIR}/../../ficl/libficl.a)
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
-.else
-LIBFICL= ${.CURDIR}/../../ficl/libficl.a
-.endif
.endif
# Always add MI sources
.PATH: ${.CURDIR}/../../common
-.include <${.CURDIR}/../../common/Makefile.inc>
+.include "${.CURDIR}/../../common/Makefile.inc"
CFLAGS+= -I${.CURDIR}/../../common
-CFLAGS+= -I${.CURDIR}/../../.. -I.
+CFLAGS+= -I.
-CLEANFILES+= vers.c ${BASE}.help
+CLEANFILES+= vers.c loader.help
-CFLAGS+= -ffreestanding
-LDFLAGS= -nostdlib -static
+LDFLAGS= -static
# Openfirmware standalone support library
LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
CFLAGS+= -I${.CURDIR}/../../ofw/libofw/
# where to get libstand from
-#XXX need a better way to do this
-LIBSTAND= ${.CURDIR}/../../../../lib/libstand/libstand.a
-.if !exists(${LIBSTAND})
-LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a
-.if !exists(${LIBSTAND})
-LIBSTAND= -lstand
-.endif
-.endif
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
-LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
+DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
+LDADD= ${LIBFICL} ${LIBOFW} -lstand
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
-${BASE}.help: help.common help.sparc64
+loader.help: help.common help.sparc64
cat ${.ALLSRC} | \
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
.PATH: ${.CURDIR}/../../forth
-FILES= ${BASE}.help loader.4th support.4th loader.conf
+FILES= loader.help loader.4th support.4th loader.conf
FILESDIR_loader.conf= /boot/defaults
.if !exists(${DESTDIR}/boot/loader.rc)
FILES+= loader.rc
.endif
-# There are no things relevant to all boot parts of FreeBSD/sparc64 yet.
-#.include <${.CURDIR}/../Makefile.inc>
-
.include <bsd.prog.mk>
-
-.if exists(${.CURDIR}/../../../sparc64/include)
-beforedepend ${OBJS}: machine
-
-machine:
- ln -sf ${.CURDIR}/../../../sparc64/include machine
-.endif
-
-CLEANFILES+= machine
OpenPOWER on IntegriCloud