Makefile revision 98542
1# $FreeBSD: head/sys/boot/i386/libi386/Makefile 98542 2002-06-21 06:18:05Z mckusick $
2#
3LIB=			i386
4INTERNALLIB=		true
5
6SRCS=	aout_freebsd.c biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \
7	biospci.c bootinfo.c comconsole.c devicename.c divdi3.c elf_freebsd.c \
8	gatea20.c i386_copy.c i386_module.c moddi3.c nullconsole.c pxe.c \
9	pxetramp.s qdivrem.c time.c vidconsole.c
10
11CFLAGS+=	-ffreestanding
12BOOT_COMCONSOLE_PORT?= 0x3f8
13CFLAGS+=	-DCOMPORT=${BOOT_COMCONSOLE_PORT}
14
15BOOT_COMCONSOLE_SPEED?= 9600
16CFLAGS+=	-DCOMSPEED=${BOOT_COMCONSOLE_SPEED}
17
18.ifdef(BOOT_BIOSDISK_DEBUG)
19# Make the disk code more talkative
20CFLAGS+= -DDISK_DEBUG
21.endif
22
23# Include simple terminal emulation (cons25-compatible)
24CFLAGS+= -DTERM_EMU
25
26CFLAGS+=	-I${.CURDIR}/../../common -I${.CURDIR}/../btx/lib \
27		-I${.CURDIR}/../../../contrib/dev/acpica \
28		-I${.CURDIR}/../../.. -I.
29# the location of libstand
30CFLAGS+=	-I${.CURDIR}/../../../../lib/libstand/
31
32# Make "machine" required for all objects
33# (based on the more complete case in sys/i386/boot/Makefile.inc)
34${SRCS:M*.c:R:S/$/.o/g}: machine
35
36# If it's not there, don't consider it a target
37.if exists(${.CURDIR}/../../../i386/include)
38beforedepend ${OBJS}: machine
39
40machine:
41	ln -sf ${.CURDIR}/../../../i386/include machine
42	ln -sf ${.CURDIR}/../../../../lib/libc/quad/divdi3.c divdi3.c
43	ln -sf ${.CURDIR}/../../../../lib/libc/quad/moddi3.c moddi3.c
44	ln -sf ${.CURDIR}/../../../../lib/libc/quad/qdivrem.c qdivrem.c
45
46.endif
47
48CLEANFILES+=	machine divdi3.c moddi3.c qdivrem.c
49
50.include <bsd.lib.mk>
51