xref: /netbsd-src/sys/arch/sgimips/stand/bootiris/Makefile (revision d02e022db788ed4933c5904d9d6ce3af08f11fee)
1#	$NetBSD: Makefile,v 1.1 2019/01/12 16:44:47 tsutsui Exp $
2
3# Silicon Graphics "IRIS" series MIPS processors machine.
4STRIPFLAG=
5# If you try to use ARCBIOS(Indy or Indigo R4000) machine, Please comment it out!
6# Be sure to edit /sgimips/stand/common/iris_machdep.h!
7PRE_ARCS= yes
8
9.if defined(PRE_ARCS)
10SRCS=   iris_start.S
11.else
12SRCS=   start.S arcbios_calls.S
13.endif
14
15SRCS+=  iris_boot.c
16SRCS+=  bootinfo.c
17SRCS+=  iris_prf.c iris_cons.c iris_zs.c
18SRCS+=  iris_parse.c
19SRCS+=  iris_autoconf.c iris_scsi.c
20SRCS+=  iris_disk.c
21SRCS+=  iris_scsictl.c
22SRCS+=  iris_conf.c
23SRCS+=  iris_devopen.c
24
25PROG=	irisboot
26${PROG}: ip12boot
27.if ${MACHINE_ARCH} == "mipseb"
28	cp ip12boot ip12boot.tmp
29	${MIPS_ELF2ECOFF} ip12boot.tmp ${.TARGET}
30.else
31	touch ${.TARGET}
32.endif
33
34# XXX Temporary hack to install the ELF version, too.
35FILES+=		ip12boot
36CLEANFILES+=	ip12boot ip12boot.elf
37
38CLEANFILES+=	ip12boot.map
39
40CLEANFILES+=	ip12boot.tmp
41
42.include "../Makefile.booters"
43
44ip12boot: ${OBJS} ${LIBS}
45	${_MKTARGET_LINK}
46.if defined(PRE_ARCS)
47	${LD} -Map ${.TARGET}.map -N -x -Ttext ${LOAD_ADDRESS_IP12} ${LDBUG} \
48	    -m elf32btsmip -e start -o ${.TARGET}.elf ${OBJS} ${LIBS}
49.else
50	${LD} -Map ${.TARGET}.map -N -x -Ttext ${LOAD_ADDRESS} ${LDBUG} \
51	    -m elf32btsmip -e start -o ${.TARGET}.elf ${OBJS} ${LIBS}
52.endif
53	@${STRIP} -s ${.TARGET}.elf -o ${.TARGET}
54	@${SIZE} ${.TARGET}
55
56cleandir distclean: .WAIT cleanlibdir
57cleanlibdir:
58	-rm -rf lib
59