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