Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sys / boot / pc98 / btx / btx / Makefile
1 # $FreeBSD: src/sys/boot/pc98/btx/btx/Makefile,v 1.3.2.2 2000/12/30 12:01:05 nyan Exp $
2
3 M4?=    m4
4
5 .if defined(PAGING)
6 M4FLAGS+=       -DPAGING
7 .endif
8
9 .if defined(BOOT_BTX_NOHANG)
10 BOOT_BTX_FLAGS=0x1
11 .else
12 BOOT_BTX_FLAGS=0x0
13 .endif
14
15 AFLAGS+=        --defsym BTX_FLAGS=${BOOT_BTX_FLAGS}
16 AFLAGS+=        --defsym PC98=1
17
18 ORG=    0x9000
19
20 all: btx
21
22 btx: btx.o
23 .if ${OBJFORMAT} == aout
24         ${LD} -nostdlib -N -s -T ${ORG} -o btx.out btx.o
25         dd if=btx.out of=${.TARGET} ibs=32 skip=1
26 .else
27         ${LD} -N -e start -Ttext ${ORG} -o btx.out btx.o
28         objcopy -S -O binary btx.out ${.TARGET}
29 .endif
30
31 btx.o: btx.s
32         (cd ${.CURDIR}; ${M4} ${M4FLAGS} btx.s) | \
33            ${AS} ${AFLAGS} -o ${.TARGET}
34
35 CLEANFILES+= btx btx.out btx.o
36
37 .include <bsd.prog.mk>