ab638ff58daa74ac5ee78cc70df46d73698a7db0
[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(PAGING)
5 AFLAGS+=        -DPAGING
6 .endif
7
8 .if defined(BOOT_BTX_NOHANG)
9 BOOT_BTX_FLAGS=0x1
10 .else
11 BOOT_BTX_FLAGS=0x0
12 .endif
13
14 CFLAGS+=        -DBTX_FLAGS=${BOOT_BTX_FLAGS}
15
16 .if defined(BTX_SERIAL)
17 BOOT_COMCONSOLE_PORT?= 0x3f8
18 BOOT_COMCONSOLE_SPEED?= 9600
19 B2SIOFMT?=      0x3
20
21 CFLAGS+=        -DBTX_SERIAL -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
22                 -DSIOFMT=${B2SIOFMT} -DSIOSPD=${BOOT_COMCONSOLE_SPEED}
23 .endif
24
25 ORG=    0x9000
26
27 all: btx
28
29 btx: btx.o
30         ${LD} ${LDFLAGS} -N -e start -Ttext ${ORG} -o btx.out btx.o
31         objcopy -S -O binary btx.out ${.TARGET}
32
33 btx.o: btx.S
34         ${CC} ${CFLAGS} ${.IMPSRC} -o ${.TARGET} -c
35
36 CLEANFILES+= btx btx.out btx.o
37
38 .include <bsd.prog.mk>