Makefile.cats.inc revision 1.18
11.18Stsutsui#	$NetBSD: Makefile.cats.inc,v 1.18 2007/03/04 02:35:49 tsutsui Exp $
21.13Sthorpej
31.16SchsMACHINE_ARCH=	arm
41.13SthorpejCPPFLAGS+=	-D${MACHINE}
51.3Schris
61.3Schris.if (${OBJECT_FMT} == "ELF")
71.15Schris
81.15Schris.if defined(ABLEELF) && (${ABLEELF} == "1")
91.15Schris# use a standard ELF format, adjusted to align areas
101.15SchrisLINKFLAGS=	-T ${THISARM}/conf/ldscript.elf
111.15Schris
121.15Schris.else
131.12Schris# Need to convert the kernel from ELF to a.out so that the firmware
141.5Sthorpej# can load it.
151.3Schris
161.16SchsLINKFLAGS=	-T ldscript
171.16Schs
181.16SchsSYSTEM_LD_HEAD_EXTRA+=; \
191.16Schs	( cat ${ARM}/conf/kern.ldscript.head ; \
201.18Stsutsui	  OBJDUMP=${OBJDUMP} ${HOST_SH} $S/conf/mkldscript.sh \
211.16Schs		${SYSTEM_OBJ} ; \
221.16Schs	  cat ${ARM}/conf/kern.ldscript.tail ) > ldscript
231.3Schris
241.8SskrllSYSTEM_LD_TAIL_EXTRA+=; \
251.12Schris	echo \
261.14Smatt	 "${OBJCOPY} -O a.out-arm-netbsd -R .ident -R .arm.atpcs -R .comment $@ $@.aout"; \
271.14Smatt	${OBJCOPY} -O a.out-arm-netbsd -R .ident -R .arm.atpcs -R .comment $@ $@.aout
281.15Schris.endif
291.7Sskrll.endif
30