Home | History | Annotate | Line # | Download | only in ofwboot
Makefile revision 1.31
      1  1.31   tsutsui #	$NetBSD: Makefile,v 1.31 2002/03/30 07:17:09 tsutsui Exp $
      2   1.1    tsubai 
      3   1.1    tsubai S=	${.CURDIR}/../../../..
      4   1.1    tsubai 
      5   1.1    tsubai PROG=		ofwboot
      6  1.12  dmcmahil FILES=		${PROG}.elf ${PROG}.xcf
      7  1.26  wrstuden SRCS=		Locore.c ofdev.c hfs.c net.c netif_of.c vers.c
      8   1.7  wrstuden XCOFFXTRA=	Xcoffxtra.c
      9   1.7  wrstuden XCOFFXTRAOBJ=	Xcoffxtra.o
     10  1.29   tsutsui CFLAGS+=	-Wno-main -msoft-float -mmultiple
     11  1.29   tsutsui #CPPFLAGS+=	-DDEBUG -DNETIF_DEBUG
     12  1.29   tsutsui CPPFLAGS+=	-D_STANDALONE -DSUPPORT_DHCP
     13  1.31   tsutsui CPPFLAGS+=	-DSUPPORT_USTARFS -DHAVE_CHANGEDISK_HOOK
     14  1.29   tsutsui DBG=		-Os
     15   1.9    tsubai 
     16   1.1    tsubai .PATH:		${S}/arch/powerpc/powerpc
     17   1.1    tsubai SRCS+=		ofwmagic.S
     18   1.9    tsubai 
     19  1.24        tv NOMAN=		# defined
     20   1.1    tsubai STRIPFLAG=
     21   1.1    tsubai BINMODE=	444
     22   1.1    tsubai 
     23   1.7  wrstuden .if !defined(FIXCOFF)
     24  1.23        tv .include <bsd.own.mk>
     25  1.23        tv 
     26  1.23        tv FIXCOFFDIR!=	cd ${.CURDIR}/../fixcoff && ${PRINTOBJDIR}
     27   1.7  wrstuden FIXCOFF=	${FIXCOFFDIR}/fixcoff
     28   1.7  wrstuden FIXCOFFTARG=	${FIXCOFF}
     29   1.7  wrstuden 
     30   1.7  wrstuden ${FIXCOFF}:
     31  1.18   garbled 	(cd ${.CURDIR}/../fixcoff; ${MAKE})
     32   1.7  wrstuden 
     33   1.7  wrstuden .else
     34   1.7  wrstuden FIXCOFFTARG=
     35   1.7  wrstuden .endif
     36   1.7  wrstuden 
     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.26  wrstuden RELOC=		640000
     42  1.26  wrstuden RELOC_FLATFILE=	600000
     43   1.1    tsubai 
     44   1.1    tsubai ENTRY=		_start
     45   1.1    tsubai 
     46  1.26  wrstuden CLEANFILES+=	vers.c ${PROG}.elf ${PROG}.el1 ${PROG}.mrg ${PROG}.xcf
     47  1.26  wrstuden CLEANFILES+=	machine powerpc
     48   1.1    tsubai 
     49  1.30   tsutsui CPPFLAGS+=	-I. -I${.CURDIR} -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
     50  1.26  wrstuden CPPFLAGS+=	-DRELOC=0x${RELOC} -DRELOC_FLATFILE=0x${RELOC_FLATFILE}
     51   1.1    tsubai #CPPFLAGS+=	-DXCOFF_GLUE		# for booting PCI Powermacs
     52   1.1    tsubai 
     53  1.26  wrstuden CLEANFILES+= ${XCOFFXTRAOBJ} boot.o boot1.o
     54   1.5    tsubai 
     55  1.28       jmc .if !make(obj) && !make(clean) && !make(cleandir)
     56   1.5    tsubai .BEGIN:
     57   1.5    tsubai 	@[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
     58   1.5    tsubai 	@[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc
     59   1.8   mycroft .NOPATH: machine powerpc
     60  1.28       jmc .endif
     61   1.8   mycroft CLEANFILES+= machine powerpc
     62   1.5    tsubai 
     63   1.1    tsubai ### find out what to use for libkern
     64   1.1    tsubai KERN_AS=	library
     65   1.1    tsubai .include "${S}/lib/libkern/Makefile.inc"
     66   1.1    tsubai LIBKERN=	${KERNLIB}
     67   1.1    tsubai 
     68   1.1    tsubai ### find out what to use for libz
     69   1.1    tsubai Z_AS=		library
     70   1.1    tsubai .include "${S}/lib/libz/Makefile.inc"
     71   1.1    tsubai LIBZ=		${ZLIB}
     72   1.1    tsubai 
     73   1.1    tsubai ### find out what to use for libsa
     74   1.1    tsubai SA_AS=		library
     75   1.5    tsubai SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
     76   1.1    tsubai .include "${S}/lib/libsa/Makefile.inc"
     77   1.1    tsubai LIBSA=		${SALIB}
     78   1.1    tsubai 
     79  1.13  jdolecek .PHONY: vers.c
     80  1.13  jdolecek vers.c: version
     81  1.13  jdolecek 	sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version "macppc" ${NEWVERSWHAT}
     82  1.13  jdolecek 
     83  1.27  wrstuden all realall: ${PROG} ${PROG}.xcf ${PROG}.elf
     84  1.26  wrstuden 
     85  1.26  wrstuden ${PROG}: ${OBJS} boot1.o ${LIBSA} ${LIBZ} ${LIBKERN} 
     86  1.26  wrstuden 	${LD} -s -N -Ttext ${RELOC_FLATFILE} -Bstatic -o ${PROG}.el1 \
     87  1.26  wrstuden 	    ${OBJS} boot1.o ${LIBSA} ${LIBZ} ${LIBKERN}
     88  1.26  wrstuden 	${OBJCOPY} -O binary ${PROG}.el1 ${PROG}
     89  1.26  wrstuden 
     90  1.26  wrstuden .include <bsd.prog.mk>
     91  1.26  wrstuden 
     92  1.26  wrstuden ${PROG}.elf: ${OBJS} boot.o ${LIBSA} ${LIBZ} ${LIBKERN}
     93   1.7  wrstuden 	${LD} -s -N -Ttext ${RELOC} -Bstatic -o ${PROG}.elf \
     94  1.26  wrstuden 	    ${OBJS} boot.o ${LIBSA} ${LIBZ} ${LIBKERN}
     95  1.26  wrstuden 
     96  1.26  wrstuden ${PROG}.xcf: ${OBJS} boot.o ${XCOFFXTRAOBJ} ${LIBSA} ${LIBZ} ${LIBKERN} ${FIXCOFFTARG}
     97   1.7  wrstuden 	${LD} -s -N -T ${.CURDIR}/../fixcoff/elf32_powerpc_merge.x -e _entry \
     98   1.7  wrstuden 	    -Ttext ${RELOC} -Bstatic -o ${PROG}.mrg  ${XCOFFXTRAOBJ} \
     99  1.26  wrstuden 	    ${OBJS} boot.o ${LIBSA} ${LIBZ} ${LIBKERN}
    100   1.7  wrstuden 	${OBJCOPY} -O aixcoff-rs6000 -R .comment -R .note \
    101   1.7  wrstuden 	    ${PROG}.mrg ${PROG}.xcf
    102   1.7  wrstuden 	${FIXCOFF} ${PROG}.xcf
    103