Home | History | Annotate | Line # | Download | only in ofwboot
Makefile revision 1.31.12.1
      1  1.31.12.1    bouyer #	$NetBSD: Makefile,v 1.31.12.1 2017/04/21 16:53:33 bouyer Exp $
      2        1.1   thorpej 
      3       1.19   tsutsui S!=	cd ${.CURDIR}/../../../.. ; pwd
      4        1.1   thorpej 
      5        1.1   thorpej PROG=		ofwboot
      6       1.27     joerg NOMAN=		# defined
      7       1.25       phx SRCS=		ofwstart.S Locore.c boot.c ofdev.c net.c netif_of.c
      8  1.31.12.1    bouyer SRCS+=		mbr.c rdb.c
      9       1.31     joerg CFLAGS+=	${${ACTIVE_CC} == "gcc":? -msoft-float :}
     10       1.31     joerg CFLAGS+=	-Wno-main -ffreestanding
     11       1.24   tsutsui CFLAGS+=	-Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
     12       1.21   garbled #CPPFLAGS+=	-g -DALLOC_TRACE -DDEBUG #-DOFW_DEBUG -DNETIF_DEBUG
     13       1.22   garbled #CPPFLAGS+=	-DOFWDUMP
     14       1.10   thorpej CPPFLAGS+=	-D_STANDALONE -DSUPPORT_DHCP -I${.CURDIR}
     15       1.21   garbled CPPFLAGS+=	-DHEAP_VARIABLE
     16       1.27     joerg 
     17       1.27     joerg .include <bsd.own.mk>
     18       1.28      matt .include <bsd.klinks.mk>
     19       1.27     joerg 
     20       1.30     joerg DBG=		-Os
     21       1.10   thorpej 
     22        1.1   thorpej SRCS+=		ofwmagic.S
     23        1.5  sakamoto .PATH:		${S}/arch/powerpc/powerpc
     24       1.12    itojun 
     25       1.12    itojun SRCS+=		byteorder.c
     26       1.12    itojun .PATH:		${S}/lib/libsa
     27       1.10   thorpej 
     28        1.2   thorpej STRIPFLAG=
     29        1.1   thorpej BINMODE=	444
     30       1.15    simonb 
     31       1.15    simonb # XXX SHOULD NOT NEED TO DEFINE THESE!
     32       1.15    simonb LIBCRT0=
     33       1.29   tsutsui LIBCRTI=
     34       1.15    simonb LIBC=
     35       1.15    simonb LIBCRTBEGIN=
     36       1.15    simonb LIBCRTEND=
     37        1.1   thorpej 
     38        1.1   thorpej NEWVERSWHAT=	"OpenFirmware Boot"
     39        1.1   thorpej 
     40        1.1   thorpej # For now...
     41        1.1   thorpej RELOC=		20000
     42        1.1   thorpej 
     43        1.1   thorpej ENTRY=		_start
     44        1.1   thorpej 
     45       1.19   tsutsui CPPFLAGS+=	-I. -I${S} -I${S}/../common/include
     46        1.1   thorpej CPPFLAGS+=	-DRELOC=0x${RELOC}
     47        1.1   thorpej CPPFLAGS+=	-DFIRMWORKSBUGS
     48        1.3  drochner CPPFLAGS+=	-DCOMPAT_386BSD_MBRPART
     49        1.1   thorpej 
     50        1.1   thorpej ### find out what to use for libkern
     51        1.1   thorpej KERN_AS=	library
     52        1.1   thorpej .include "${S}/lib/libkern/Makefile.inc"
     53        1.1   thorpej LIBKERN=	${KERNLIB}
     54        1.1   thorpej 
     55        1.1   thorpej ### find out what to use for libz
     56        1.1   thorpej Z_AS=		library
     57        1.1   thorpej .include "${S}/lib/libz/Makefile.inc"
     58        1.1   thorpej LIBZ=		${ZLIB}
     59        1.1   thorpej 
     60        1.1   thorpej ### find out what to use for libsa
     61        1.1   thorpej SA_AS=		library
     62       1.10   thorpej SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
     63        1.1   thorpej .include "${S}/lib/libsa/Makefile.inc"
     64        1.1   thorpej LIBSA=		${SALIB}
     65        1.1   thorpej 
     66        1.1   thorpej ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     67       1.28      matt 	${_MKTARGET_LINK}
     68       1.23   garbled 	${LD} -s -N -T ${.CURDIR}/ldscript -Ttext ${RELOC} -Bstatic \
     69       1.23   garbled 	    -e ${ENTRY} -o ${PROG}.X ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     70       1.13       chs 	mv -f ${PROG}.X ${PROG}
     71        1.1   thorpej 
     72  1.31.12.1    bouyer .include "${S}/conf/newvers_stand.mk"
     73  1.31.12.1    bouyer 
     74        1.1   thorpej .include <bsd.prog.mk>
     75