Makefile (1f9bd5f67c011e55ac64b22ae4dbeee716ae376c) | Makefile (9d45c24cc4078e0c2962ba28e5a726709fef2269) |
---|---|
1# $FreeBSD$ 2 3LOADER_NET_SUPPORT?= yes 4LOADER_MSDOS_SUPPORT?= yes 5LOADER_UFS_SUPPORT?= yes 6LOADER_CD9660_SUPPORT?= no 7LOADER_EXT2FS_SUPPORT?= no 8 9.include <bsd.init.mk> 10 | 1# $FreeBSD$ 2 3LOADER_NET_SUPPORT?= yes 4LOADER_MSDOS_SUPPORT?= yes 5LOADER_UFS_SUPPORT?= yes 6LOADER_CD9660_SUPPORT?= no 7LOADER_EXT2FS_SUPPORT?= no 8 9.include <bsd.init.mk> 10 |
11PROG= loader.sym | 11LOADER?= loader_${LOADER_INTERP} 12PROG= ${LOADER}.sym |
12INTERNALPROG= 13WARNS?= 3 14 15# architecture-specific loader code 16SRCS= autoload.c \ 17 bootinfo.c \ 18 conf.c \ 19 copy.c \ 20 efi_main.c \ 21 framebuffer.c \ 22 main.c \ 23 self_reloc.c \ 24 smbios.c \ 25 vers.c 26 | 13INTERNALPROG= 14WARNS?= 3 15 16# architecture-specific loader code 17SRCS= autoload.c \ 18 bootinfo.c \ 19 conf.c \ 20 copy.c \ 21 efi_main.c \ 22 framebuffer.c \ 23 main.c \ 24 self_reloc.c \ 25 smbios.c \ 26 vers.c 27 |
28CFLAGS+= -I${.CURDIR}/../loader |
|
27.if ${MK_ZFS} != "no" 28CFLAGS+= -I${ZFSSRC} 29CFLAGS+= -DEFI_ZFS_BOOT 30HAVE_ZFS= yes 31.endif 32 33.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201 34CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized 35.endif 36 37# We implement a slightly non-standard %S in that it always takes a 38# CHAR16 that's common in UEFI-land instead of a wchar_t. This only 39# seems to matter on arm64 where wchar_t defaults to an int instead 40# of a short. There's no good cast to use here so just ignore the 41# warnings for now. 42CWARNFLAGS.main.c+= -Wno-format 43 | 29.if ${MK_ZFS} != "no" 30CFLAGS+= -I${ZFSSRC} 31CFLAGS+= -DEFI_ZFS_BOOT 32HAVE_ZFS= yes 33.endif 34 35.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201 36CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized 37.endif 38 39# We implement a slightly non-standard %S in that it always takes a 40# CHAR16 that's common in UEFI-land instead of a wchar_t. This only 41# seems to matter on arm64 where wchar_t defaults to an int instead 42# of a short. There's no good cast to use here so just ignore the 43# warnings for now. 44CWARNFLAGS.main.c+= -Wno-format 45 |
44.PATH: ${.CURDIR}/arch/${MACHINE} 45# For smbios.c | 46.PATH: ${.CURDIR}/../loader 47.PATH: ${.CURDIR}/../loader/arch/${MACHINE} 48# For smbios.c XXX need to abstract properly |
46.PATH: ${BOOTSRC}/i386/libi386 | 49.PATH: ${BOOTSRC}/i386/libi386 |
47.include "${.CURDIR}/arch/${MACHINE}/Makefile.inc" | 50.include "${.CURDIR}/../loader/arch/${MACHINE}/Makefile.inc" |
48 49CFLAGS+= -I${.CURDIR} 50CFLAGS+= -I${.CURDIR}/arch/${MACHINE} 51CFLAGS+= -I${EFISRC}/include 52CFLAGS+= -I${EFISRC}/include/${MACHINE} 53CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include 54CFLAGS+= -I${BOOTSRC}/i386/libi386 55CFLAGS+= -DNO_PCI -DEFI --- 17 unchanged lines hidden (view full) --- 73 74# Include bcache code. 75HAVE_BCACHE= yes 76 77.if defined(EFI_STAGING_SIZE) 78CFLAGS+= -DEFI_STAGING_SIZE=${EFI_STAGING_SIZE} 79.endif 80 | 51 52CFLAGS+= -I${.CURDIR} 53CFLAGS+= -I${.CURDIR}/arch/${MACHINE} 54CFLAGS+= -I${EFISRC}/include 55CFLAGS+= -I${EFISRC}/include/${MACHINE} 56CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include 57CFLAGS+= -I${BOOTSRC}/i386/libi386 58CFLAGS+= -DNO_PCI -DEFI --- 17 unchanged lines hidden (view full) --- 76 77# Include bcache code. 78HAVE_BCACHE= yes 79 80.if defined(EFI_STAGING_SIZE) 81CFLAGS+= -DEFI_STAGING_SIZE=${EFI_STAGING_SIZE} 82.endif 83 |
84NEWVERSWHAT= "EFI loader" ${MACHINE} 85VERSION_FILE= ${.CURDIR}/../loader/version 86 |
|
81# Always add MI sources 82.include "${BOOTSRC}/loader.mk" 83 | 87# Always add MI sources 88.include "${BOOTSRC}/loader.mk" 89 |
84FILES+= loader.efi 85FILESMODE_loader.efi= ${BINMODE} | 90FILES+= ${LOADER}.efi 91FILESMODE_${LOADER}.efi= ${BINMODE} |
86 | 92 |
87LDSCRIPT= ${.CURDIR}/arch/${MACHINE}/ldscript.${MACHINE} | 93LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE}/ldscript.${MACHINE} |
88LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -shared 89 90CLEANFILES+= loader.efi 91 | 94LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -shared 95 96CLEANFILES+= loader.efi 97 |
92NEWVERSWHAT= "EFI loader" ${MACHINE} 93 94loader.efi: ${PROG} | 98${LOADER}.efi: ${PROG} |
95 if ${NM} ${.ALLSRC} | grep ' U '; then \ 96 echo "Undefined symbols in ${.ALLSRC}"; \ 97 exit 1; \ 98 fi 99 SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ 100 ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \ 101 -j .dynamic -j .dynsym -j .rel.dyn \ 102 -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ 103 -j set_Xficl_compile_set \ 104 --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} 105 106LIBEFI= ${BOOTOBJ}/efi/libefi/libefi.a 107 108DPADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA} ${LDSCRIPT} 109LDADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA} 110 111.include <bsd.prog.mk> | 99 if ${NM} ${.ALLSRC} | grep ' U '; then \ 100 echo "Undefined symbols in ${.ALLSRC}"; \ 101 exit 1; \ 102 fi 103 SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ 104 ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \ 105 -j .dynamic -j .dynsym -j .rel.dyn \ 106 -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ 107 -j set_Xficl_compile_set \ 108 --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} 109 110LIBEFI= ${BOOTOBJ}/efi/libefi/libefi.a 111 112DPADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA} ${LDSCRIPT} 113LDADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA} 114 115.include <bsd.prog.mk> |