1999-08-27 21:08:13 -04:00
|
|
|
# $FreeBSD$
|
1998-08-20 23:17:42 -04:00
|
|
|
|
2012-08-05 08:15:15 -04:00
|
|
|
SRCS+= boot.c commands.c console.c devopen.c interp.c
|
2003-04-30 23:56:30 -04:00
|
|
|
SRCS+= interp_backslash.c interp_parse.c ls.c misc.c
|
1998-11-02 18:28:11 -05:00
|
|
|
SRCS+= module.c panic.c
|
1998-09-14 14:27:06 -04:00
|
|
|
|
2010-08-22 21:43:47 -04:00
|
|
|
.if ${MACHINE} == "i386" || ${MACHINE_CPUARCH} == "amd64"
|
2004-10-24 08:32:41 -04:00
|
|
|
SRCS+= load_elf32.c load_elf32_obj.c reloc_elf32.c
|
|
|
|
|
SRCS+= load_elf64.c load_elf64_obj.c reloc_elf64.c
|
|
|
|
|
.elif ${MACHINE} == "pc98"
|
|
|
|
|
SRCS+= load_elf32.c load_elf32_obj.c reloc_elf32.c
|
2015-04-14 09:55:01 -04:00
|
|
|
.elif ${MACHINE_CPUARCH} == "aarch64"
|
|
|
|
|
SRCS+= load_elf64.c reloc_elf64.c
|
2010-08-25 12:23:50 -04:00
|
|
|
.elif ${MACHINE_CPUARCH} == "arm"
|
2004-08-28 19:03:05 -04:00
|
|
|
SRCS+= load_elf32.c reloc_elf32.c
|
2010-08-22 21:43:47 -04:00
|
|
|
.elif ${MACHINE_CPUARCH} == "powerpc"
|
2010-07-11 20:49:22 -04:00
|
|
|
SRCS+= load_elf32.c reloc_elf32.c
|
|
|
|
|
SRCS+= load_elf64.c reloc_elf64.c
|
2010-10-25 22:34:47 -04:00
|
|
|
.elif ${MACHINE_CPUARCH} == "sparc64"
|
2004-08-28 19:03:05 -04:00
|
|
|
SRCS+= load_elf64.c reloc_elf64.c
|
2016-10-31 11:33:58 -04:00
|
|
|
.elif ${MACHINE_ARCH:Mmips64*} != ""
|
2014-02-23 17:11:26 -05:00
|
|
|
SRCS+= load_elf64.c reloc_elf64.c
|
2016-03-04 00:36:53 -05:00
|
|
|
.elif ${MACHINE} == "mips"
|
2016-02-29 02:27:49 -05:00
|
|
|
SRCS+= load_elf32.c reloc_elf32.c
|
2003-04-30 23:56:30 -04:00
|
|
|
.endif
|
|
|
|
|
|
2000-11-10 01:39:58 -05:00
|
|
|
.if defined(LOADER_NET_SUPPORT)
|
|
|
|
|
SRCS+= dev_net.c
|
|
|
|
|
.endif
|
|
|
|
|
|
2012-08-05 08:15:15 -04:00
|
|
|
.if !defined(LOADER_NO_DISK_SUPPORT)
|
|
|
|
|
SRCS+= disk.c part.c
|
|
|
|
|
CFLAGS+= -DLOADER_DISK_SUPPORT
|
|
|
|
|
.if !defined(LOADER_NO_GPT_SUPPORT)
|
|
|
|
|
SRCS+= crc32.c
|
|
|
|
|
CFLAGS+= -DLOADER_GPT_SUPPORT
|
|
|
|
|
.endif
|
|
|
|
|
.if !defined(LOADER_NO_MBR_SUPPORT)
|
|
|
|
|
CFLAGS+= -DLOADER_MBR_SUPPORT
|
|
|
|
|
.endif
|
|
|
|
|
.endif
|
|
|
|
|
|
2006-11-01 19:26:45 -05:00
|
|
|
.if defined(HAVE_BCACHE)
|
|
|
|
|
SRCS+= bcache.c
|
|
|
|
|
.endif
|
|
|
|
|
|
2009-12-12 20:20:32 -05:00
|
|
|
.if defined(MD_IMAGE_SIZE)
|
|
|
|
|
CFLAGS+= -DMD_IMAGE_SIZE=${MD_IMAGE_SIZE}
|
|
|
|
|
SRCS+= md.c
|
|
|
|
|
.endif
|
|
|
|
|
|
1998-09-14 14:27:06 -04:00
|
|
|
# Machine-independant ISA PnP
|
2004-02-07 06:05:10 -05:00
|
|
|
.if defined(HAVE_ISABUS)
|
1998-09-14 14:27:06 -04:00
|
|
|
SRCS+= isapnp.c
|
|
|
|
|
.endif
|
2004-02-07 06:05:10 -05:00
|
|
|
.if defined(HAVE_PNP)
|
1998-09-14 14:27:06 -04:00
|
|
|
SRCS+= pnp.c
|
|
|
|
|
.endif
|
1998-11-03 19:29:01 -05:00
|
|
|
|
|
|
|
|
# Forth interpreter
|
2004-02-07 06:05:10 -05:00
|
|
|
.if defined(BOOT_FORTH)
|
1998-11-03 19:29:01 -05:00
|
|
|
SRCS+= interp_forth.c
|
2016-10-25 13:31:57 -04:00
|
|
|
.include "${SRCTOP}/sys/boot/Makefile.ficl"
|
1998-11-03 19:29:01 -05:00
|
|
|
.endif
|
2000-05-19 04:52:16 -04:00
|
|
|
|
2009-11-11 20:30:17 -05:00
|
|
|
.if defined(BOOT_PROMPT_123)
|
|
|
|
|
CFLAGS+= -DBOOT_PROMPT_123
|
|
|
|
|
.endif
|
|
|
|
|
|
2014-08-05 20:36:04 -04:00
|
|
|
.if defined(LOADER_INSTALL_SUPPORT)
|
|
|
|
|
SRCS+= install.c
|
|
|
|
|
CFLAGS+=-I${.CURDIR}/../../../../lib/libstand
|
|
|
|
|
.endif
|
2016-12-19 09:40:59 -05:00
|
|
|
|
|
|
|
|
CLEANFILES+= vers.c
|
|
|
|
|
VERSION_FILE?= ${.CURDIR}/version
|
2016-12-19 09:45:59 -05:00
|
|
|
.if ${MK_REPRODUCIBLE_BUILD} != no
|
|
|
|
|
REPRO_FLAG= -r
|
|
|
|
|
.endif
|
2016-12-19 09:40:59 -05:00
|
|
|
vers.c: ${SRCTOP}/sys/boot/common/newvers.sh ${VERSION_FILE}
|
2016-12-19 09:45:59 -05:00
|
|
|
sh ${SRCTOP}/sys/boot/common/newvers.sh ${REPRO_FLAG} ${VERSION_FILE} \
|
|
|
|
|
${NEWVERSWHAT}
|