summaryrefslogtreecommitdiffstats
path: root/sys/boot/ia64/skiload/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/ia64/skiload/Makefile')
-rw-r--r--sys/boot/ia64/skiload/Makefile81
1 files changed, 81 insertions, 0 deletions
diff --git a/sys/boot/ia64/skiload/Makefile b/sys/boot/ia64/skiload/Makefile
new file mode 100644
index 0000000..d3e6cf3
--- /dev/null
+++ b/sys/boot/ia64/skiload/Makefile
@@ -0,0 +1,81 @@
+# $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
+
+LIBSTAND= -lstand
+LIBSKI= ${.CURDIR}/../libski/libski.a
+
+# 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
+
+LDFLAGS= -nostdlib -T ldscript.ia64
+
+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
+
+${PROG}: ${OBJS} ${LIBFICL} ${LIBSTAND} ${LIBSKI} vers.o
+ ${LD} ${LDFLAGS} -o ${PROG} -M \
+ ${OBJS} vers.o \
+ ${LIBFICL} ${LIBSTAND} ${LIBSKI} ${LIBSTAND} \
+ > ${.OBJDIR}/${PROG}.list
+
+.include <bsd.prog.mk>
+
+beforedepend ${OBJS}: machine
OpenPOWER on IntegriCloud