Home | History | Annotate | Line # | Download | only in ofwboot
Makefile revision 1.12.4.1
      1  1.12.4.1     yamt #	$NetBSD: Makefile,v 1.12.4.1 2014/05/22 11:40:08 yamt Exp $
      2  1.12.4.1     yamt 
      3  1.12.4.1     yamt NOMAN=		# defined
      4      1.12    joerg 
      5      1.12    joerg .include <bsd.own.mk>
      6  1.12.4.1     yamt .include <bsd.klinks.mk>
      7       1.1  thorpej 
      8       1.1  thorpej S=		${.CURDIR}/../../../..
      9       1.1  thorpej 
     10      1.11  tsutsui WARNS=		2
     11       1.1  thorpej PROG=		ofwboot
     12       1.1  thorpej SRCS=		srt0.S Locore.c alloc.c boot.c ofdev.c net.c netif_of.c vers.c
     13       1.9      uwe CFLAGS+=	-ffreestanding -Wno-main
     14       1.1  thorpej #CPPFLAGS+=	-DDEBUG -DNETIF_DEBUG
     15       1.1  thorpej CPPFLAGS+=	-DSUPPORT_DHCP -I${.CURDIR}
     16       1.1  thorpej CPPFLAGS+=	-D_STANDALONE
     17       1.9      uwe DBG=		-Os
     18       1.3   itojun 
     19       1.3   itojun SRCS+=		byteorder.c
     20       1.3   itojun .PATH:		${S}/lib/libsa
     21       1.1  thorpej 
     22       1.1  thorpej # XXX SHOULD NOT NEED TO DEFINE THESE!
     23       1.1  thorpej LIBCRT0=
     24  1.12.4.1     yamt LIBCRTI=
     25       1.4   simonb LIBC=
     26       1.1  thorpej LIBCRTBEGIN=
     27       1.1  thorpej LIBCRTEND=
     28       1.1  thorpej 
     29       1.1  thorpej STRIPFLAG=
     30       1.1  thorpej BINMODE=	444
     31       1.1  thorpej 
     32       1.1  thorpej NEWVERSWHAT=	"OpenFirmware Boot"
     33       1.1  thorpej 
     34       1.1  thorpej RELOC=		f0000000
     35       1.1  thorpej 
     36       1.1  thorpej ENTRY=		_start
     37       1.1  thorpej 
     38       1.1  thorpej CLEANFILES+=	vers.c
     39       1.1  thorpej 
     40       1.1  thorpej CPPFLAGS+=	-nostdinc -I. -I${.CURDIR}/../../.. -I${S}
     41       1.1  thorpej CPPFLAGS+=	-DRELOC=0x${RELOC}
     42  1.12.4.1     yamt CFLAGS+=	-fno-unwind-tables
     43  1.12.4.1     yamt CPUFLAGS=	-mcpu=strongarm
     44       1.1  thorpej 
     45       1.1  thorpej CLEANFILES+= ${PROG}.aout
     46       1.1  thorpej 
     47       1.1  thorpej ### find out what to use for libkern
     48       1.1  thorpej KERN_AS=	library
     49       1.1  thorpej .include "${S}/lib/libkern/Makefile.inc"
     50       1.1  thorpej LIBKERN=	${KERNLIB}
     51       1.1  thorpej 
     52       1.1  thorpej ### find out what to use for libz
     53       1.1  thorpej Z_AS=		library
     54       1.1  thorpej .include "${S}/lib/libz/Makefile.inc"
     55       1.1  thorpej LIBZ=		${ZLIB}
     56       1.1  thorpej 
     57       1.1  thorpej ### find out what to use for libsa
     58       1.1  thorpej SA_AS=		library
     59       1.1  thorpej SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
     60       1.1  thorpej .include "${S}/lib/libsa/Makefile.inc"
     61       1.1  thorpej LIBSA=		${SALIB}
     62       1.1  thorpej 
     63       1.1  thorpej .PHONY: vers.c
     64       1.1  thorpej vers.c: version
     65      1.12    joerg 	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
     66      1.12    joerg 	    ${.CURDIR}/version "shark" ${NEWVERSWHAT}
     67       1.1  thorpej 
     68       1.1  thorpej ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     69  1.12.4.1     yamt 	${_MKTARGET_LINK}
     70       1.1  thorpej 	${LD} -s -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET}.aout \
     71       1.1  thorpej 	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     72       1.1  thorpej 	${OBJCOPY} -O binary ${.TARGET}.aout ${.TARGET}
     73       1.1  thorpej 
     74       1.1  thorpej .include <bsd.prog.mk>
     75