1 # $NetBSD: Makefile,v 1.13 2002/09/18 01:45:49 chs Exp $ 2 3 S= ${.CURDIR}/../../../.. 4 5 PROG= ofwboot 6 FILES= ${PROG}.elf 7 SRCS= Locore.c alloc.c boot.c ofdev.c net.c netif_of.c vers.c 8 CFLAGS+= -msoft-float -Wno-main 9 #CPPFLAGS+= -DDEBUG -DNETIF_DEBUG 10 CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP -I${.CURDIR} 11 DBG= -Os -mmultiple 12 13 SRCS+= ofwmagic.S 14 .PATH: ${S}/arch/powerpc/powerpc 15 16 SRCS+= byteorder.c 17 .PATH: ${S}/lib/libsa 18 19 NOMAN= # defined 20 STRIPFLAG= 21 BINMODE= 444 22 23 NEWVERSWHAT= "OpenFirmware Boot" 24 25 # For now... 26 RELOC= 20000 27 28 ENTRY= _start 29 30 CLEANFILES+= vers.c ${PROG}.elf 31 32 CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. 33 CPPFLAGS+= -DRELOC=0x${RELOC} 34 CPPFLAGS+= -DFIRMWORKSBUGS 35 CPPFLAGS+= -DCOMPAT_386BSD_MBRPART 36 37 .BEGIN: 38 @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine 39 @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc 40 .NOPATH: machine powerpc 41 CLEANFILES+= machine powerpc 42 43 ### find out what to use for libkern 44 KERN_AS= library 45 .include "${S}/lib/libkern/Makefile.inc" 46 LIBKERN= ${KERNLIB} 47 48 ### find out what to use for libz 49 Z_AS= library 50 .include "${S}/lib/libz/Makefile.inc" 51 LIBZ= ${ZLIB} 52 53 ### find out what to use for libsa 54 SA_AS= library 55 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 56 .include "${S}/lib/libsa/Makefile.inc" 57 LIBSA= ${SALIB} 58 59 .PHONY: vers.c 60 vers.c: version 61 sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version "ofppc" ${NEWVERSWHAT} 62 63 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 64 ${LD} -s -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG}.X \ 65 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 66 mv -f ${PROG}.X ${PROG} 67 68 .include <bsd.prog.mk> 69