1 1.1 thorpej # $NetBSD: Makefile.booters,v 1.1 2001/11/21 19:09:06 thorpej Exp $ 2 1.1 thorpej 3 1.1 thorpej # $S must correspond to the top of the 'sys' tree 4 1.1 thorpej S= ${.CURDIR}/../../../.. 5 1.1 thorpej 6 1.1 thorpej .BEGIN: machine sgimips mips 7 1.1 thorpej ${PROG} realdepend realall: machine sgimips mips 8 1.1 thorpej CLEANFILES+= machine sgimips mips 9 1.1 thorpej machine: 10 1.1 thorpej -rm -f ${.TARGET} 11 1.1 thorpej ln -s $S/arch/${MACHINE}/include ${.TARGET} 12 1.1 thorpej sgimips: 13 1.1 thorpej -rm -f ${.TARGET} 14 1.1 thorpej ln -s $S/arch/${MACHINE}/include ${.TARGET} 15 1.1 thorpej mips: 16 1.1 thorpej -rm -f ${.TARGET} 17 1.1 thorpej ln -s $S/arch/mips/include mips 18 1.1 thorpej 19 1.1 thorpej BINMODE?= 444 20 1.1 thorpej 21 1.1 thorpej .PATH: ${.CURDIR}/../common 22 1.1 thorpej AFLAGS+= -D_LOCORE -D_KERNEL 23 1.1 thorpej # -I${.CURDIR}/../.. done by Makefile.inc 24 1.1 thorpej #CPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -DHEAP_VARIABLE -I${.OBJDIR} -I${S} 25 1.1 thorpej CPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S} 26 1.1 thorpej # compiler flags for smallest code size 27 1.1 thorpej CFLAGS= -Os -g -mmemcpy -mno-abicalls -G 128 28 1.1 thorpej LDBUG= -T $S/arch/mips/conf/stand.ldscript 29 1.1 thorpej 30 1.1 thorpej NETBSD_VERS!= sh ${.CURDIR}/../../../../conf/osrelease.sh 31 1.1 thorpej CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"' 32 1.1 thorpej 33 1.1 thorpej # PROG set by parent. 34 1.1 thorpej MKMAN= no 35 1.1 thorpej LOAD_ADDRESS?= 0x89000000 36 1.1 thorpej SRCS+= vers.c 37 1.1 thorpej CLEANFILES+= vers.c 38 1.1 thorpej 39 1.1 thorpej ### find out what to use for libkern 40 1.1 thorpej KERN_AS= library 41 1.1 thorpej .include "${S}/lib/libkern/Makefile.inc" 42 1.1 thorpej LIBKERN= ${KERNLIB} 43 1.1 thorpej 44 1.1 thorpej ### find out what to use for libz 45 1.1 thorpej Z_AS= library 46 1.1 thorpej .include "${S}/lib/libz/Makefile.inc" 47 1.1 thorpej LIBZ= ${ZLIB} 48 1.1 thorpej 49 1.1 thorpej ### find out what to use for libsa 50 1.1 thorpej SA_AS= library 51 1.1 thorpej SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes 52 1.1 thorpej # for now: 53 1.1 thorpej SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no 54 1.1 thorpej .include "${S}/lib/libsa/Makefile.inc" 55 1.1 thorpej LIBSA= ${SALIB} 56 1.1 thorpej 57 1.1 thorpej LIBS= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} 58 1.1 thorpej 59 1.1 thorpej .PHONY: vers.c 60 1.1 thorpej vers.c: ${.CURDIR}/version 61 1.1 thorpej sh ${S}/conf/newvers_stand.sh -N ${.CURDIR}/version "sgimips" 62 1.1 thorpej 63 1.1 thorpej ${PROG}: machine mips sgimips ${OBJS} ${LIBS} 64 1.1 thorpej ${LD} -Map ${PROG}.map -x -Ttext ${LOAD_ADDRESS} ${LDBUG} \ 65 1.1 thorpej -e start -o ${PROG} ${OBJS} ${LIBS} 66 1.1 thorpej @${SIZE} ${PROG} 67 1.1 thorpej .if defined(CHECKSIZE_CMD) 68 1.1 thorpej @${CHECKSIZE_CMD} ${PROG} ${PRIMARY_MAX_LOAD} ${PRIMARY_MAX_TOTAL} || \ 69 1.1 thorpej (rm -f ${PROG} ; false) 70 1.1 thorpej .endif 71 1.1 thorpej 72 1.1 thorpej CLEANFILES+= ${PROG}.map 73 1.1 thorpej 74 1.1 thorpej cleandir distclean: cleanlibdir 75 1.1 thorpej 76 1.1 thorpej cleanlibdir: 77 1.1 thorpej rm -rf lib 78 1.1 thorpej 79 1.1 thorpej .include <bsd.prog.mk> 80