xref: /illumos-gate/usr/src/boot/common/Makefile.inc (revision 22028508)
1# $FreeBSD$
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
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_CPUARCH} == "aarch64"
11SRCS+=	load_elf64.c reloc_elf64.c
12.elif ${MACHINE_CPUARCH} == "arm"
13SRCS+=	load_elf32.c reloc_elf32.c
14.elif ${MACHINE_CPUARCH} == "powerpc"
15SRCS+=	load_elf32.c reloc_elf32.c
16SRCS+=	load_elf64.c reloc_elf64.c
17.elif ${MACHINE_CPUARCH} == "sparc64"
18SRCS+=	load_elf64.c reloc_elf64.c
19.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
20SRCS+= load_elf64.c reloc_elf64.c
21.elif ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mipsel"
22SRCS+=	load_elf32.c reloc_elf32.c
23.endif
24
25.if defined(LOADER_NET_SUPPORT)
26SRCS+=	dev_net.c
27.endif
28
29.if !defined(LOADER_NO_DISK_SUPPORT)
30SRCS+=	disk.c part.c
31CFLAGS+= -DLOADER_DISK_SUPPORT
32.if !defined(LOADER_NO_GPT_SUPPORT)
33SRCS+=	crc32.c
34CFLAGS+= -DLOADER_GPT_SUPPORT
35.endif
36.if !defined(LOADER_NO_MBR_SUPPORT)
37CFLAGS+= -DLOADER_MBR_SUPPORT
38.endif
39.endif
40
41.if defined(HAVE_BCACHE)
42SRCS+=  bcache.c
43.endif
44
45.if defined(MD_IMAGE_SIZE)
46CFLAGS+= -DMD_IMAGE_SIZE=${MD_IMAGE_SIZE}
47SRCS+=	md.c
48.endif
49
50# Machine-independant ISA PnP
51.if defined(HAVE_ISABUS)
52SRCS+=	isapnp.c
53.endif
54.if defined(HAVE_PNP)
55SRCS+=	pnp.c
56.endif
57
58# Forth interpreter
59.if defined(BOOT_FORTH)
60SRCS+=	interp_forth.c
61.endif
62
63.if defined(BOOT_PROMPT_123)
64CFLAGS+=	-DBOOT_PROMPT_123
65.endif
66
67.if defined(LOADER_INSTALL_SUPPORT)
68SRCS+=	install.c
69CFLAGS+=-I${.CURDIR}/../../../../lib/libstand
70.endif
71