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