1*cb5e99c6Schristos# $NetBSD: Makefile,v 1.32 2017/04/08 19:53:22 christos Exp $ 21bd80ab6Sthorpej 329070a7eStsutsuiS!= cd ${.CURDIR}/../../../.. ; pwd 41bd80ab6Sthorpej 51bd80ab6SthorpejPROG= ofwboot 6c7d2d668SjoergNOMAN= # defined 7ad129353SphxSRCS= ofwstart.S Locore.c boot.c ofdev.c net.c netif_of.c 8*cb5e99c6SchristosSRCS+= mbr.c rdb.c 94ca7de0cSjoergCFLAGS+= ${${ACTIVE_CC} == "gcc":? -msoft-float :} 104ca7de0cSjoergCFLAGS+= -Wno-main -ffreestanding 11e7cdb229StsutsuiCFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 12dc535894Sgarbled#CPPFLAGS+= -g -DALLOC_TRACE -DDEBUG #-DOFW_DEBUG -DNETIF_DEBUG 13ddf7aaf7Sgarbled#CPPFLAGS+= -DOFWDUMP 1442e835d3SthorpejCPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP -I${.CURDIR} 15dc535894SgarbledCPPFLAGS+= -DHEAP_VARIABLE 16c7d2d668Sjoerg 17c7d2d668Sjoerg.include <bsd.own.mk> 1874e5ca23Smatt.include <bsd.klinks.mk> 19c7d2d668Sjoerg 200c7d9d48SjoergDBG= -Os 2142e835d3Sthorpej 221bd80ab6SthorpejSRCS+= ofwmagic.S 23e922c9cfSsakamoto.PATH: ${S}/arch/powerpc/powerpc 2442e835d3Sthorpej 2573941c50SitojunSRCS+= byteorder.c 2673941c50Sitojun.PATH: ${S}/lib/libsa 2773941c50Sitojun 28d76ea6e4SthorpejSTRIPFLAG= 291bd80ab6SthorpejBINMODE= 444 301bd80ab6Sthorpej 31fe200beaSsimonb# XXX SHOULD NOT NEED TO DEFINE THESE! 32fe200beaSsimonbLIBCRT0= 338c436a98StsutsuiLIBCRTI= 34fe200beaSsimonbLIBC= 35fe200beaSsimonbLIBCRTBEGIN= 36fe200beaSsimonbLIBCRTEND= 37fe200beaSsimonb 381bd80ab6SthorpejNEWVERSWHAT= "OpenFirmware Boot" 391bd80ab6Sthorpej 401bd80ab6Sthorpej# For now... 411bd80ab6SthorpejRELOC= 20000 421bd80ab6Sthorpej 431bd80ab6SthorpejENTRY= _start 441bd80ab6Sthorpej 4529070a7eStsutsuiCPPFLAGS+= -I. -I${S} -I${S}/../common/include 461bd80ab6SthorpejCPPFLAGS+= -DRELOC=0x${RELOC} 471bd80ab6SthorpejCPPFLAGS+= -DFIRMWORKSBUGS 48e3d8e9c7SdrochnerCPPFLAGS+= -DCOMPAT_386BSD_MBRPART 491bd80ab6Sthorpej 501bd80ab6Sthorpej### find out what to use for libkern 511bd80ab6SthorpejKERN_AS= library 521bd80ab6Sthorpej.include "${S}/lib/libkern/Makefile.inc" 531bd80ab6SthorpejLIBKERN= ${KERNLIB} 541bd80ab6Sthorpej 551bd80ab6Sthorpej### find out what to use for libz 561bd80ab6SthorpejZ_AS= library 571bd80ab6Sthorpej.include "${S}/lib/libz/Makefile.inc" 581bd80ab6SthorpejLIBZ= ${ZLIB} 591bd80ab6Sthorpej 601bd80ab6Sthorpej### find out what to use for libsa 611bd80ab6SthorpejSA_AS= library 6242e835d3SthorpejSAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 631bd80ab6Sthorpej.include "${S}/lib/libsa/Makefile.inc" 641bd80ab6SthorpejLIBSA= ${SALIB} 651bd80ab6Sthorpej 661bd80ab6Sthorpej${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 6774e5ca23Smatt ${_MKTARGET_LINK} 68dc6a7fd2Sgarbled ${LD} -s -N -T ${.CURDIR}/ldscript -Ttext ${RELOC} -Bstatic \ 69dc6a7fd2Sgarbled -e ${ENTRY} -o ${PROG}.X ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 70c0b55350Schs mv -f ${PROG}.X ${PROG} 711bd80ab6Sthorpej 72*cb5e99c6Schristos.include "${S}/conf/newvers_stand.mk" 73*cb5e99c6Schristos 741bd80ab6Sthorpej.include <bsd.prog.mk> 75