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