splash.mk revision 1.4
1# $NetBSD: splash.mk,v 1.4 2015/09/14 01:40:03 uebayasi Exp $
2
3# Makefile for embedding splash image into kernel.
4.include <bsd.endian.mk>
5
6.if (${OBJECT_FMTS:Melf64})
7BFD_ELFTARGET=elf64
8.else
9BFD_ELFTARGET=elf32
10.endif
11
12BFD_ENDIANNESS=${TARGET_ENDIANNESS:S/1234/little/C/4321/big/}
13BFD_CPU=${MACHINE_CPU:S/_/-/}
14
15.if (${BFD_CPU:Maarch64} || ${BFD_CPU:Marm} || ${BFD_CPU:Mmips} || ${BFD_CPU:Mscore})
16BFD_TARGET=${BFD_ELFTARGET}-${BFD_ENDIANNESS}${BFD_CPU}
17.else
18BFD_TARGET=${BFD_ELFTARGET}-${BFD_CPU}
19.endif
20
21splash_image.o:	${SPLASHSCREEN_IMAGE}
22	cp ${SPLASHSCREEN_IMAGE} splash.image
23	${OBJCOPY} -I binary -B ${MACHINE_CPU:C/x86_64/i386/} \
24		-O ${BFD_TARGET} splash.image splash_image.o
25	rm splash.image
26