1# $NetBSD: splash.mk,v 1.6 2015/09/15 02:22:43 uebayasi Exp $ 2 3.if defined(SPLASHSCREEN_IMAGE) 4 5# Makefile for embedding splash image into kernel. 6.include <bsd.endian.mk> 7 8.if (${OBJECT_FMTS:Melf64}) 9BFD_ELFTARGET=elf64 10.else 11BFD_ELFTARGET=elf32 12.endif 13 14BFD_ENDIANNESS=${TARGET_ENDIANNESS:S/1234/little/C/4321/big/} 15BFD_CPU=${MACHINE_CPU:S/_/-/} 16 17.if (${BFD_CPU:Maarch64} || ${BFD_CPU:Marm} || ${BFD_CPU:Mmips} || ${BFD_CPU:Mscore}) 18BFD_TARGET=${BFD_ELFTARGET}-${BFD_ENDIANNESS}${BFD_CPU} 19.else 20BFD_TARGET=${BFD_ELFTARGET}-${BFD_CPU} 21.endif 22 23splash_image.o: ${SPLASHSCREEN_IMAGE} 24 ${_MKTARGET_CREATE} 25 cp ${SPLASHSCREEN_IMAGE} splash.image 26 ${OBJCOPY} -I binary -B ${MACHINE_CPU:C/x86_64/i386/} \ 27 -O ${BFD_TARGET} splash.image splash_image.o 28 rm splash.image 29.else 30 31# SPLASHSCREEN_IMAGE is not defined; build empty splash_image.o. 32splash_image.c: 33 ${_MKTARGET_CREATE} 34 echo > $@ 35 36.endif 37