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