summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/loader
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-02-09 14:11:58 +0000
committerru <ru@FreeBSD.org>2004-02-09 14:11:58 +0000
commit5d659b9c9153cac8ef26ac894913d84a6772d779 (patch)
tree8ce2d80f6b9077e83a792c0cc593b1328ab46eb6 /sys/boot/i386/loader
parent951150d25a152b9b7302661fb693e51d0ffe17f1 (diff)
downloadFreeBSD-src-5d659b9c9153cac8ef26ac894913d84a6772d779.zip
FreeBSD-src-5d659b9c9153cac8ef26ac894913d84a6772d779.tar.gz
- Factor out -nostdlib to an upper level Makefile.inc.
- Now that bsd.prog.mk deals with programs linked with -nostdlib better, and has a notion of an "internal" program, use PROG where possible. This has a good impact on the contents of .depend files and causes programs to be linked with cc(1). XXX: boot2 couldn't be converted as it's actually two programs. Tested on: i386, amd64
Diffstat (limited to 'sys/boot/i386/loader')
-rw-r--r--sys/boot/i386/loader/Makefile21
1 files changed, 8 insertions, 13 deletions
diff --git a/sys/boot/i386/loader/Makefile b/sys/boot/i386/loader/Makefile
index da6f696..61871ed 100644
--- a/sys/boot/i386/loader/Makefile
+++ b/sys/boot/i386/loader/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+PROG= loader.sym
+INTERNALPROG=
NEWVERSWHAT= "bootstrap loader" i386
# architecture-specific loader code
@@ -20,11 +22,7 @@ HAVE_ISABUS= yes
# Enable BootForth
BOOT_FORTH= yes
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386
-.if exists(${.OBJDIR}/../../ficl/libficl.a)
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
-.else
-LIBFICL= ${.CURDIR}/../../ficl/libficl.a
-.endif
.endif
.if defined(LOADER_BZIP2_SUPPORT)
@@ -40,10 +38,10 @@ CFLAGS+= -DLOADER_GZIP_SUPPORT
CFLAGS+= -I${.CURDIR}/../../common
CFLAGS+= -I.
-CLEANFILES= vers.c loader loader.list loader.bin loader.sym loader.help
+CLEANFILES= vers.c loader loader.list loader.bin loader.help
CFLAGS+= -Wall
-LDFLAGS= -nostdlib -static -Ttext 0x0
+LDFLAGS= -static -Ttext 0x0
# i386 standalone support library
LIBI386= ${.OBJDIR}/../libi386/libi386.a
@@ -62,7 +60,7 @@ CFLAGS+= -I${.CURDIR}/../btx/lib
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
-loader: loader.bin ${BTXLDR} ${BTXKERN} ${BTXCRT}
+loader: loader.bin ${BTXLDR} ${BTXKERN}
btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
-b ${BTXKERN} loader.bin
# /usr/bin/kzip ${.TARGET}
@@ -86,11 +84,10 @@ FILESDIR_loader.conf= /boot/defaults
FILES+= ${.CURDIR}/loader.rc
.endif
-OBJS= ${SRCS:N*.h:R:S/$/.o/g}
+DPADD= ${BTXCRT} ${LIBFICL} ${LIBI386} ${LIBSTAND}
+LDADD= ${BTXCRT} ${LIBFICL} ${LIBI386} -lstand
-loader.sym: ${OBJS} ${LIBFICL} ${LIBI386} ${LIBSTAND}
- ${CC} ${LDFLAGS} -o ${.TARGET} ${BTXCRT} ${OBJS} \
- ${LIBFICL} ${LIBI386} ${LIBSTAND}
+.include <bsd.prog.mk>
.if ${MACHINE_ARCH} == "amd64"
beforedepend ${OBJS}: machine
@@ -98,5 +95,3 @@ CLEANFILES+= machine
machine:
ln -sf ${.CURDIR}/../../../i386/include machine
.endif
-
-.include <bsd.prog.mk>
OpenPOWER on IntegriCloud