1 1.13 chs # $NetBSD: Makefile,v 1.13 2002/09/18 01:45:49 chs 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.12 itojun 16 1.12 itojun SRCS+= byteorder.c 17 1.12 itojun .PATH: ${S}/lib/libsa 18 1.10 thorpej 19 1.11 tv NOMAN= # defined 20 1.2 thorpej STRIPFLAG= 21 1.1 thorpej BINMODE= 444 22 1.1 thorpej 23 1.1 thorpej NEWVERSWHAT= "OpenFirmware Boot" 24 1.1 thorpej 25 1.1 thorpej # For now... 26 1.1 thorpej RELOC= 20000 27 1.1 thorpej 28 1.1 thorpej ENTRY= _start 29 1.1 thorpej 30 1.10 thorpej CLEANFILES+= vers.c ${PROG}.elf 31 1.1 thorpej 32 1.10 thorpej CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. 33 1.1 thorpej CPPFLAGS+= -DRELOC=0x${RELOC} 34 1.1 thorpej CPPFLAGS+= -DFIRMWORKSBUGS 35 1.3 drochner CPPFLAGS+= -DCOMPAT_386BSD_MBRPART 36 1.1 thorpej 37 1.7 wrstuden .BEGIN: 38 1.7 wrstuden @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine 39 1.7 wrstuden @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc 40 1.8 mycroft .NOPATH: machine powerpc 41 1.8 mycroft CLEANFILES+= machine powerpc 42 1.5 sakamoto 43 1.1 thorpej ### find out what to use for libkern 44 1.1 thorpej KERN_AS= library 45 1.1 thorpej .include "${S}/lib/libkern/Makefile.inc" 46 1.1 thorpej LIBKERN= ${KERNLIB} 47 1.1 thorpej 48 1.1 thorpej ### find out what to use for libz 49 1.1 thorpej Z_AS= library 50 1.1 thorpej .include "${S}/lib/libz/Makefile.inc" 51 1.1 thorpej LIBZ= ${ZLIB} 52 1.1 thorpej 53 1.1 thorpej ### find out what to use for libsa 54 1.1 thorpej SA_AS= library 55 1.10 thorpej SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 56 1.1 thorpej .include "${S}/lib/libsa/Makefile.inc" 57 1.1 thorpej LIBSA= ${SALIB} 58 1.1 thorpej 59 1.9 jdolecek .PHONY: vers.c 60 1.9 jdolecek vers.c: version 61 1.9 jdolecek sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version "ofppc" ${NEWVERSWHAT} 62 1.13 chs 63 1.1 thorpej ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 64 1.13 chs ${LD} -s -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG}.X \ 65 1.9 jdolecek ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 66 1.13 chs mv -f ${PROG}.X ${PROG} 67 1.1 thorpej 68 1.1 thorpej .include <bsd.prog.mk> 69