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