1 1.23 garbled # $NetBSD: Makefile,v 1.23 2008/02/13 20:11:38 garbled 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.21 garbled SRCS= ofwstart.S Locore.c boot.c ofdev.c net.c netif_of.c vers.c 7 1.15 simonb CFLAGS+= -msoft-float -Wno-main -ffreestanding 8 1.21 garbled #CPPFLAGS+= -g -DALLOC_TRACE -DDEBUG #-DOFW_DEBUG -DNETIF_DEBUG 9 1.22 garbled #CPPFLAGS+= -DOFWDUMP 10 1.10 thorpej CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP -I${.CURDIR} 11 1.21 garbled CPPFLAGS+= -DHEAP_VARIABLE 12 1.10 thorpej DBG= -Os -mmultiple 13 1.10 thorpej 14 1.1 thorpej SRCS+= ofwmagic.S 15 1.5 sakamoto .PATH: ${S}/arch/powerpc/powerpc 16 1.12 itojun 17 1.12 itojun SRCS+= byteorder.c 18 1.12 itojun .PATH: ${S}/lib/libsa 19 1.10 thorpej 20 1.11 tv NOMAN= # defined 21 1.2 thorpej STRIPFLAG= 22 1.1 thorpej BINMODE= 444 23 1.15 simonb 24 1.15 simonb # XXX SHOULD NOT NEED TO DEFINE THESE! 25 1.15 simonb LIBCRT0= 26 1.15 simonb LIBC= 27 1.15 simonb LIBCRTBEGIN= 28 1.15 simonb LIBCRTEND= 29 1.1 thorpej 30 1.1 thorpej NEWVERSWHAT= "OpenFirmware Boot" 31 1.1 thorpej 32 1.1 thorpej # For now... 33 1.1 thorpej RELOC= 20000 34 1.1 thorpej 35 1.1 thorpej ENTRY= _start 36 1.1 thorpej 37 1.14 chs CLEANFILES+= vers.c 38 1.1 thorpej 39 1.19 tsutsui CPPFLAGS+= -I. -I${S} -I${S}/../common/include 40 1.1 thorpej CPPFLAGS+= -DRELOC=0x${RELOC} 41 1.1 thorpej CPPFLAGS+= -DFIRMWORKSBUGS 42 1.3 drochner CPPFLAGS+= -DCOMPAT_386BSD_MBRPART 43 1.1 thorpej 44 1.16 matt .if !make(obj) && !make(clean) && !make(cleandir) 45 1.7 wrstuden .BEGIN: 46 1.7 wrstuden @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine 47 1.7 wrstuden @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc 48 1.16 matt .endif 49 1.8 mycroft .NOPATH: machine powerpc 50 1.8 mycroft CLEANFILES+= machine powerpc 51 1.5 sakamoto 52 1.1 thorpej ### find out what to use for libkern 53 1.1 thorpej KERN_AS= library 54 1.1 thorpej .include "${S}/lib/libkern/Makefile.inc" 55 1.1 thorpej LIBKERN= ${KERNLIB} 56 1.1 thorpej 57 1.1 thorpej ### find out what to use for libz 58 1.1 thorpej Z_AS= library 59 1.1 thorpej .include "${S}/lib/libz/Makefile.inc" 60 1.1 thorpej LIBZ= ${ZLIB} 61 1.1 thorpej 62 1.1 thorpej ### find out what to use for libsa 63 1.1 thorpej SA_AS= library 64 1.10 thorpej SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 65 1.1 thorpej .include "${S}/lib/libsa/Makefile.inc" 66 1.1 thorpej LIBSA= ${SALIB} 67 1.1 thorpej 68 1.9 jdolecek .PHONY: vers.c 69 1.9 jdolecek vers.c: version 70 1.17 lukem ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "ofppc" ${NEWVERSWHAT} 71 1.13 chs 72 1.1 thorpej ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 73 1.23 garbled ${LD} -s -N -T ${.CURDIR}/ldscript -Ttext ${RELOC} -Bstatic \ 74 1.23 garbled -e ${ENTRY} -o ${PROG}.X ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 75 1.13 chs mv -f ${PROG}.X ${PROG} 76 1.1 thorpej 77 1.1 thorpej .include <bsd.prog.mk> 78