1 # $NetBSD: Makefile,v 1.3 2002/06/18 00:37:26 itojun 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 SRCS+= byteorder.c 14 .PATH: ${S}/lib/libsa 15 16 # XXX SHOULD NOT NEED TO DEFINE THESE! 17 LIBCRT0= 18 LIBCRTBEGIN= 19 LIBCRTEND= 20 21 NOMAN= # defined 22 STRIPFLAG= 23 BINMODE= 444 24 25 NEWVERSWHAT= "OpenFirmware Boot" 26 27 RELOC= f0000000 28 29 ENTRY= _start 30 31 CLEANFILES+= vers.c 32 33 CPPFLAGS+= -nostdinc -I. -I${.CURDIR}/../../.. -I${S} 34 CPPFLAGS+= -DRELOC=0x${RELOC} 35 36 .BEGIN: 37 @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine 38 @[ -h arm ] || ln -s ${S}/arch/arm/include arm 39 .NOPATH: machine arm 40 CLEANFILES+= machine arm 41 42 CLEANFILES+= ${PROG}.aout 43 44 ### find out what to use for libkern 45 KERN_AS= library 46 .include "${S}/lib/libkern/Makefile.inc" 47 LIBKERN= ${KERNLIB} 48 49 ### find out what to use for libz 50 Z_AS= library 51 .include "${S}/lib/libz/Makefile.inc" 52 LIBZ= ${ZLIB} 53 54 ### find out what to use for libsa 55 SA_AS= library 56 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 57 .include "${S}/lib/libsa/Makefile.inc" 58 LIBSA= ${SALIB} 59 60 .PHONY: vers.c 61 vers.c: version 62 sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version "shark" ${NEWVERSWHAT} 63 64 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 65 ${LD} -s -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET}.aout \ 66 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 67 ${OBJCOPY} -O binary ${.TARGET}.aout ${.TARGET} 68 69 .include <bsd.prog.mk> 70