2001-09-12 08:34:27 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
.PATH: ${.CURDIR}/../common
|
|
|
|
|
|
|
|
PROG= skiload
|
|
|
|
NOMAN=
|
|
|
|
NEWVERSWHAT= "ia64 SKI boot" ${MACHINE_ARCH}
|
|
|
|
|
|
|
|
SRCS+= main.c conf.c
|
|
|
|
|
|
|
|
# Enable BootForth
|
|
|
|
BOOT_FORTH= yes
|
|
|
|
CFLAGS+= -g
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/alpha
|
|
|
|
.if BOOT_FORTH
|
|
|
|
CFLAGS+= -DBOOT_FORTH
|
|
|
|
.if exists(${.OBJDIR}/../../ficl/libficl.a)
|
|
|
|
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
|
|
|
.else
|
|
|
|
LIBFICL= ${.CURDIR}/../../ficl/libficl.a
|
|
|
|
.endif
|
|
|
|
.else
|
|
|
|
LIBFICL=
|
|
|
|
.endif
|
|
|
|
|
2002-03-28 06:52:10 +00:00
|
|
|
# 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
|
|
|
|
|
2001-09-26 00:13:08 +00:00
|
|
|
.if exists(${.OBJDIR}/../libski/libski.a)
|
|
|
|
LIBSKI= ${.OBJDIR}/../libski/libski.a
|
|
|
|
.else
|
2001-09-12 08:34:27 +00:00
|
|
|
LIBSKI= ${.CURDIR}/../libski/libski.a
|
2001-09-26 00:13:08 +00:00
|
|
|
.endif
|
2001-09-12 08:34:27 +00:00
|
|
|
|
|
|
|
# Always add MI sources
|
|
|
|
.PATH: ${.CURDIR}/../../common
|
|
|
|
.include <${.CURDIR}/../../common/Makefile.inc>
|
|
|
|
|
|
|
|
CFLAGS+= -I-
|
|
|
|
CFLAGS+= -I${.CURDIR}/../include
|
|
|
|
CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH}
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../.. -I.
|
|
|
|
CFLAGS+= -I${.CURDIR}/../libski
|
|
|
|
CFLAGS+= -DLOADER
|
2002-03-19 10:51:57 +00:00
|
|
|
CFLAGS+= -ffreestanding
|
2001-09-12 08:34:27 +00:00
|
|
|
|
2001-09-26 00:13:08 +00:00
|
|
|
LDFLAGS= -nostdlib -T ${.CURDIR}/ldscript.ia64
|
2001-09-12 08:34:27 +00:00
|
|
|
|
|
|
|
CLEANFILES+= vers.c vers.o ${PROG}.list
|
|
|
|
CLEANFILES+= loader.help
|
|
|
|
CLEANFILES+= machine
|
|
|
|
|
|
|
|
all: ${PROG}
|
|
|
|
|
|
|
|
vers.o: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
|
|
|
|
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
|
|
|
|
${CC} -c vers.c
|
|
|
|
|
|
|
|
${PROG}.help: help.common help.efi
|
|
|
|
cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk \
|
|
|
|
> ${.TARGET}
|
|
|
|
|
|
|
|
beforeinstall:
|
|
|
|
.if exists(${.OBJDIR}/loader.help)
|
|
|
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
|
|
|
|
${.OBJDIR}/${PROG}.help ${DESTDIR}/boot
|
|
|
|
.else
|
|
|
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
|
|
|
|
${.CURDIR}/${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
|
|
|
|
|
2002-03-28 06:52:10 +00:00
|
|
|
${PROG}: ${OBJS} ${LIBFICL} ${LIBSKI} vers.o
|
2001-09-12 08:34:27 +00:00
|
|
|
${LD} ${LDFLAGS} -o ${PROG} -M \
|
|
|
|
${OBJS} vers.o \
|
|
|
|
${LIBFICL} ${LIBSTAND} ${LIBSKI} ${LIBSTAND} \
|
|
|
|
> ${.OBJDIR}/${PROG}.list
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
|
|
|
|
beforedepend ${OBJS}: machine
|