Home | History | Annotate | Line # | Download | only in ofwboot
Makefile revision 1.20.8.1
      1  1.20.8.1    bouyer #	$NetBSD: Makefile,v 1.20.8.1 2008/01/10 23:43:31 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.20.8.1    bouyer SRCS=		ofwstart.S Locore.c boot.c ofdev.c net.c netif_of.c vers.c
      7      1.15    simonb CFLAGS+=	-msoft-float -Wno-main -ffreestanding
      8  1.20.8.1    bouyer #CPPFLAGS+=	-g -DALLOC_TRACE -DDEBUG #-DOFW_DEBUG -DNETIF_DEBUG
      9      1.10   thorpej CPPFLAGS+=	-D_STANDALONE -DSUPPORT_DHCP -I${.CURDIR}
     10  1.20.8.1    bouyer CPPFLAGS+=	-DHEAP_VARIABLE
     11      1.10   thorpej DBG=		-Os -mmultiple
     12      1.10   thorpej 
     13       1.1   thorpej SRCS+=		ofwmagic.S
     14       1.5  sakamoto .PATH:		${S}/arch/powerpc/powerpc
     15      1.12    itojun 
     16      1.12    itojun SRCS+=		byteorder.c
     17      1.12    itojun .PATH:		${S}/lib/libsa
     18      1.10   thorpej 
     19      1.11        tv NOMAN=		# defined
     20       1.2   thorpej STRIPFLAG=
     21       1.1   thorpej BINMODE=	444
     22      1.15    simonb 
     23      1.15    simonb # XXX SHOULD NOT NEED TO DEFINE THESE!
     24      1.15    simonb LIBCRT0=
     25      1.15    simonb LIBC=
     26      1.15    simonb LIBCRTBEGIN=
     27      1.15    simonb LIBCRTEND=
     28       1.1   thorpej 
     29       1.1   thorpej NEWVERSWHAT=	"OpenFirmware Boot"
     30       1.1   thorpej 
     31       1.1   thorpej # For now...
     32       1.1   thorpej RELOC=		20000
     33       1.1   thorpej 
     34       1.1   thorpej ENTRY=		_start
     35       1.1   thorpej 
     36      1.14       chs CLEANFILES+=	vers.c
     37       1.1   thorpej 
     38      1.19   tsutsui CPPFLAGS+=	-I. -I${S} -I${S}/../common/include
     39       1.1   thorpej CPPFLAGS+=	-DRELOC=0x${RELOC}
     40       1.1   thorpej CPPFLAGS+=	-DFIRMWORKSBUGS
     41       1.3  drochner CPPFLAGS+=	-DCOMPAT_386BSD_MBRPART
     42       1.1   thorpej 
     43      1.16      matt .if !make(obj) && !make(clean) && !make(cleandir)
     44       1.7  wrstuden .BEGIN:
     45       1.7  wrstuden 	@[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
     46       1.7  wrstuden 	@[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc
     47      1.16      matt .endif
     48       1.8   mycroft .NOPATH: machine powerpc
     49       1.8   mycroft CLEANFILES+= machine powerpc
     50       1.5  sakamoto 
     51       1.1   thorpej ### find out what to use for libkern
     52       1.1   thorpej KERN_AS=	library
     53       1.1   thorpej .include "${S}/lib/libkern/Makefile.inc"
     54       1.1   thorpej LIBKERN=	${KERNLIB}
     55       1.1   thorpej 
     56       1.1   thorpej ### find out what to use for libz
     57       1.1   thorpej Z_AS=		library
     58       1.1   thorpej .include "${S}/lib/libz/Makefile.inc"
     59       1.1   thorpej LIBZ=		${ZLIB}
     60       1.1   thorpej 
     61       1.1   thorpej ### find out what to use for libsa
     62       1.1   thorpej SA_AS=		library
     63      1.10   thorpej SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
     64       1.1   thorpej .include "${S}/lib/libsa/Makefile.inc"
     65       1.1   thorpej LIBSA=		${SALIB}
     66       1.1   thorpej 
     67       1.9  jdolecek .PHONY: vers.c
     68       1.9  jdolecek vers.c: version
     69      1.17     lukem 	${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "ofppc" ${NEWVERSWHAT}
     70      1.13       chs 
     71       1.1   thorpej ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     72      1.13       chs 	${LD} -s -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG}.X \
     73       1.9  jdolecek 	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     74      1.13       chs 	mv -f ${PROG}.X ${PROG}
     75       1.1   thorpej 
     76       1.1   thorpej .include <bsd.prog.mk>
     77