11.22Srin#	$NetBSD: Makefile,v 1.22 2024/06/29 08:06:56 rin Exp $
21.1Sthorpej
31.1Sthorpej
41.4Srafal# Don't strip the ECOFF'ed version on install -- strip gets confused by that,
51.4Srafal# and it's already stripped since it's a copy of the stripped ELF one.
61.4Srafal#
71.4SrafalSTRIPFLAG=
81.4Srafal
91.6SsekiyaSRCS=	start.S boot.c bootinfo.c conf.c devopen.c putchar.c getchar.c \
101.22Srin	disk.c arcbios_calls.S
111.1Sthorpej
121.15SmattPROG=	aoutboot
131.8Ssekiya${PROG}: ip2xboot ip3xboot
141.15Smatt.if ${MACHINE_ARCH} == "mipseb"
151.21Schristos	${MIPS_ELF2ECOFF} ip2xboot ${.TARGET}
161.15Smatt.else
171.15Smatt	touch ${.TARGET}
181.15Smatt.endif
191.3Sthorpej
201.9Ssekiya# XXX Temporary hack to install the ELF version, too.
211.8SsekiyaFILES+=		ip2xboot ip3xboot
221.13StsutsuiCLEANFILES+=	ip2xboot ip2xboot.elf ip3xboot ip3xboot.elf
231.3Sthorpej
241.15SmattCLEANFILES+=	ip2xboot.map ip3xboot.map
251.3Sthorpej
261.1Sthorpej.include "../Makefile.booters"
271.5Spooka
281.8Ssekiyaip3xboot: ${OBJS} ${LIBS}
291.18Smatt	${_MKTARGET_LINK}
301.15Smatt	${LD} -Map ${.TARGET}.map -N -x -Ttext ${LOAD_ADDRESS_IP32} ${LDBUG} \
311.19Smatt	    -m elf32btsmip -e start -o ${.TARGET}.elf ${OBJS} ${LIBS}
321.13Stsutsui	@${STRIP} -s ${.TARGET}.elf -o ${.TARGET}
331.13Stsutsui	@${SIZE} ${.TARGET}
341.8Ssekiya
351.8Ssekiyaip2xboot: ${OBJS} ${LIBS}
361.18Smatt	${_MKTARGET_LINK}
371.15Smatt	${LD} -Map ${.TARGET}.map -N -x -Ttext ${LOAD_ADDRESS} ${LDBUG} \
381.19Smatt	    -m elf32btsmip -e start -o ${.TARGET}.elf ${OBJS} ${LIBS}
391.13Stsutsui	@${STRIP} -s ${.TARGET}.elf -o ${.TARGET}
401.13Stsutsui	@${SIZE} ${.TARGET}
411.14Stsutsui
421.17Sdhollandcleandir distclean: .WAIT cleanlibdir
431.14Stsutsuicleanlibdir:
441.14Stsutsui	-rm -rf lib
45