Makefile revision 1.8
11.66Sabs# $NetBSD: Makefile,v 1.8 2011/01/22 19:19:23 joerg Exp $ 21.1Sws 31.47SgmcgarryPROG= ip30boot 41.47Sgmcgarry 51.47SgmcgarrySRCS= start64.S boot.c bootinfo.c conf.c devopen.c putchar.c getchar.c \ 61.47Sgmcgarry getopt.c disk.c 71.47Sgmcgarry 81.1SwsCLEANFILES+= boot.map 91.47Sgmcgarry 101.47Sgmcgarry.include <bsd.own.mk> 111.47Sgmcgarry.include <bsd.sys.mk> # for HOST_SH 121.47Sgmcgarry 131.47Sgmcgarry# $S must correspond to the top of the 'sys' tree 141.47SgmcgarryS= ${.CURDIR}/../../../.. 151.47Sgmcgarry 161.47SgmcgarryBINMODE?= 444 171.47Sgmcgarry 181.47Sgmcgarryrealall: ${PROG} 191.47Sgmcgarry 201.1Sws.PATH: ${.CURDIR}/../common 211.47SgmcgarryAFLAGS+= -D_LOCORE -D_KERNEL -mno-abicalls -mabi=64 -D_LP64 221.23ShubertfCPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S} 231.52Satatat# compiler flags for smallest code size 241.52SatatatCFLAGS= -ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024 -mabi=64 -D_LP64 251.66SabsLDBUG= -T $S/arch/mips/conf/stand.ldscript 261.1SwsNETBSD_VERS!= ${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh 271.1SwsCPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"' 281.1Sws 291.1SwsCPPFLAGS+= -Dsgimips 301.6Slukem 311.1Sws# PROG set by parent. 321.34SthorpejNOMAN= # defined 331.34Sthorpej 341.34Sthorpej# We load the kernel at 420K in from the start of RAM to give the boot 351.34Sthorpej# loader plenty of breathing room. Load the boot loader starting at 361.58Sprovos# the second page of RAM. 371.34Sthorpej 381.34SthorpejLOAD_ADDRESS_IP30?= 0xa800000020080000 391.34Sthorpej 401.45Slukem# if there is a 'version' file, add rule for vers.c and add it to SRCS 411.45Slukem# and CLEANFILES 421.45Slukem.if exists(version) 431.45Slukem.PHONY: vers.c 441.34Sthorpejvers.c: ${.CURDIR}/version 451.34Sthorpej ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ 461.34Sthorpej ${.CURDIR}/version "sgimips" 471.34Sthorpej 481.50SjdolecekSRCS+= vers.c 491.55SlukemCLEANFILES+= vers.c 501.50Sjdolecek.endif 511.34Sthorpej 521.34Sthorpej### find out what to use for libkern 531.34SthorpejKERN_AS= library 541.45SlukemKERNMISCMAKEFLAGS+= LD="${LD} -m elf64btsmip" RANLIB="true" 551.34Sthorpej.include "${S}/lib/libkern/Makefile.inc" 561.34SthorpejLIBKERN= ${KERNLIB} 571.34Sthorpej 581.1Sws### find out what to use for libz 591.54SchsZ_AS= library 601.5SthorpejZMISCMAKEFLAGS+= LD="${LD} -m elf64btsmip" RANLIB="true" 611.34Sthorpej.include "${S}/lib/libz/Makefile.inc" 621.34SthorpejLIBZ= ${ZLIB} 631.34Sthorpej 641.34Sthorpej### find out what to use for libsa 651.34SthorpejSA_AS= library 661.34SthorpejSAMISCMAKEFLAGS+= SA_USE_LOADFILE=yes SA_USE_CREAD=yes \ 671.34Sthorpej LD="${LD} -m elf64btsmip" RANLIB="true" 681.34Sthorpej.include "${S}/lib/libsa/Makefile.inc" 691.11SdrochnerLIBSA= ${SALIB} 701.45Slukem 711.39Sabs 721.1SwsLIBS= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} 731.34Sthorpej 741.34Sthorpejip30boot: ${OBJS} ${LIBS} 751.34Sthorpej ${LD} -m elf64btsmip -Map boot.map -x -Ttext ${LOAD_ADDRESS_IP30} \ 761.34Sthorpej ${LDBUG} -e start -o ${.TARGET} ${OBJS} ${LIBS} 771.34Sthorpej 781.34Sthorpejcleandir distclean: .WAIT cleanlibdir 791.34Sthorpejcleanlibdir: 801.34Sthorpej -rm -rf lib 811.34Sthorpej 821.34Sthorpej.include <bsd.klinks.mk> 831.34Sthorpej.include <bsd.prog.mk> 841.22Swrstuden