Home | History | Annotate | Line # | Download | only in ofwboot
Makefile revision 1.58.10.1
      1  1.58.10.1  pgoyette #	$NetBSD: Makefile,v 1.58.10.1 2018/06/25 07:25:44 pgoyette 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.58.10.1  pgoyette SRCS=		Locore.c boot.c ofdev.c hfs.c net.c netif_of.c
      8        1.7  wrstuden XCOFFXTRA=	Xcoffxtra.c
      9        1.7  wrstuden XCOFFXTRAOBJ=	Xcoffxtra.o
     10       1.54     joerg CFLAGS+=	-ffreestanding
     11       1.54     joerg CFLAGS+=	${${ACTIVE_CC} == "gcc":? -msoft-float :}
     12       1.58       uwe CFLAGS+=	${CFLAGS_UNWIND.${ACTIVE_CC}}
     13       1.47   tsutsui CFLAGS+=	-Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
     14       1.29   tsutsui #CPPFLAGS+=	-DDEBUG -DNETIF_DEBUG
     15       1.29   tsutsui CPPFLAGS+=	-D_STANDALONE -DSUPPORT_DHCP
     16       1.31   tsutsui CPPFLAGS+=	-DSUPPORT_USTARFS -DHAVE_CHANGEDISK_HOOK
     17       1.41   aymeric DBG=		-Os
     18       1.36   thorpej 
     19  1.58.10.1  pgoyette # PR port-macppc/44895
     20  1.58.10.1  pgoyette SRCS+=		alloc.c			# use ./alloc.c
     21  1.58.10.1  pgoyette #CPPFLAGS+=	-DHEAP_VARIABLE		# use libsa alloc.c
     22  1.58.10.1  pgoyette 
     23       1.36   thorpej LIBCRT0=	# nothing
     24       1.52   tsutsui LIBCRTI=	# nothing
     25       1.36   thorpej LIBCRTBEGIN=	# nothing
     26       1.36   thorpej LIBCRTEND=	# nothing
     27       1.36   thorpej LIBC=		# nothing
     28        1.9    tsubai 
     29        1.1    tsubai .PATH:		${S}/arch/powerpc/powerpc
     30        1.1    tsubai SRCS+=		ofwmagic.S
     31       1.34    itojun 
     32       1.34    itojun .PATH:		${S}/lib/libsa
     33       1.34    itojun SRCS+=		byteorder.c
     34        1.9    tsubai 
     35       1.24        tv NOMAN=		# defined
     36        1.1    tsubai STRIPFLAG=
     37        1.1    tsubai BINMODE=	444
     38        1.1    tsubai 
     39       1.23        tv .include <bsd.own.mk>
     40       1.23        tv 
     41       1.51     joerg .if !defined(FIXCOFF)
     42       1.39      matt .if !defined(TOOL_MACPPCFIXCOFF)
     43       1.39      matt TOOL_MACPPCFIXCOFFDIR!=	cd ${.CURDIR}/../fixcoff && ${PRINTOBJDIR}
     44       1.46     hauke TOOL_MACPPCFIXCOFF=	${TOOL_MACPPCFIXCOFFDIR}/fixcoff
     45       1.39      matt .endif
     46        1.7  wrstuden .endif
     47        1.7  wrstuden 
     48        1.1    tsubai NEWVERSWHAT=	"OpenFirmware Boot"
     49        1.1    tsubai 
     50        1.1    tsubai # For now...
     51        1.1    tsubai #RELOC=		20000
     52       1.42  wrstuden RELOC=		E00000
     53        1.1    tsubai 
     54        1.1    tsubai ENTRY=		_start
     55        1.1    tsubai 
     56       1.56  christos CLEANFILES+=	${PROG}.elf ${PROG}.el1 ${PROG}.mrg ${PROG}.xcf
     57       1.57       uwe CLEANFILES+=	${XCOFFXTRAOBJ}
     58        1.1    tsubai 
     59       1.30   tsutsui CPPFLAGS+=	-I. -I${.CURDIR} -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
     60       1.26  wrstuden CPPFLAGS+=	-DRELOC=0x${RELOC} -DRELOC_FLATFILE=0x${RELOC_FLATFILE}
     61        1.1    tsubai #CPPFLAGS+=	-DXCOFF_GLUE		# for booting PCI Powermacs
     62        1.1    tsubai 
     63       1.58       uwe LINKFLAGS=	-N -Ttext ${RELOC} -Bstatic
     64       1.58       uwe LINKFLAGS+=	${LINKFLAGS_UNWIND}
     65       1.58       uwe 
     66        1.1    tsubai ### find out what to use for libkern
     67        1.1    tsubai KERN_AS=	library
     68        1.1    tsubai .include "${S}/lib/libkern/Makefile.inc"
     69        1.1    tsubai LIBKERN=	${KERNLIB}
     70        1.1    tsubai 
     71        1.1    tsubai ### find out what to use for libz
     72        1.1    tsubai Z_AS=		library
     73        1.1    tsubai .include "${S}/lib/libz/Makefile.inc"
     74        1.1    tsubai LIBZ=		${ZLIB}
     75        1.1    tsubai 
     76        1.1    tsubai ### find out what to use for libsa
     77        1.1    tsubai SA_AS=		library
     78        1.5    tsubai SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
     79        1.1    tsubai .include "${S}/lib/libsa/Makefile.inc"
     80        1.1    tsubai LIBSA=		${SALIB}
     81       1.33   tsutsui 
     82       1.50  dholland cleandir distclean: .WAIT cleanlibdir
     83       1.33   tsutsui 
     84       1.33   tsutsui cleanlibdir:
     85       1.44       jmc 	-rm -rf lib
     86        1.1    tsubai 
     87       1.56  christos .include "${S}/conf/newvers_stand.mk"
     88       1.13  jdolecek 
     89       1.27  wrstuden all realall: ${PROG} ${PROG}.xcf ${PROG}.elf
     90       1.26  wrstuden 
     91       1.42  wrstuden ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 
     92       1.43      matt 	${_MKTARGET_LINK}
     93       1.58       uwe 	${LD} -s -o ${PROG}.el1 ${LINKFLAGS} \
     94       1.42  wrstuden 	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     95       1.26  wrstuden 	${OBJCOPY} -O binary ${PROG}.el1 ${PROG}
     96       1.26  wrstuden 
     97       1.48   tsutsui .include <bsd.klinks.mk>
     98       1.26  wrstuden .include <bsd.prog.mk>
     99       1.26  wrstuden 
    100       1.42  wrstuden ${PROG}.elf: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
    101       1.43      matt 	${_MKTARGET_LINK}
    102       1.58       uwe 	${LD} -s -o ${PROG}.elf ${LINKFLAGS} \
    103       1.42  wrstuden 	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
    104       1.26  wrstuden 
    105       1.42  wrstuden ${PROG}.xcf: ${OBJS} ${XCOFFXTRAOBJ} ${LIBSA} ${LIBZ} ${LIBKERN}
    106       1.43      matt 	${_MKTARGET_LINK}
    107       1.58       uwe 	${LD} -o ${PROG}.mrg ${LINKFLAGS} \
    108       1.58       uwe 	    -T ${.CURDIR}/../fixcoff/elf32_powerpc_merge.x \
    109       1.58       uwe 	    -e _entry ${XCOFFXTRAOBJ} \
    110       1.42  wrstuden 	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
    111        1.7  wrstuden 	${OBJCOPY} -O aixcoff-rs6000 -R .comment -R .note \
    112        1.7  wrstuden 	    ${PROG}.mrg ${PROG}.xcf
    113       1.39      matt 	${TOOL_MACPPCFIXCOFF} ${PROG}.xcf
    114