Makefile revision 1.6
1# $NetBSD: Makefile,v 1.6 1999/06/21 21:02:49 wrstuden Exp $ 2 3S= ${.CURDIR}/../../../.. 4 5PROG= ofwboot 6FILES= ${PROG}.elf 7SRCS= Locore.c boot.c ofdev.c net.c netif_of.c alloc.c 8.PATH: ${S}/arch/powerpc/powerpc 9SRCS+= ofwmagic.S 10#CFLAGS+= -DDEBUG -DNETIF_DEBUG 11MKMAN= no 12STRIPFLAG= 13BINMODE= 444 14OBJCOPY?= objcopy 15 16NEWVERSWHAT= "OpenFirmware Boot" 17 18# For now... 19#RELOC= 20000 20RELOC= 6c0000 21 22ENTRY= _start 23 24CLEANFILES+= vers.c vers.o ${PROG}.elf 25 26CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. 27CPPFLAGS+= -DRELOC=0x${RELOC} 28#CPPFLAGS+= -DXCOFF_GLUE # for booting PCI Powermacs 29 30CLEANFILES+= ${.OBJDIR}/machine ${.OBJDIR}/powerpc 31 32.BEGIN: 33 @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine 34 @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc 35 36### find out what to use for libkern 37KERN_AS= library 38.include "${S}/lib/libkern/Makefile.inc" 39LIBKERN= ${KERNLIB} 40 41### find out what to use for libz 42Z_AS= library 43.include "${S}/lib/libz/Makefile.inc" 44LIBZ= ${ZLIB} 45 46### find out what to use for libsa 47SA_AS= library 48SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 49.include "${S}/lib/libsa/Makefile.inc" 50LIBSA= ${SALIB} 51 52${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 53 sh ${.CURDIR}/../newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 54 ${COMPILE.c} vers.c 55 ${LD} -s -N -Ttext ${RELOC} -Bstatic -o ${PROG} \ 56 ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN} 57 mv ${PROG} ${PROG}.elf 58 ${OBJCOPY} -O binary ${PROG}.elf ${PROG} 59# ${OBJCOPY} --input-target=elf32-powerpc \ 60# --output-target=xcoff-powermac ${PROG}.elf ${PROG}.xcf 61 62.include <bsd.prog.mk> 63