Makefile.cats.inc revision 1.20
1#	$NetBSD: Makefile.cats.inc,v 1.20 2008/01/19 18:10:13 he Exp $
2
3MACHINE_ARCH=	arm
4CPPFLAGS+=	-D${MACHINE}
5
6.if (${OBJECT_FMT} == "ELF")
7
8.if defined(ABLEELF) && (${ABLEELF} == "1")
9# use a standard ELF format, adjusted to align areas
10LINKFLAGS=	-T ${THISARM}/conf/ldscript.elf
11
12.else
13# Need to convert the kernel from ELF to a.out so that the firmware
14# can load it.
15
16LINKFLAGS=	-T ldscript
17
18SYSTEM_LD_HEAD_EXTRA+=; \
19	( cat ${ARM}/conf/kern.ldscript.head ; \
20	  OBJDUMP=${OBJDUMP} ${HOST_SH} $S/conf/mkldscript.sh \
21		${SYSTEM_OBJ} ; \
22	  cat ${ARM}/conf/kern.ldscript.tail ) > ldscript
23
24SYSTEM_LD_TAIL_EXTRA+=; \
25	echo \
26	 "${OBJCOPY} -O a.out-arm-netbsd \
27		-R .ident -R .arm.atpcs -R .comment -R .note.netbsd.ident \
28		-R .debug_abbrev -R .debug_info -R .debug_line -R .debug_str \
29		$@ $@.aout"; \
30	${OBJCOPY} -O a.out-arm-netbsd \
31		-R .ident -R .arm.atpcs -R .comment -R .note.netbsd.ident \
32		-R .debug_abbrev -R .debug_info -R .debug_line -R .debug_str \
33		$@ $@.aout
34.endif
35.endif
36