Makefile.shark.inc revision 1.15
1#	$NetBSD: Makefile.shark.inc,v 1.15 2011/07/02 17:33:10 tsutsui Exp $
2
3MACHINE_ARCH=		arm
4CPPFLAGS+=		-D${MACHINE}
5GENASSYM_EXTRAS+=	${THISARM}/shark/genassym.cf
6
7# Need to convert the kernel from ELF to a.out so that OpenFirmware
8# can load it.
9
10LINKFLAGS=	-T ldscript
11
12SYSTEM_LD_HEAD_EXTRA+=; \
13	( cat ${ARM}/conf/kern.ldscript.head ; \
14	  OBJDUMP=${OBJDUMP} ${HOST_SH} $S/conf/mkldscript.sh \
15		${SYSTEM_OBJ} ; \
16	  cat ${ARM}/conf/kern.ldscript.tail ) > ldscript
17
18REMOVE_SECTIONS= \
19	-R .ident -R .arm.atpcs -R .comment -R .note.netbsd.ident \
20	-R .debug_abbrev -R .debug_info -R .debug_line -R .debug_str \
21	-R .debug_frame -R .debug_loc -R .debug_pubnames \
22	-R .debug_aranges -R .debug_pubtypes -R .ARM.attributes
23
24SYSTEM_LD_TAIL_EXTRA+=; \
25	echo \
26	 "${OBJCOPY} -O a.out-arm-netbsd \
27		${REMOVE_SECTIONS} \
28		$@ $@.aout"; \
29	${OBJCOPY} -O a.out-arm-netbsd \
30		${REMOVE_SECTIONS} \
31		$@ $@.aout
32
33KERNIMAGES=	netbsd netbsd.aout
34