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