ff952c2d06413fd86a189bec9fdd1e32cf34dd29
[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
3 .if defined(BOOT_BTX_NOHANG)
4 BOOT_BTX_FLAGS=0x1
5 .else
6 BOOT_BTX_FLAGS=0x0
7 .endif
8
9 CFLAGS+=        -DBTX_FLAGS=${BOOT_BTX_FLAGS}
10
11 .if defined(BTX_SERIAL)
12 BOOT_COMCONSOLE_PORT?= 0x3f8
13 BOOT_COMCONSOLE_SPEED?= 9600
14 B2SIOFMT?=      0x3
15
16 CFLAGS+=        -DBTX_SERIAL -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
17                 -DSIOFMT=${B2SIOFMT} -DSIOSPD=${BOOT_COMCONSOLE_SPEED}
18 .endif
19
20 all: btx
21
22 btx: btx.o
23         ${LD} ${LDFLAGS:N-Wl,*} -N -e start \
24         --script ${.CURDIR}/btx.ldscript -o btx.out btx.o
25         objcopy -S -O binary btx.out ${.TARGET}
26
27 btx.o: btx.S
28         ${CC} ${CFLAGS} ${.IMPSRC} -o ${.TARGET} -c
29
30 CLEANFILES+= btx btx.out btx.o
31
32 .include <bsd.prog.mk>