Home | History | Annotate | Line # | Download | only in ofwboot
Makefile revision 1.2
      1  1.2  thorpej #	$NetBSD: Makefile,v 1.2 1997/04/17 07:46:24 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=		Locore.c boot.c ofdev.c net.c netif_of.c alloc.c
      7  1.1  thorpej .PATH:		${S}/arch/powerpc/powerpc
      8  1.1  thorpej SRCS+=		ofwmagic.S
      9  1.1  thorpej #CFLAGS+=	-DDEBUG -DNETIF_DEBUG
     10  1.1  thorpej NOMAN=
     11  1.2  thorpej STRIPFLAG=
     12  1.1  thorpej BINMODE=	444
     13  1.1  thorpej OBJCOPY?=	objcopy
     14  1.1  thorpej 
     15  1.1  thorpej NEWVERSWHAT=	"OpenFirmware Boot"
     16  1.1  thorpej 
     17  1.1  thorpej # For now...
     18  1.1  thorpej RELOC=		20000
     19  1.1  thorpej 
     20  1.1  thorpej ENTRY=		_start
     21  1.1  thorpej 
     22  1.1  thorpej CLEANFILES+=	vers.c vers.o
     23  1.1  thorpej 
     24  1.1  thorpej CPPFLAGS+=	-I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
     25  1.1  thorpej CPPFLAGS+=	-DRELOC=0x${RELOC}
     26  1.1  thorpej CPPFLAGS+=	-DFIRMWORKSBUGS
     27  1.1  thorpej CPPFLAGS+=	-DPOWERPC_BOOT_AOUT
     28  1.1  thorpej CPPFLAGS+=	-DPOWERPC_BOOT_ELF
     29  1.1  thorpej CPPFLAGS+=	-DXCOFF_GLUE		# for booting PCI Powermacs
     30  1.1  thorpej 
     31  1.1  thorpej ### find out what to use for libkern
     32  1.1  thorpej KERN_AS=	library
     33  1.1  thorpej .include "${S}/lib/libkern/Makefile.inc"
     34  1.1  thorpej LIBKERN=	${KERNLIB}
     35  1.1  thorpej 
     36  1.1  thorpej ### find out what to use for libz
     37  1.1  thorpej Z_AS=		library
     38  1.1  thorpej .include "${S}/lib/libz/Makefile.inc"
     39  1.1  thorpej LIBZ=		${ZLIB}
     40  1.1  thorpej 
     41  1.1  thorpej ### find out what to use for libsa
     42  1.1  thorpej SA_AS=		library
     43  1.1  thorpej SAMISCMAKEFLAGS= SA_USE_CREAD=yes
     44  1.1  thorpej .include "${S}/lib/libsa/Makefile.inc"
     45  1.1  thorpej LIBSA=		${SALIB}
     46  1.1  thorpej 
     47  1.1  thorpej ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     48  1.1  thorpej 	sh ${.CURDIR}/../newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
     49  1.1  thorpej 	${COMPILE.c} vers.c
     50  1.1  thorpej 	${LD} -X -Ttext ${RELOC} -e ${ENTRY} -o ${PROG} \
     51  1.1  thorpej 	    ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN}
     52  1.1  thorpej 	mv ${PROG} ${PROG}.elf
     53  1.1  thorpej 	${OBJCOPY} --input-target=elf32-powerpc \
     54  1.1  thorpej 	    --output-target=xcoff-powermac ${PROG}.elf ${PROG}.xcf
     55  1.1  thorpej 
     56  1.1  thorpej .include <bsd.prog.mk>
     57