dafe1ac0a0
FICL. bootforth is now live on the Alpha! **BEWARE** - you *MUST* build and install a current libstand or you will most likely get zfree() panics at loader startup. We should now be able to set up the loader.conf stuff on the Alpha too.
95 lines
2.3 KiB
Makefile
95 lines
2.3 KiB
Makefile
# $FreeBSD$
|
|
#
|
|
# Common Alpha loader build rules
|
|
|
|
.PATH: ${.CURDIR}/../common
|
|
|
|
# Alpha-specific bootstrap sources
|
|
SRCS+= main.c conf.c
|
|
.if ${BASE} == netboot
|
|
SRCS+= dev_net.c
|
|
.endif
|
|
|
|
# Enable BootForth
|
|
BOOT_FORTH= yes
|
|
CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/alpha
|
|
CFLAGS+= -DBOOT_FORTH
|
|
.if exists(${.OBJDIR}/../../ficl/libficl.a)
|
|
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
|
.else
|
|
LIBFICL= ${.CURDIR}/../../ficl/libficl.a
|
|
.endif
|
|
|
|
# Always add MI sources
|
|
.PATH: ${.CURDIR}/../../common
|
|
.include <${.CURDIR}/../../common/Makefile.inc>
|
|
CFLAGS+= -mno-fp-regs
|
|
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}
|
|
CFLAGS+= -I${.CURDIR}/../../.. -I.
|
|
CFLAGS+= -DPRIMARY_LOAD_ADDRESS=${PRIMARY_LOAD_ADDRESS} \
|
|
-DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS}
|
|
|
|
CLEANFILES+= setdef0.c setdef0.o setdef1.c setdef1.o setdefs.h start.o \
|
|
vers.c vers.o ${BASE} ${BASE}.sym ${BASE}.list
|
|
|
|
CFLAGS+= -Wall
|
|
|
|
CFLAGS+= -I${LIBSTANDDIR}
|
|
CFLAGS+= -I${.CURDIR}/..
|
|
CRT= start.o
|
|
STRIP=
|
|
BINDIR?= /boot
|
|
|
|
all: ${BASE}
|
|
|
|
vers.o: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
|
|
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
|
|
${CC} -c vers.c
|
|
|
|
${BASE}: ${BASE}.sym ${BASE}.help
|
|
objcopy -O binary ${BASE}.sym ${BASE}
|
|
|
|
${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o setdef0.o setdef1.o
|
|
${LD} -o ${BASE}.sym -M -e start -N -Ttext ${LOAD_ADDRESS} \
|
|
${CRT} setdef0.o ${OBJS} setdef1.o vers.o \
|
|
-L${DESTDIR}${LIBDIR} ${LIBSTAND} ${LIBALPHA} ${LIBFICL} ${LIBSTAND} \
|
|
>${.OBJDIR}/${BASE}.list
|
|
|
|
${BASE}.help: help.common help.alpha
|
|
cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
|
|
|
beforeinstall:
|
|
.if exists(${DESTDIR}/boot/${BASE})
|
|
mv ${DESTDIR}/boot/${BASE} ${DESTDIR}/boot/${BASE}.old
|
|
.endif
|
|
.ifdef INSTALL_HELP
|
|
.if exists(${.OBJDIR}/${BASE}.help)
|
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
|
|
${.OBJDIR}/${BASE}.help ${DESTDIR}/boot
|
|
.else
|
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
|
|
${.CURDIR}/${BASE}.help ${DESTDIR}/boot
|
|
.endif
|
|
.endif
|
|
|
|
start.o: ${.CURDIR}/../libalpha/start.S
|
|
${CC} -c ${CFLAGS} $<
|
|
|
|
setdef0.o: setdefs.h
|
|
|
|
setdef1.o: setdefs.h
|
|
|
|
machine:
|
|
ln -sf ${.CURDIR}/../../../alpha/include machine
|
|
|
|
CLEANFILES+= machine
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
.ORDER: setdefs.h setdef0.c setdef1.c
|
|
setdefs.h setdef0.c setdef1.c: ${OBJS}
|
|
@echo Generating linker sets
|
|
@gensetdefs ${OBJS}
|
|
|
|
beforedepend ${OBJS}: machine
|