]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/boot/i386/libi386/Makefile
MFC r307322,r307323,r307324,r307326,r307327,r307338,r307879,r307908,r307911,
[FreeBSD/FreeBSD.git] / sys / boot / i386 / libi386 / Makefile
1 # $FreeBSD$
2 #
3 LIB=                    i386
4 INTERNALLIB=
5
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 \
9         elf64_freebsd.c multiboot.c multiboot_tramp.S \
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
14
15 # Enable PXE TFTP or NFS support, not both.
16 .if defined(LOADER_TFTP_SUPPORT)
17 CFLAGS+=        -DLOADER_TFTP_SUPPORT
18 .else
19 CFLAGS+=        -DLOADER_NFS_SUPPORT
20 .endif
21
22 BOOT_COMCONSOLE_PORT?= 0x3f8
23 CFLAGS+=        -DCOMPORT=${BOOT_COMCONSOLE_PORT}
24
25 BOOT_COMCONSOLE_SPEED?= 9600
26 CFLAGS+=        -DCOMSPEED=${BOOT_COMCONSOLE_SPEED}
27
28 .ifdef(BOOT_BIOSDISK_DEBUG)
29 # Make the disk code more talkative
30 CFLAGS+= -DDISK_DEBUG
31 .endif
32
33 .if !defined(LOADER_NO_GELI_SUPPORT)
34 # Decrypt encrypted drives
35 CFLAGS+= -DLOADER_GELI_SUPPORT
36 CFLAGS+= -I${.CURDIR}/../../geli
37 .endif
38
39 .if !defined(BOOT_HIDE_SERIAL_NUMBERS)
40 # Export serial numbers, UUID, and asset tag from loader.
41 CFLAGS+= -DSMBIOS_SERIAL_NUMBERS
42 .if defined(BOOT_LITTLE_ENDIAN_UUID)
43 # Use little-endian UUID format as defined in SMBIOS 2.6.
44 CFLAGS+= -DSMBIOS_LITTLE_ENDIAN_UUID
45 .elif defined(BOOT_NETWORK_ENDIAN_UUID)
46 # Use network-endian UUID format for backward compatibility.
47 CFLAGS+= -DSMBIOS_NETWORK_ENDIAN_UUID
48 .endif
49 .endif
50
51 # Include simple terminal emulation (cons25-compatible)
52 CFLAGS+= -DTERM_EMU
53
54 # XXX: make alloca() useable
55 CFLAGS+= -Dalloca=__builtin_alloca
56
57 CFLAGS+=        -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 \
58                 -I${.CURDIR}/../../common -I${.CURDIR}/../common \
59                 -I${.CURDIR}/../btx/lib \
60                 -I${.CURDIR}/../../../contrib/dev/acpica/include \
61                 -I${.CURDIR}/../../.. -I.
62 # the location of libstand
63 CFLAGS+=        -I${.CURDIR}/../../../../lib/libstand/
64
65 # Handle FreeBSD specific %b and %D printf format specifiers
66 CFLAGS+= ${FORMAT_EXTENSIONS}
67
68 .if ${MACHINE_CPUARCH} == "amd64"
69 CLEANFILES+=    machine
70 machine: .NOMETA
71         ln -sf ${.CURDIR}/../../../i386/include machine
72 .endif
73
74 .include <bsd.lib.mk>
75
76 # XXX: clang integrated-as doesn't grok .codeNN directives yet
77 CFLAGS.amd64_tramp.S=   ${CLANG_NO_IAS}
78 CFLAGS.multiboot_tramp.S=       ${CLANG_NO_IAS}
79
80 .if ${MACHINE_CPUARCH} == "amd64"
81 beforedepend ${OBJS}: machine
82 .endif