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