From 01c0b884af735dfffc23e77e18fe2629b55063af Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sat, 6 Apr 2002 04:33:53 +0000 Subject: [PATCH] Make it a bit closer to the EFI build and tie up some loose ends. --- sys/boot/ia64/Makefile.inc | 4 ++++ sys/boot/ia64/libski/Makefile | 1 - sys/boot/ia64/ski/Makefile | 16 ++++------------ sys/boot/ia64/skiload/Makefile | 16 ++++------------ 4 files changed, 12 insertions(+), 25 deletions(-) create mode 100644 sys/boot/ia64/Makefile.inc diff --git a/sys/boot/ia64/Makefile.inc b/sys/boot/ia64/Makefile.inc new file mode 100644 index 000000000000..81a6d5a2509f --- /dev/null +++ b/sys/boot/ia64/Makefile.inc @@ -0,0 +1,4 @@ +# $FreeBSD$ + +# Options used when building standalone components +CFLAGS+= -ffreestanding diff --git a/sys/boot/ia64/libski/Makefile b/sys/boot/ia64/libski/Makefile index 7b20910f916b..30bb7e5ce654 100644 --- a/sys/boot/ia64/libski/Makefile +++ b/sys/boot/ia64/libski/Makefile @@ -15,7 +15,6 @@ CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH} CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ CFLAGS+= -I${.CURDIR}/../../efi/include CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_ARCH} -CFLAGS+= -ffreestanding # Pick up the bootstrap header for some interface items CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. diff --git a/sys/boot/ia64/ski/Makefile b/sys/boot/ia64/ski/Makefile index 71a2263b9933..d340c2e8cd04 100644 --- a/sys/boot/ia64/ski/Makefile +++ b/sys/boot/ia64/ski/Makefile @@ -24,13 +24,10 @@ LIBFICL= .endif # where to get libstand from -#XXX need a better way to do this -LIBSTAND= ${.CURDIR}/../../../../lib/libstand/libstand.a -.if !exists(${LIBSTAND}) +.if exists(${.OBJDIR}/../../../../lib/libstand/libstand.a) LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a -.if !exists(${LIBSTAND}) -LIBSTAND= -lstand -.endif +.else +LIBSTAND= ${.CURDIR}/../../../../lib/libstand/libstand.a .endif .if exists(${.OBJDIR}/../libski/libski.a) @@ -50,7 +47,6 @@ CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR} CFLAGS+= -I${.CURDIR}/../../.. -I. CFLAGS+= -I${.CURDIR}/../libski CFLAGS+= -DLOADER -CFLAGS+= -ffreestanding LDFLAGS= -nostdlib -T ${.CURDIR}/ldscript.ia64 @@ -74,14 +70,10 @@ beforeinstall: ${.OBJDIR}/${PROG}.help ${DESTDIR}/boot .endif -# Other fragments still to be brought in from ../Makfile.booters? -start.o: ${.CURDIR}/../libefi/arch/${MACHINE_ARCH}/start.S - ${CC} -c ${CFLAGS} ${.IMPSRC} - machine: ln -sf ${.CURDIR}/../../../${MACHINE_ARCH}/include machine -${PROG}: ${OBJS} ${LIBFICL} ${LIBSKI} vers.o +${PROG}: ${OBJS} ${LIBFICL} ${LIBSKI} ${LIBSTAND} vers.o ${LD} ${LDFLAGS} -o ${PROG} -M \ ${OBJS} vers.o \ ${LIBFICL} ${LIBSTAND} ${LIBSKI} ${LIBSTAND} \ diff --git a/sys/boot/ia64/skiload/Makefile b/sys/boot/ia64/skiload/Makefile index 71a2263b9933..d340c2e8cd04 100644 --- a/sys/boot/ia64/skiload/Makefile +++ b/sys/boot/ia64/skiload/Makefile @@ -24,13 +24,10 @@ LIBFICL= .endif # where to get libstand from -#XXX need a better way to do this -LIBSTAND= ${.CURDIR}/../../../../lib/libstand/libstand.a -.if !exists(${LIBSTAND}) +.if exists(${.OBJDIR}/../../../../lib/libstand/libstand.a) LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a -.if !exists(${LIBSTAND}) -LIBSTAND= -lstand -.endif +.else +LIBSTAND= ${.CURDIR}/../../../../lib/libstand/libstand.a .endif .if exists(${.OBJDIR}/../libski/libski.a) @@ -50,7 +47,6 @@ CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR} CFLAGS+= -I${.CURDIR}/../../.. -I. CFLAGS+= -I${.CURDIR}/../libski CFLAGS+= -DLOADER -CFLAGS+= -ffreestanding LDFLAGS= -nostdlib -T ${.CURDIR}/ldscript.ia64 @@ -74,14 +70,10 @@ beforeinstall: ${.OBJDIR}/${PROG}.help ${DESTDIR}/boot .endif -# Other fragments still to be brought in from ../Makfile.booters? -start.o: ${.CURDIR}/../libefi/arch/${MACHINE_ARCH}/start.S - ${CC} -c ${CFLAGS} ${.IMPSRC} - machine: ln -sf ${.CURDIR}/../../../${MACHINE_ARCH}/include machine -${PROG}: ${OBJS} ${LIBFICL} ${LIBSKI} vers.o +${PROG}: ${OBJS} ${LIBFICL} ${LIBSKI} ${LIBSTAND} vers.o ${LD} ${LDFLAGS} -o ${PROG} -M \ ${OBJS} vers.o \ ${LIBFICL} ${LIBSTAND} ${LIBSKI} ${LIBSTAND} \