Makefile revision 1.18
11.18Sgarbled# $NetBSD: Makefile,v 1.18 2000/10/28 15:41:25 garbled Exp $ 21.1Stsubai 31.1StsubaiS= ${.CURDIR}/../../../.. 41.1Stsubai 51.1StsubaiPROG= ofwboot 61.12SdmcmahilFILES= ${PROG}.elf ${PROG}.xcf 71.16StsubaiSRCS= Locore.c boot.c ofdev.c net.c netif_of.c vers.c 81.7SwrstudenXCOFFXTRA= Xcoffxtra.c 91.7SwrstudenXCOFFXTRAOBJ= Xcoffxtra.o 101.9StsubaiCFLAGS+= -msoft-float 111.9Stsubai#CFLAGS+= -DDEBUG -DNETIF_DEBUG 121.10SmycroftCPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP 131.14StsubaiDBG= -Os -mmultiple 141.9Stsubai 151.1Stsubai.PATH: ${S}/arch/powerpc/powerpc 161.1StsubaiSRCS+= ofwmagic.S 171.9Stsubai 181.4SlukemMKMAN= no 191.1StsubaiSTRIPFLAG= 201.1StsubaiBINMODE= 444 211.1StsubaiOBJCOPY?= objcopy 221.1Stsubai 231.7Swrstuden.if !defined(FIXCOFF) 241.7Swrstuden.ifnmake(print-objdir) 251.7SwrstudenFIXCOFFDIR!= cd ${.CURDIR}/../fixcoff; ${MAKE} print-objdir 261.7SwrstudenFIXCOFF= ${FIXCOFFDIR}/fixcoff 271.7SwrstudenFIXCOFFTARG= ${FIXCOFF} 281.7Swrstuden 291.7Swrstuden${FIXCOFF}: 301.18Sgarbled (cd ${.CURDIR}/../fixcoff; ${MAKE}) 311.7Swrstuden 321.7Swrstuden.endif 331.7Swrstuden.else 341.7SwrstudenFIXCOFFTARG= 351.7Swrstuden.endif 361.7Swrstuden 371.1StsubaiNEWVERSWHAT= "OpenFirmware Boot" 381.1Stsubai 391.1Stsubai# For now... 401.1Stsubai#RELOC= 20000 411.17SwrstudenRELOC= 600000 421.1Stsubai 431.1StsubaiENTRY= _start 441.1Stsubai 451.15StsubaiCLEANFILES+= vers.c ${PROG}.elf ${PROG}.mrg ${PROG}.xcf 461.1Stsubai 471.5StsubaiCPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. 481.1StsubaiCPPFLAGS+= -DRELOC=0x${RELOC} 491.1Stsubai#CPPFLAGS+= -DXCOFF_GLUE # for booting PCI Powermacs 501.1Stsubai 511.8SmycroftCLEANFILES+= ${XCOFFXTRAOBJ} 521.5Stsubai 531.5Stsubai.BEGIN: 541.5Stsubai @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine 551.5Stsubai @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc 561.8Smycroft.NOPATH: machine powerpc 571.8SmycroftCLEANFILES+= machine powerpc 581.5Stsubai 591.1Stsubai### find out what to use for libkern 601.1StsubaiKERN_AS= library 611.1Stsubai.include "${S}/lib/libkern/Makefile.inc" 621.1StsubaiLIBKERN= ${KERNLIB} 631.1Stsubai 641.1Stsubai### find out what to use for libz 651.1StsubaiZ_AS= library 661.1Stsubai.include "${S}/lib/libz/Makefile.inc" 671.1StsubaiLIBZ= ${ZLIB} 681.1Stsubai 691.1Stsubai### find out what to use for libsa 701.1StsubaiSA_AS= library 711.5StsubaiSAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 721.1Stsubai.include "${S}/lib/libsa/Makefile.inc" 731.1StsubaiLIBSA= ${SALIB} 741.1Stsubai 751.13Sjdolecek.PHONY: vers.c 761.13Sjdolecekvers.c: version 771.13Sjdolecek sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version "macppc" ${NEWVERSWHAT} 781.13Sjdolecek 791.7Swrstuden${PROG}: ${OBJS} ${XCOFFXTRAOBJ} ${LIBSA} ${LIBZ} ${LIBKERN} ${FIXCOFFTARG} 801.7Swrstuden ${LD} -s -N -Ttext ${RELOC} -Bstatic -o ${PROG}.elf \ 811.14Stsubai ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 821.5Stsubai ${OBJCOPY} -O binary ${PROG}.elf ${PROG} 831.7Swrstuden ${LD} -s -N -T ${.CURDIR}/../fixcoff/elf32_powerpc_merge.x -e _entry \ 841.7Swrstuden -Ttext ${RELOC} -Bstatic -o ${PROG}.mrg ${XCOFFXTRAOBJ} \ 851.14Stsubai ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 861.7Swrstuden ${OBJCOPY} -O aixcoff-rs6000 -R .comment -R .note \ 871.7Swrstuden ${PROG}.mrg ${PROG}.xcf 881.7Swrstuden ${FIXCOFF} ${PROG}.xcf 891.1Stsubai 901.1Stsubai.include <bsd.prog.mk> 91