1# $FreeBSD: releng/11.0/sys/boot/common/Makefile.inc 296378 2016-03-04 05:36:53Z sgalabov $
2
3SRCS+=	boot.c commands.c console.c devopen.c interp.c 
4SRCS+=	interp_backslash.c interp_parse.c ls.c misc.c 
5SRCS+=	module.c panic.c
6
7.if ${MACHINE} == "i386" || ${MACHINE_CPUARCH} == "amd64"
8SRCS+=	load_elf32.c load_elf32_obj.c reloc_elf32.c
9SRCS+=	load_elf64.c load_elf64_obj.c reloc_elf64.c
10.elif ${MACHINE} == "pc98"
11SRCS+=	load_elf32.c load_elf32_obj.c reloc_elf32.c
12.elif ${MACHINE_CPUARCH} == "aarch64"
13SRCS+=	load_elf64.c reloc_elf64.c
14.elif ${MACHINE_CPUARCH} == "arm"
15SRCS+=	load_elf32.c reloc_elf32.c
16.elif ${MACHINE_CPUARCH} == "powerpc"
17SRCS+=	load_elf32.c reloc_elf32.c
18SRCS+=	load_elf64.c reloc_elf64.c
19.elif ${MACHINE_CPUARCH} == "sparc64"
20SRCS+=	load_elf64.c reloc_elf64.c
21.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
22SRCS+= load_elf64.c reloc_elf64.c
23.elif ${MACHINE} == "mips"
24SRCS+=	load_elf32.c reloc_elf32.c
25.endif
26
27.if defined(LOADER_NET_SUPPORT)
28SRCS+=	dev_net.c
29.endif
30
31.if !defined(LOADER_NO_DISK_SUPPORT)
32SRCS+=	disk.c part.c
33CFLAGS+= -DLOADER_DISK_SUPPORT
34.if !defined(LOADER_NO_GPT_SUPPORT)
35SRCS+=	crc32.c
36CFLAGS+= -DLOADER_GPT_SUPPORT
37.endif
38.if !defined(LOADER_NO_MBR_SUPPORT)
39CFLAGS+= -DLOADER_MBR_SUPPORT
40.endif
41.endif
42
43.if defined(HAVE_BCACHE)
44SRCS+=  bcache.c
45.endif
46
47.if defined(MD_IMAGE_SIZE)
48CFLAGS+= -DMD_IMAGE_SIZE=${MD_IMAGE_SIZE}
49SRCS+=	md.c
50.endif
51
52# Machine-independant ISA PnP
53.if defined(HAVE_ISABUS)
54SRCS+=	isapnp.c
55.endif
56.if defined(HAVE_PNP)
57SRCS+=	pnp.c
58.endif
59
60# Forth interpreter
61.if defined(BOOT_FORTH)
62SRCS+=	interp_forth.c
63.endif
64
65.if defined(BOOT_PROMPT_123)
66CFLAGS+=	-DBOOT_PROMPT_123
67.endif
68
69.if defined(LOADER_INSTALL_SUPPORT)
70SRCS+=	install.c
71CFLAGS+=-I${.CURDIR}/../../../../lib/libstand
72.endif
73