Makefile.cats.inc revision 1.16
11.16Schs#	$NetBSD: Makefile.cats.inc,v 1.16 2004/09/13 09:39:40 chs 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.16Schs	  OBJDUMP=${OBJDUMP} ${HOST_SH} ${ARM}/conf/mkldscript.sh \
211.16Schs		${SYSTEM_OBJ} ; \
221.16Schs	  cat ${ARM}/conf/kern.ldscript.tail ) > ldscript
231.3Schris
241.8SskrllSYSTEM_LD_TAIL_EXTRA+=; \
251.10Stsutsui	echo "${DBSYM} $@ || true"; \
261.4Schris	${DBSYM} $@ || true; \
271.12Schris	echo \
281.14Smatt	 "${OBJCOPY} -O a.out-arm-netbsd -R .ident -R .arm.atpcs -R .comment $@ $@.aout"; \
291.14Smatt	${OBJCOPY} -O a.out-arm-netbsd -R .ident -R .arm.atpcs -R .comment $@ $@.aout
301.15Schris.endif
311.7Sskrll.endif
32