freebsd-nq/sys/boot/alpha/common/Makefile.common

70 lines
1.6 KiB
Makefile
Raw Normal View History

# $FreeBSD$
#
# Common Alpha loader build rules
2004-02-11 22:01:17 +00:00
.PATH: ${.CURDIR}/../common
PROG= ${BOOT}.sym
INTERNALPROG=
# 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
2004-02-11 22:01:17 +00:00
.PATH: ${.CURDIR}/../libalpha
.if !defined(NOFORTH)
# Enable BootForth
BOOT_FORTH= yes
CFLAGS+= -DBOOT_FORTH
CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/alpha
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
.endif
# Always add MI sources
2004-02-11 22:01:17 +00:00
.PATH: ${.CURDIR}/../../common
.include "${.CURDIR}/../../common/Makefile.inc"
CFLAGS+= -I${.CURDIR}/../../common
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
CFLAGS+= -Wall
CFLAGS+= -I${LIBSTANDDIR}
CFLAGS+= -I${.CURDIR}/..
2004-02-11 22:01:17 +00:00
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
LDFLAGS=-e start -Ttext ${LOAD_ADDRESS} -T ${.CURDIR}/../common/ldscript
2004-02-11 22:01:17 +00:00
FILES= ${BOOT}
# XXX INSTALLFLAGS_${BOOT}= -b
FILESMODE_${BOOT}= ${BINMODE} -b
2004-02-11 22:01:17 +00:00
${BOOT}: ${BOOT}.sym
objcopy -O binary ${BOOT}.sym ${.TARGET}
2004-02-11 22:01:17 +00:00
DPADD= ${LIBALPHA} ${LIBFICL} ${LIBSTAND}
LDADD= ${LIBALPHA} ${LIBFICL} -lstand
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
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
.include <bsd.prog.mk>