Home | History | Annotate | Line # | Download | only in ofwboot
Makefile revision 1.4
      1 #	$NetBSD: Makefile,v 1.4 1998/05/28 08:12:17 sakamoto 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/ofppc/ofppc
      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 
     20 ENTRY=		_start
     21 
     22 CLEANFILES+=	vers.c vers.o
     23 
     24 CPPFLAGS+=	-I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
     25 CPPFLAGS+=	-DRELOC=0x${RELOC}
     26 CPPFLAGS+=	-DFIRMWORKSBUGS
     27 CPPFLAGS+=	-DPOWERPC_BOOT_AOUT
     28 CPPFLAGS+=	-DPOWERPC_BOOT_ELF
     29 CPPFLAGS+=	-DXCOFF_GLUE		# for booting PCI Powermacs
     30 CPPFLAGS+=	-DCOMPAT_386BSD_MBRPART
     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} -X -Ttext ${RELOC} -e ${ENTRY} -o ${PROG} \
     52 	    ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN}
     53 	mv ${PROG} ${PROG}.elf
     54 	${OBJCOPY} --input-target=elf32-powerpc \
     55 	    --output-target=xcoff-powermac ${PROG}.elf ${PROG}.xcf
     56 
     57 .include <bsd.prog.mk>
     58