Fully synchronize sys/boot from FreeBSD-5.x, but add / to the module path
[dragonfly.git] / sys / boot / i386 / 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/i386/btx/btx/Attic/Makefile,v 1.3 2003/11/10 06:08:35 dillon Exp $
3
4 M4?=    m4
5
6 .if defined(PAGING)
7 M4FLAGS+=       -DPAGING
8 .endif
9
10 .if defined(BOOT_BTX_NOHANG)
11 BOOT_BTX_FLAGS=0x1
12 .else
13 BOOT_BTX_FLAGS=0x0
14 .endif
15
16 AFLAGS+=        --defsym BTX_FLAGS=${BOOT_BTX_FLAGS}
17
18 .if defined(BTX_SERIAL)
19 BOOT_COMCONSOLE_PORT?= 0x3f8
20 BOOT_COMCONSOLE_SPEED?= 9600
21 B2SIOFMT?=      0x3
22
23 M4FLAGS+=       -DBTX_SERIAL -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
24                 -DSIOFMT=${B2SIOFMT} -DSIOSPD=${BOOT_COMCONSOLE_SPEED}
25 .endif
26
27 ORG=    0x9000
28
29 all: btx
30
31 btx: btx.o
32         ${LD} -N -e start -Ttext ${ORG} -o btx.out btx.o
33         objcopy -S -O binary btx.out ${.TARGET}
34
35 btx.o: btx.s
36         (cd ${.CURDIR}; ${M4} ${M4FLAGS} btx.s) | \
37            ${AS} ${AFLAGS} -o ${.TARGET}
38
39 CLEANFILES+= btx btx.out btx.o
40
41 .include <bsd.prog.mk>