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