1999-09-06 08:38:10 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# Common Alpha loader build rules
|
|
|
|
|
2004-02-11 22:01:17 +00:00
|
|
|
.PATH: ${.CURDIR}/../common
|
|
|
|
|
|
|
|
PROG= ${BOOT}.sym
|
|
|
|
INTERNALPROG=
|
1999-09-06 08:38:10 +00:00
|
|
|
|
|
|
|
# Alpha-specific bootstrap sources
|
2004-02-11 22:01:17 +00:00
|
|
|
SRCS= start.S main.c conf.c vers.c
|
|
|
|
.if ${BOOT} == "netboot"
|
1999-10-09 12:29:42 +00:00
|
|
|
SRCS+= dev_net.c
|
|
|
|
.endif
|
1999-09-06 08:38:10 +00:00
|
|
|
|
2004-02-11 22:01:17 +00:00
|
|
|
.PATH: ${.CURDIR}/../libalpha
|
|
|
|
|
2003-02-26 06:18:52 +00:00
|
|
|
.if !defined(NOFORTH)
|
1999-12-27 09:20:33 +00:00
|
|
|
# Enable BootForth
|
2000-05-12 22:45:16 +00:00
|
|
|
BOOT_FORTH= yes
|
|
|
|
CFLAGS+= -DBOOT_FORTH
|
2003-02-26 06:18:52 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/alpha
|
2000-05-12 22:45:16 +00:00
|
|
|
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
2003-02-26 06:18:52 +00:00
|
|
|
.endif
|
1999-12-27 09:20:33 +00:00
|
|
|
|
1999-09-06 08:38:10 +00:00
|
|
|
# Always add MI sources
|
2004-02-11 22:01:17 +00:00
|
|
|
.PATH: ${.CURDIR}/../../common
|
|
|
|
.include "${.CURDIR}/../../common/Makefile.inc"
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../common
|
1999-09-06 08:38:10 +00:00
|
|
|
CFLAGS+= -DPRIMARY_LOAD_ADDRESS=${PRIMARY_LOAD_ADDRESS} \
|
|
|
|
-DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS}
|
|
|
|
|
2004-02-11 22:01:17 +00:00
|
|
|
CLEANFILES+= vers.c ${BOOT} ${BOOT}.sym
|
1999-09-06 08:38:10 +00:00
|
|
|
|
|
|
|
CFLAGS+= -Wall
|
|
|
|
|
|
|
|
CFLAGS+= -I${LIBSTANDDIR}
|
|
|
|
CFLAGS+= -I${.CURDIR}/..
|
|
|
|
|
2004-02-11 22:01:17 +00:00
|
|
|
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
|
1999-09-06 08:38:10 +00:00
|
|
|
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
|
|
|
|
|
2004-08-22 00:26:01 +00:00
|
|
|
LDFLAGS=-e start -Ttext ${LOAD_ADDRESS} -T ${.CURDIR}/../common/ldscript
|
1999-09-06 08:38:10 +00:00
|
|
|
|
2004-02-11 22:01:17 +00:00
|
|
|
FILES= ${BOOT}
|
|
|
|
# XXX INSTALLFLAGS_${BOOT}= -b
|
|
|
|
FILESMODE_${BOOT}= ${BINMODE} -b
|
2000-05-12 23:22:09 +00:00
|
|
|
|
2004-02-11 22:01:17 +00:00
|
|
|
${BOOT}: ${BOOT}.sym
|
|
|
|
objcopy -O binary ${BOOT}.sym ${.TARGET}
|
1999-09-06 08:38:10 +00:00
|
|
|
|
2004-02-11 22:01:17 +00:00
|
|
|
DPADD= ${LIBALPHA} ${LIBFICL} ${LIBSTAND}
|
|
|
|
LDADD= ${LIBALPHA} ${LIBFICL} -lstand
|
1999-09-06 08:38:10 +00:00
|
|
|
|
2004-02-11 22:01:17 +00:00
|
|
|
.if defined(INSTALL_HELP)
|
|
|
|
FILES+= ${BOOT}.help
|
|
|
|
CLEANFILES+= ${BOOT}.help
|
|
|
|
${BOOT}.help: help.common help.alpha
|
|
|
|
cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
|
|
|
.endif
|
1999-09-06 08:38:10 +00:00
|
|
|
|
2004-02-11 22:01:17 +00:00
|
|
|
.PATH: ${.CURDIR}/../../forth
|
|
|
|
.if !exists(${DESTDIR}/boot/loader.rc)
|
|
|
|
FILES+= loader.rc
|
|
|
|
.endif
|
|
|
|
FILES+= loader.4th support.4th loader.conf
|
|
|
|
FILESDIR_loader.conf= /boot/defaults
|
1999-09-06 08:38:10 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|