Makefile.cats.inc revision 1.27
11.27Sskrll#	$NetBSD: Makefile.cats.inc,v 1.27 2013/08/17 19:57:09 skrll Exp $
21.13Sthorpej
31.26SmattMACHINE_ARCH?=	arm
41.13SthorpejCPPFLAGS+=	-D${MACHINE}
51.3Schris
61.15Schris.if defined(ABLEELF) && (${ABLEELF} == "1")
71.15Schris# use a standard ELF format, adjusted to align areas
81.15SchrisLINKFLAGS=	-T ${THISARM}/conf/ldscript.elf
91.15Schris
101.15Schris.else
111.12Schris# Need to convert the kernel from ELF to a.out so that the firmware
121.5Sthorpej# can load it.
131.3Schris
141.27SskrllCFLAGS+=	-fno-unwind-tables
151.27Sskrll
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.25Stsutsui	echo "${OBJCOPY} ${OBJCOPY_ELF2AOUT_FLAGS} $@ $@.aout"; \
261.25Stsutsui	${OBJCOPY} ${OBJCOPY_ELF2AOUT_FLAGS} $@ $@.aout
271.15Schris.endif
28