xref: /netbsd/sys/arch/sgimips/stand/boot/Makefile (revision f66d9444)
1#	$NetBSD: Makefile,v 1.21 2019/01/01 19:41:05 christos 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	${MIPS_ELF2ECOFF} ip2xboot ${.TARGET}
16.else
17	touch ${.TARGET}
18.endif
19
20# XXX Temporary hack to install the ELF version, too.
21FILES+=		ip2xboot ip3xboot
22CLEANFILES+=	ip2xboot ip2xboot.elf ip3xboot ip3xboot.elf
23
24CLEANFILES+=	ip2xboot.map ip3xboot.map
25
26.include "../Makefile.booters"
27
28ip3xboot: ${OBJS} ${LIBS}
29	${_MKTARGET_LINK}
30	${LD} -Map ${.TARGET}.map -N -x -Ttext ${LOAD_ADDRESS_IP32} ${LDBUG} \
31	    -m elf32btsmip -e start -o ${.TARGET}.elf ${OBJS} ${LIBS}
32	@${STRIP} -s ${.TARGET}.elf -o ${.TARGET}
33	@${SIZE} ${.TARGET}
34
35ip2xboot: ${OBJS} ${LIBS}
36	${_MKTARGET_LINK}
37	${LD} -Map ${.TARGET}.map -N -x -Ttext ${LOAD_ADDRESS} ${LDBUG} \
38	    -m elf32btsmip -e start -o ${.TARGET}.elf ${OBJS} ${LIBS}
39	@${STRIP} -s ${.TARGET}.elf -o ${.TARGET}
40	@${SIZE} ${.TARGET}
41
42cleandir distclean: .WAIT cleanlibdir
43cleanlibdir:
44	-rm -rf lib
45