Makefile revision 271135
165483Simp# $FreeBSD: stable/10/sys/boot/i386/libi386/Makefile 271135 2014-09-04 21:01:10Z emaste $
252506Simp#
3119418SobrienLIB=			i386
4119418SobrienINTERNALLIB=
5119418Sobrien
652506SimpSRCS=	biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \
752506Simp	biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \
8139749Simp	comconsole.c devicename.c elf32_freebsd.c \
952506Simp	elf64_freebsd.c \
1052506Simp	i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \
1152506Simp	smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c
1252506Simp.PATH:	${.CURDIR}/../../zfs
1352506SimpSRCS+=	devicename_stubs.c
1452506Simp
1552506Simp# Enable PXE TFTP or NFS support, not both.
1652506Simp.if defined(LOADER_TFTP_SUPPORT)
1752506SimpCFLAGS+=	-DLOADER_TFTP_SUPPORT
1852506Simp.else
1952506SimpCFLAGS+=	-DLOADER_NFS_SUPPORT
2052506Simp.endif
2152506Simp
2252506SimpBOOT_COMCONSOLE_PORT?= 0x3f8
2352506SimpCFLAGS+=	-DCOMPORT=${BOOT_COMCONSOLE_PORT}
2452506Simp
2552506SimpBOOT_COMCONSOLE_SPEED?= 9600
2652506SimpCFLAGS+=	-DCOMSPEED=${BOOT_COMCONSOLE_SPEED}
2752506Simp
2852506Simp.ifdef(BOOT_BIOSDISK_DEBUG)
2952506Simp# Make the disk code more talkative
3052506SimpCFLAGS+= -DDISK_DEBUG
3152506Simp.endif
3252506Simp
3352506Simp.if !defined(BOOT_HIDE_SERIAL_NUMBERS)
3452506Simp# Export serial numbers, UUID, and asset tag from loader.
3552506SimpCFLAGS+= -DSMBIOS_SERIAL_NUMBERS
3652506Simp.if defined(BOOT_LITTLE_ENDIAN_UUID)
3752506Simp# Use little-endian UUID format as defined in SMBIOS 2.6.
38129762SimpCFLAGS+= -DSMBIOS_LITTLE_ENDIAN_UUID
39129781Simp.endif
4052506Simp.endif
4152506Simp
4252506Simp# Include simple terminal emulation (cons25-compatible)
4352506SimpCFLAGS+= -DTERM_EMU
44129762Simp
45129762Simp# XXX: make alloca() useable
46150371SglebiusCFLAGS+= -Dalloca=__builtin_alloca
47129781Simp
48129740SimpCFLAGS+=	-I${.CURDIR}/../../common -I${.CURDIR}/../common \
4952506Simp		-I${.CURDIR}/../btx/lib \
5052506Simp		-I${.CURDIR}/../../../contrib/dev/acpica/include \
5152506Simp		-I${.CURDIR}/../../.. -I.
5252506Simp# the location of libstand
5352506SimpCFLAGS+=	-I${.CURDIR}/../../../../lib/libstand/
5452506Simp
5552506Simp# Suppress warning from clang for FreeBSD %b and %D formats
5652506SimpCFLAGS+= -fformat-extensions
5752506Simp
5852506Simp.if ${MACHINE_CPUARCH} == "amd64"
5952506SimpCLEANFILES+=	machine
6052506Simpmachine:
6152506Simp	ln -sf ${.CURDIR}/../../../i386/include machine
6252506Simp.endif
6352506Simp
6452506Simp.include <bsd.lib.mk>
6552506Simp
6652506Simp# XXX: clang integrated-as doesn't grok .codeNN directives yet
6752506SimpCFLAGS.amd64_tramp.S=	${CLANG_NO_IAS}
6852506SimpCFLAGS+=		${CFLAGS.${.IMPSRC:T}}
6952506Simp
7052506Simp.if ${MACHINE_CPUARCH} == "amd64"
7152506Simpbeforedepend ${OBJS}: machine
7252506Simp.endif
7352506Simp