Home | History | Annotate | Line # | Download | only in ofwboot
Makefile revision 1.9
      1  1.9    tsubai #	$NetBSD: Makefile,v 1.9 2000/02/07 16:27:00 tsubai Exp $
      2  1.1    tsubai 
      3  1.1    tsubai S=	${.CURDIR}/../../../..
      4  1.1    tsubai 
      5  1.1    tsubai PROG=		ofwboot
      6  1.6  wrstuden FILES=		${PROG}.elf
      7  1.1    tsubai SRCS=		Locore.c boot.c ofdev.c net.c netif_of.c alloc.c
      8  1.7  wrstuden XCOFFXTRA=	Xcoffxtra.c
      9  1.7  wrstuden XCOFFXTRAOBJ=	Xcoffxtra.o
     10  1.9    tsubai CFLAGS+=	-msoft-float
     11  1.9    tsubai #CFLAGS+=	-DDEBUG -DNETIF_DEBUG
     12  1.9    tsubai CPPFLAGS+=	-D_STANDALONE
     13  1.9    tsubai 
     14  1.1    tsubai .PATH:		${S}/arch/powerpc/powerpc
     15  1.1    tsubai SRCS+=		ofwmagic.S
     16  1.9    tsubai 
     17  1.4     lukem MKMAN=		no
     18  1.1    tsubai STRIPFLAG=
     19  1.1    tsubai BINMODE=	444
     20  1.1    tsubai OBJCOPY?=	objcopy
     21  1.1    tsubai 
     22  1.7  wrstuden .if !defined(FIXCOFF)
     23  1.7  wrstuden .ifnmake(print-objdir)
     24  1.7  wrstuden FIXCOFFDIR!=	cd ${.CURDIR}/../fixcoff; ${MAKE} print-objdir
     25  1.7  wrstuden FIXCOFF=	${FIXCOFFDIR}/fixcoff
     26  1.7  wrstuden FIXCOFFTARG=	${FIXCOFF}
     27  1.7  wrstuden 
     28  1.7  wrstuden ${FIXCOFF}:
     29  1.7  wrstuden 	(cd ${.CURDIR}/../fixcoff; make)
     30  1.7  wrstuden 
     31  1.7  wrstuden .endif
     32  1.7  wrstuden .else
     33  1.7  wrstuden FIXCOFFTARG=
     34  1.7  wrstuden .endif
     35  1.7  wrstuden 
     36  1.1    tsubai NEWVERSWHAT=	"OpenFirmware Boot"
     37  1.1    tsubai 
     38  1.1    tsubai # For now...
     39  1.1    tsubai #RELOC=		20000
     40  1.3    tsubai RELOC=		6c0000
     41  1.1    tsubai 
     42  1.1    tsubai ENTRY=		_start
     43  1.1    tsubai 
     44  1.1    tsubai CLEANFILES+=	vers.c vers.o ${PROG}.elf
     45  1.1    tsubai 
     46  1.5    tsubai CPPFLAGS+=	-I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
     47  1.1    tsubai CPPFLAGS+=	-DRELOC=0x${RELOC}
     48  1.1    tsubai #CPPFLAGS+=	-DXCOFF_GLUE		# for booting PCI Powermacs
     49  1.1    tsubai 
     50  1.8   mycroft CLEANFILES+= ${XCOFFXTRAOBJ}
     51  1.5    tsubai 
     52  1.5    tsubai .BEGIN:
     53  1.5    tsubai 	@[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
     54  1.5    tsubai 	@[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc
     55  1.8   mycroft .NOPATH: machine powerpc
     56  1.8   mycroft CLEANFILES+= machine powerpc
     57  1.5    tsubai 
     58  1.1    tsubai ### find out what to use for libkern
     59  1.1    tsubai KERN_AS=	library
     60  1.1    tsubai .include "${S}/lib/libkern/Makefile.inc"
     61  1.1    tsubai LIBKERN=	${KERNLIB}
     62  1.1    tsubai 
     63  1.1    tsubai ### find out what to use for libz
     64  1.1    tsubai Z_AS=		library
     65  1.1    tsubai .include "${S}/lib/libz/Makefile.inc"
     66  1.1    tsubai LIBZ=		${ZLIB}
     67  1.1    tsubai 
     68  1.1    tsubai ### find out what to use for libsa
     69  1.1    tsubai SA_AS=		library
     70  1.5    tsubai SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
     71  1.1    tsubai .include "${S}/lib/libsa/Makefile.inc"
     72  1.1    tsubai LIBSA=		${SALIB}
     73  1.1    tsubai 
     74  1.7  wrstuden ${PROG}: ${OBJS} ${XCOFFXTRAOBJ} ${LIBSA} ${LIBZ} ${LIBKERN} ${FIXCOFFTARG}
     75  1.1    tsubai 	sh ${.CURDIR}/../newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
     76  1.1    tsubai 	${COMPILE.c} vers.c
     77  1.7  wrstuden 	${LD} -s -N -Ttext ${RELOC} -Bstatic -o ${PROG}.elf \
     78  1.1    tsubai 	    ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN}
     79  1.5    tsubai 	${OBJCOPY} -O binary ${PROG}.elf ${PROG}
     80  1.7  wrstuden 	${LD} -s -N -T ${.CURDIR}/../fixcoff/elf32_powerpc_merge.x -e _entry \
     81  1.7  wrstuden 	    -Ttext ${RELOC} -Bstatic -o ${PROG}.mrg  ${XCOFFXTRAOBJ} \
     82  1.7  wrstuden 	    ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN}
     83  1.7  wrstuden 	${OBJCOPY} -O aixcoff-rs6000 -R .comment -R .note \
     84  1.7  wrstuden 	    ${PROG}.mrg ${PROG}.xcf
     85  1.7  wrstuden 	${FIXCOFF} ${PROG}.xcf
     86  1.1    tsubai 
     87  1.1    tsubai .include <bsd.prog.mk>
     88