Makefile revision 1.18
11.18Stsutsui# $NetBSD: Makefile,v 1.18 2008/05/28 14:04: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.1ScdiCOMSPEED?=115200 481.1ScdiCOMPROBE?=0xa020001c 491.1Scdi 501.16StsutsuiZSCHAN?=0x01 # 0x01: ZS_CHAN_A, 0x00: ZS_CHAN_B 511.16StsutsuiZSSPEED?=115200 521.16StsutsuiZSPROBE?=0xa020001c 531.16Stsutsui 541.1ScdiAFLAGS+= -D_LOCORE -D_KERNEL -DASSEMBLER -mno-abicalls 551.1Scdi 561.1Scdi# -I${.CURDIR}/../.. done by Makefile.inc 571.1ScdiCPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -D_NO_PROM_DEFINES 581.1Scdi# CPPFLAGS+= -D_DEBUG 591.13StsutsuiCPPFLAGS+= -I${.OBJDIR} -I${S} -I${S}/arch -I${LIBSADIR} 601.17StsutsuiCPPFLAGS+= -DCONS_SERIAL -DCOMPORT=${COMPORT} 611.1ScdiCPPFLAGS+= -DCOMSPEED=${COMSPEED} -DCOMPROBE=${COMPROBE} 621.17StsutsuiCPPFLAGS+= -DCONS_ZS -DZSCHAN=${ZSCHAN} 631.16StsutsuiCPPFLAGS+= -DZSSPEED=${ZSSPEED} -DZSPROBE=${ZSPROBE} 641.12StsutsuiCPPFLAGS+= -DSUPPORT_DHCP -DSUPPORT_BOOTP 651.12Stsutsui#CPPFLAGS+= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG 661.12Stsutsui#CPPFLAGS+= -DRPC_DEBUG -DRARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID 671.1Scdi 681.1Scdi# compiler flags for smallest code size 691.1ScdiCFLAGS= -Os -mmemcpy -ffreestanding -mno-abicalls -msoft-float -G 128 701.1Scdi 711.15StsutsuiCFLAGS+= -Wall -Werror 721.15StsutsuiCFLAGS+= -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 731.15StsutsuiCFLAGS+= -Wno-pointer-sign 741.15Stsutsui 751.3SlukemNETBSD_VERS!= ${HOST_SH} ${S}/conf/osrelease.sh 761.1ScdiCPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"' 771.1Scdi 781.1ScdiLDSCRIPT?= ${MIPS}/conf/stand.ldscript 791.1Scdi 801.1ScdiPROG= boot 811.1Scdi# common sources 821.5ScdiSRCS+= start.S boot.c devopen.c conf.c clock.c bootinfo.c 831.7StsutsuiSRCS+= prf.c com.c cons.c ns16550.c pciide.c tgets.c wdc.c wd.c 841.16StsutsuiSRCS+= zs.c 851.14StsutsuiSRCS+= cache.c pci.c nif_tlp.c tlp.c 861.18StsutsuiSRCS+= lcd.c 871.12Stsutsui 881.12Stsutsui# XXX dev_net.c should really be in libsa, but it doesn't 891.12Stsutsui# declare ip_convertaddr correctly. 901.12Stsutsui.PATH: ${LIBSADIR} 911.12StsutsuiSRCS+= dev_net.c 921.1Scdi 931.1ScdiSRCS+= vers.c 941.1ScdiCLEANFILES+= vers.c 951.1Scdi 961.1Scdi### find out what to use for libkern 971.1ScdiKERN_AS= library 981.1Scdi.include "${S}/lib/libkern/Makefile.inc" 991.1Scdi 1001.1Scdi### find out what to use for libz 1011.1ScdiZ_AS= library 1021.1Scdi.include "${S}/lib/libz/Makefile.inc" 1031.1Scdi 1041.1Scdi### find out what to use for libsa 1051.1ScdiSA_AS= library 1061.1ScdiSAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes 1071.1Scdi.include "${S}/lib/libsa/Makefile.inc" 1081.1Scdi 1091.11SuweLIBS= ${SALIB} ${ZLIB} ${KERNLIB} 1101.1Scdi 1111.1Scdi.PHONY: vers.c 1121.1Scdivers.c: ${.CURDIR}/version 1131.3Slukem ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "cobalt" 1141.1Scdi 1151.1Scdi${PROG}: machine-links ${LDSCRIPT} ${OBJS} ${LIBS} 1161.9Ssimonb ${LD} -Map ${PROG}.map -N -x -Ttext ${LOAD_ADDRESS} \ 1171.1Scdi -T ${LDSCRIPT} -e start -o ${PROG} ${OBJS} ${LIBS} 1181.1Scdi gzip -c9 ${PROG} > ${PROG}.gz 1191.1Scdi @${SIZE} ${PROG} 1201.1Scdi 1211.1ScdiCLEANFILES+= ${PROG}.map ${PROG}.elf ${PROG}.gz 1221.1Scdi 1231.1Scdicleandir distclean: cleanlibdir 1241.1Scdi 1251.1Scdicleanlibdir: 1261.8Sjmc -rm -rf lib 1271.1Scdi 1281.1Scdi.include <bsd.prog.mk> 129