Initial import of binutils 2.22 on the new vendor branch
[dragonfly.git] / sys / boot / pc32 / btx / btx / Makefile
1 # $FreeBSD: src/sys/boot/i386/btx/btx/Makefile,v 1.13 2002/09/17 01:48:54 peter Exp $
2 # $DragonFly: src/sys/boot/pc32/btx/btx/Makefile,v 1.4 2004/07/18 23:40:04 dillon Exp $
3
4 .if defined(BOOT_BTX_NOHANG)
5 BOOT_BTX_FLAGS=0x1
6 .else
7 BOOT_BTX_FLAGS=0x0
8 .endif
9
10 CFLAGS+=        -DBTX_FLAGS=${BOOT_BTX_FLAGS}
11
12 .if defined(BTX_SERIAL)
13 BOOT_COMCONSOLE_PORT?= 0x3f8
14 BOOT_COMCONSOLE_SPEED?= 9600
15 B2SIOFMT?=      0x3
16
17 CFLAGS+=        -DBTX_SERIAL -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
18                 -DSIOFMT=${B2SIOFMT} -DSIOSPD=${BOOT_COMCONSOLE_SPEED}
19 .endif
20
21 ORG=    0x9000
22
23 all: btx
24
25 btx: btx.o
26         ${LD} ${LDFLAGS} -N -e start -Ttext ${ORG} -o btx.out btx.o
27         objcopy -S -O binary btx.out ${.TARGET}
28
29 btx.o: btx.S
30         ${CC} ${CFLAGS} ${.IMPSRC} -o ${.TARGET} -c
31
32 CLEANFILES+= btx btx.out btx.o
33
34 .include <bsd.prog.mk>