1 # $NetBSD: Makefile,v 1.10 2001/10/23 03:31:26 thorpej 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 MKMAN= no 17 STRIPFLAG= 18 BINMODE= 444 19 20 NEWVERSWHAT= "OpenFirmware Boot" 21 22 # For now... 23 RELOC= 20000 24 25 ENTRY= _start 26 27 CLEANFILES+= vers.c ${PROG}.elf 28 29 CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. 30 CPPFLAGS+= -DRELOC=0x${RELOC} 31 CPPFLAGS+= -DFIRMWORKSBUGS 32 CPPFLAGS+= -DCOMPAT_386BSD_MBRPART 33 34 .BEGIN: 35 @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine 36 @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc 37 .NOPATH: machine powerpc 38 CLEANFILES+= machine powerpc 39 40 ### find out what to use for libkern 41 KERN_AS= library 42 .include "${S}/lib/libkern/Makefile.inc" 43 LIBKERN= ${KERNLIB} 44 45 ### find out what to use for libz 46 Z_AS= library 47 .include "${S}/lib/libz/Makefile.inc" 48 LIBZ= ${ZLIB} 49 50 ### find out what to use for libsa 51 SA_AS= library 52 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 53 .include "${S}/lib/libsa/Makefile.inc" 54 LIBSA= ${SALIB} 55 56 .PHONY: vers.c 57 vers.c: version 58 sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version "ofppc" ${NEWVERSWHAT} 59 60 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 61 ${LD} -s -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG}.elf \ 62 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 63 ${OBJCOPY} -O binary ${PROG}.elf ${PROG} 64 65 .include <bsd.prog.mk> 66