6 SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \
7 biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \
8 comconsole.c devicename.c elf32_freebsd.c \
10 i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \
11 smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c
12 .PATH: ${.CURDIR}/../../zfs
13 SRCS+= devicename_stubs.c
15 # Enable PXE TFTP or NFS support, not both.
16 .if defined(LOADER_TFTP_SUPPORT)
17 CFLAGS+= -DLOADER_TFTP_SUPPORT
19 CFLAGS+= -DLOADER_NFS_SUPPORT
22 BOOT_COMCONSOLE_PORT?= 0x3f8
23 CFLAGS+= -DCOMPORT=${BOOT_COMCONSOLE_PORT}
25 BOOT_COMCONSOLE_SPEED?= 9600
26 CFLAGS+= -DCOMSPEED=${BOOT_COMCONSOLE_SPEED}
28 .ifdef(BOOT_BIOSDISK_DEBUG)
29 # Make the disk code more talkative
33 .if !defined(BOOT_HIDE_SERIAL_NUMBERS)
34 # Export serial numbers, UUID, and asset tag from loader.
35 CFLAGS+= -DSMBIOS_SERIAL_NUMBERS
36 .if defined(BOOT_LITTLE_ENDIAN_UUID)
37 # Use little-endian UUID format as defined in SMBIOS 2.6.
38 CFLAGS+= -DSMBIOS_LITTLE_ENDIAN_UUID
39 .elif defined(BOOT_NETWORK_ENDIAN_UUID)
40 # Use network-endian UUID format for backward compatibility.
41 CFLAGS+= -DSMBIOS_NETWORK_ENDIAN_UUID
45 # Include simple terminal emulation (cons25-compatible)
48 # XXX: make alloca() useable
49 CFLAGS+= -Dalloca=__builtin_alloca
51 CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../common \
52 -I${.CURDIR}/../btx/lib \
53 -I${.CURDIR}/../../../contrib/dev/acpica/include \
54 -I${.CURDIR}/../../.. -I.
55 # the location of libstand
56 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
58 .if ${MACHINE_CPUARCH} == "amd64"
61 ln -sf ${.CURDIR}/../../../i386/include machine
66 # XXX: clang integrated-as doesn't grok .codeNN directives yet
67 CFLAGS.amd64_tramp.S= ${CLANG_NO_IAS}
68 CFLAGS+= ${CFLAGS.${.IMPSRC:T}}
70 .if ${MACHINE_CPUARCH} == "amd64"
71 beforedepend ${OBJS}: machine