Makefile revision 1.12
11.12Stsutsui# $NetBSD: Makefile,v 1.12 2007/10/30 15:07:07 tsutsui Exp $ 21.3Slukem 31.4StsutsuiNOMAN= # defined 41.4Stsutsui 51.4Stsutsui.include <bsd.own.mk> 61.3Slukem.include <bsd.sys.mk> # for HOST_SH 71.1Scdi 81.1ScdiS= ${.CURDIR}/../../../.. 91.1ScdiMIPS= ${S}/arch/mips 101.1ScdiCOBALT= ${S}/arch/cobalt 111.12StsutsuiLIBSADIR= ${S}/lib/libsa 121.1Scdi 131.1Scdi# .PATH: ${.CURDIR}/../common 141.1Scdi 151.1ScdiBINMODE?= 444 161.2Ssimonb 171.2Ssimonb# XXX SHOULD NOT NEED TO DEFINE THESE! 181.2SsimonbLIBCRT0= 191.2SsimonbLIBC= 201.2SsimonbLIBCRTBEGIN= 211.2SsimonbLIBCRTEND= 221.1Scdi 231.1Scdi.PHONY: machine-links 241.1Scdibeforedepend: machine-links 251.1Scdi 261.1Scdimachine-links: machine cobalt mips 271.1Scdimachine cobalt: 281.1Scdi -rm -f ${.TARGET} 291.1Scdi ln -s ${COBALT}/include ${.TARGET} 301.1Scdi 311.1Scdimips: 321.1Scdi -rm -f ${.TARGET} 331.1Scdi ln -s ${MIPS}/include ${.TARGET} 341.1Scdi 351.1ScdiCLEANFILES+= machine cobalt mips 361.1Scdi 371.1Scdirealall: machine-links ${PROG} 381.1Scdi 391.6Scdi# Load @15Mb boundary as most (all?) of the Cobalt boxes 401.6Scdi# had been shipped with at least 16Mb. 411.6Scdi# 421.6Scdi# XXX The proper fix is to load at the kernel base address 431.6Scdi# and to relocate itself at the end of available memory. 441.6ScdiLOAD_ADDRESS?=0x80F00000 451.1Scdi 461.1ScdiCOMPORT?=0x0 471.1ScdiCOMBASE?=0xbc800000 481.1ScdiCOMSPEED?=115200 491.1ScdiCOMPROBE?=0xa020001c 501.1Scdi 511.1ScdiAFLAGS+= -D_LOCORE -D_KERNEL -DASSEMBLER -mno-abicalls 521.1Scdi 531.1Scdi# -I${.CURDIR}/../.. done by Makefile.inc 541.1ScdiCPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -D_NO_PROM_DEFINES 551.1Scdi# CPPFLAGS+= -D_DEBUG 561.12StsutsuiCPPFLAGS+= -I${.OBJDIR} -I${S} -I${LIBSADIR} 571.1ScdiCPPFLAGS+= -DCONS_SERIAL -DCOMBASE=${COMBASE} -DCOMPORT=${COMPORT} 581.1ScdiCPPFLAGS+= -DCOMSPEED=${COMSPEED} -DCOMPROBE=${COMPROBE} 591.12StsutsuiCPPFLAGS+= -DSUPPORT_DHCP -DSUPPORT_BOOTP 601.12Stsutsui#CPPFLAGS+= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG 611.12Stsutsui#CPPFLAGS+= -DRPC_DEBUG -DRARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID 621.1Scdi 631.1Scdi# compiler flags for smallest code size 641.1ScdiCFLAGS= -Os -mmemcpy -ffreestanding -mno-abicalls -msoft-float -G 128 651.1Scdi 661.3SlukemNETBSD_VERS!= ${HOST_SH} ${S}/conf/osrelease.sh 671.1ScdiCPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"' 681.1Scdi 691.1ScdiLDSCRIPT?= ${MIPS}/conf/stand.ldscript 701.1Scdi 711.1ScdiPROG= boot 721.1Scdi# common sources 731.5ScdiSRCS+= start.S boot.c devopen.c conf.c clock.c bootinfo.c 741.7StsutsuiSRCS+= prf.c com.c cons.c ns16550.c pciide.c tgets.c wdc.c wd.c 751.12StsutsuiSRCS+= cache.c nif_tlp.c tlp.c 761.12Stsutsui 771.12Stsutsui# XXX dev_net.c should really be in libsa, but it doesn't 781.12Stsutsui# declare ip_convertaddr correctly. 791.12Stsutsui.PATH: ${LIBSADIR} 801.12StsutsuiSRCS+= dev_net.c 811.1Scdi 821.1ScdiSRCS+= vers.c 831.1ScdiCLEANFILES+= vers.c 841.1Scdi 851.1Scdi### find out what to use for libkern 861.1ScdiKERN_AS= library 871.1Scdi.include "${S}/lib/libkern/Makefile.inc" 881.1Scdi 891.1Scdi### find out what to use for libz 901.1ScdiZ_AS= library 911.1Scdi.include "${S}/lib/libz/Makefile.inc" 921.1Scdi 931.1Scdi### find out what to use for libsa 941.1ScdiSA_AS= library 951.1ScdiSAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes 961.1Scdi.include "${S}/lib/libsa/Makefile.inc" 971.1Scdi 981.11SuweLIBS= ${SALIB} ${ZLIB} ${KERNLIB} 991.1Scdi 1001.1Scdi.PHONY: vers.c 1011.1Scdivers.c: ${.CURDIR}/version 1021.3Slukem ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "cobalt" 1031.1Scdi 1041.1Scdi${PROG}: machine-links ${LDSCRIPT} ${OBJS} ${LIBS} 1051.9Ssimonb ${LD} -Map ${PROG}.map -N -x -Ttext ${LOAD_ADDRESS} \ 1061.1Scdi -T ${LDSCRIPT} -e start -o ${PROG} ${OBJS} ${LIBS} 1071.1Scdi gzip -c9 ${PROG} > ${PROG}.gz 1081.1Scdi @${SIZE} ${PROG} 1091.1Scdi 1101.1ScdiCLEANFILES+= ${PROG}.map ${PROG}.elf ${PROG}.gz 1111.1Scdi 1121.1Scdicleandir distclean: cleanlibdir 1131.1Scdi 1141.1Scdicleanlibdir: 1151.8Sjmc -rm -rf lib 1161.1Scdi 1171.1Scdi.include <bsd.prog.mk> 118