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