1999-08-28 01:08:13 +00:00
|
|
|
# $FreeBSD$
|
1999-02-03 08:39:09 +00:00
|
|
|
|
2000-03-31 16:03:02 +00:00
|
|
|
M4?= m4
|
|
|
|
M4FLAGS+= -DLOADER_ADDRESS=${LOADER_ADDRESS} -DPC98
|
1999-02-03 08:39:09 +00:00
|
|
|
|
2000-03-31 16:03:02 +00:00
|
|
|
.if defined(BTXLDR_VERBOSE)
|
|
|
|
M4FLAGS+= -DBTXLDR_VERBOSE
|
|
|
|
.endif
|
1999-02-03 08:39:09 +00:00
|
|
|
|
|
|
|
all: btxldr
|
|
|
|
|
|
|
|
btxldr: btxldr.o
|
|
|
|
.if ${OBJFORMAT} == aout
|
2000-03-31 16:03:02 +00:00
|
|
|
${LD} -nostdlib -N -s -T ${LOADER_ADDRESS} -o btxldr.out btxldr.o
|
1999-02-03 08:39:09 +00:00
|
|
|
dd if=btxldr.out of=${.TARGET} ibs=32 skip=1
|
|
|
|
.else
|
2000-03-31 16:03:02 +00:00
|
|
|
${LD} -N -e start -Ttext ${LOADER_ADDRESS} -o btxldr.out btxldr.o
|
1999-02-03 08:39:09 +00:00
|
|
|
objcopy -S -O binary btxldr.out ${.TARGET}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
btxldr.o: btxldr.s
|
2000-03-31 16:03:02 +00:00
|
|
|
(cd ${.CURDIR}; ${M4} ${M4FLAGS} btxldr.s ) | \
|
|
|
|
${AS} ${AFLAGS} -o ${.TARGET}
|
1999-02-03 08:39:09 +00:00
|
|
|
|
|
|
|
CLEANFILES+= btxldr btxldr.out btxldr.o
|
|
|
|
|
2000-03-31 16:03:02 +00:00
|
|
|
.include <${.CURDIR}/../../Makefile.inc>
|
1999-02-03 08:39:09 +00:00
|
|
|
.include <bsd.prog.mk>
|