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