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