1 1.29 tsutsui # $NetBSD: Makefile,v 1.29 2014/01/12 15:26:30 tsutsui Exp $ 2 1.1 thorpej 3 1.19 tsutsui S!= cd ${.CURDIR}/../../../.. ; pwd 4 1.1 thorpej 5 1.1 thorpej PROG= ofwboot 6 1.27 joerg NOMAN= # defined 7 1.25 phx SRCS= ofwstart.S Locore.c boot.c ofdev.c net.c netif_of.c 8 1.25 phx SRCS+= mbr.c rdb.c vers.c 9 1.15 simonb CFLAGS+= -msoft-float -Wno-main -ffreestanding 10 1.24 tsutsui CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 11 1.21 garbled #CPPFLAGS+= -g -DALLOC_TRACE -DDEBUG #-DOFW_DEBUG -DNETIF_DEBUG 12 1.22 garbled #CPPFLAGS+= -DOFWDUMP 13 1.10 thorpej CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP -I${.CURDIR} 14 1.21 garbled CPPFLAGS+= -DHEAP_VARIABLE 15 1.27 joerg 16 1.27 joerg .include <bsd.own.mk> 17 1.28 matt .include <bsd.klinks.mk> 18 1.27 joerg 19 1.10 thorpej DBG= -Os -mmultiple 20 1.10 thorpej 21 1.1 thorpej SRCS+= ofwmagic.S 22 1.5 sakamoto .PATH: ${S}/arch/powerpc/powerpc 23 1.12 itojun 24 1.12 itojun SRCS+= byteorder.c 25 1.12 itojun .PATH: ${S}/lib/libsa 26 1.10 thorpej 27 1.2 thorpej STRIPFLAG= 28 1.1 thorpej BINMODE= 444 29 1.15 simonb 30 1.15 simonb # XXX SHOULD NOT NEED TO DEFINE THESE! 31 1.15 simonb LIBCRT0= 32 1.29 tsutsui LIBCRTI= 33 1.15 simonb LIBC= 34 1.15 simonb LIBCRTBEGIN= 35 1.15 simonb LIBCRTEND= 36 1.1 thorpej 37 1.1 thorpej NEWVERSWHAT= "OpenFirmware Boot" 38 1.1 thorpej 39 1.1 thorpej # For now... 40 1.1 thorpej RELOC= 20000 41 1.1 thorpej 42 1.1 thorpej ENTRY= _start 43 1.1 thorpej 44 1.14 chs CLEANFILES+= vers.c 45 1.1 thorpej 46 1.19 tsutsui CPPFLAGS+= -I. -I${S} -I${S}/../common/include 47 1.1 thorpej CPPFLAGS+= -DRELOC=0x${RELOC} 48 1.1 thorpej CPPFLAGS+= -DFIRMWORKSBUGS 49 1.3 drochner CPPFLAGS+= -DCOMPAT_386BSD_MBRPART 50 1.1 thorpej 51 1.1 thorpej ### find out what to use for libkern 52 1.1 thorpej KERN_AS= library 53 1.1 thorpej .include "${S}/lib/libkern/Makefile.inc" 54 1.1 thorpej LIBKERN= ${KERNLIB} 55 1.1 thorpej 56 1.1 thorpej ### find out what to use for libz 57 1.1 thorpej Z_AS= library 58 1.1 thorpej .include "${S}/lib/libz/Makefile.inc" 59 1.1 thorpej LIBZ= ${ZLIB} 60 1.1 thorpej 61 1.1 thorpej ### find out what to use for libsa 62 1.1 thorpej SA_AS= library 63 1.10 thorpej SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 64 1.1 thorpej .include "${S}/lib/libsa/Makefile.inc" 65 1.1 thorpej LIBSA= ${SALIB} 66 1.1 thorpej 67 1.9 jdolecek .PHONY: vers.c 68 1.9 jdolecek vers.c: version 69 1.26 joerg ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ 70 1.26 joerg ${.CURDIR}/version "ofppc" ${NEWVERSWHAT} 71 1.13 chs 72 1.1 thorpej ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 73 1.28 matt ${_MKTARGET_LINK} 74 1.23 garbled ${LD} -s -N -T ${.CURDIR}/ldscript -Ttext ${RELOC} -Bstatic \ 75 1.23 garbled -e ${ENTRY} -o ${PROG}.X ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 76 1.13 chs mv -f ${PROG}.X ${PROG} 77 1.1 thorpej 78 1.1 thorpej .include <bsd.prog.mk> 79