xref: /netbsd-src/sys/arch/sgimips/stand/boot/Makefile (revision c3ab26950fe8540fb553d1d1dcae454bc98e5a25)
1#	$NetBSD: Makefile,v 1.19 2011/02/26 16:26:58 matt Exp $
2
3
4# Don't strip the ECOFF'ed version on install -- strip gets confused by that,
5# and it's already stripped since it's a copy of the stripped ELF one.
6#
7STRIPFLAG=
8
9SRCS=	start.S boot.c bootinfo.c conf.c devopen.c putchar.c getchar.c \
10	getopt.c disk.c arcbios_calls.S
11
12PROG=	aoutboot
13${PROG}: ip2xboot ip3xboot
14.if ${MACHINE_ARCH} == "mipseb"
15	${OBJCOPY} --impure -O ecoff-bigmips \
16		-R .pdr -R .mdebug.nabi32 -R .mdebug.abi32 \
17		-R .comment -R .ident \
18		ip2xboot ${.TARGET}
19.else
20	touch ${.TARGET}
21.endif
22
23# XXX Temporary hack to install the ELF version, too.
24FILES+=		ip2xboot ip3xboot
25CLEANFILES+=	ip2xboot ip2xboot.elf ip3xboot ip3xboot.elf
26
27CLEANFILES+=	ip2xboot.map ip3xboot.map
28
29.include "../Makefile.booters"
30
31ip3xboot: ${OBJS} ${LIBS}
32	${_MKTARGET_LINK}
33	${LD} -Map ${.TARGET}.map -N -x -Ttext ${LOAD_ADDRESS_IP32} ${LDBUG} \
34	    -m elf32btsmip -e start -o ${.TARGET}.elf ${OBJS} ${LIBS}
35	@${STRIP} -s ${.TARGET}.elf -o ${.TARGET}
36	@${SIZE} ${.TARGET}
37
38ip2xboot: ${OBJS} ${LIBS}
39	${_MKTARGET_LINK}
40	${LD} -Map ${.TARGET}.map -N -x -Ttext ${LOAD_ADDRESS} ${LDBUG} \
41	    -m elf32btsmip -e start -o ${.TARGET}.elf ${OBJS} ${LIBS}
42	@${STRIP} -s ${.TARGET}.elf -o ${.TARGET}
43	@${SIZE} ${.TARGET}
44
45cleandir distclean: .WAIT cleanlibdir
46cleanlibdir:
47	-rm -rf lib
48