Home | History | Annotate | Line # | Download | only in ofwboot
Makefile revision 1.14
      1 #	$NetBSD: Makefile,v 1.14 2002/09/21 01:18:40 chs Exp $
      2 
      3 S=	${.CURDIR}/../../../..
      4 
      5 PROG=		ofwboot
      6 SRCS=		Locore.c alloc.c boot.c ofdev.c net.c netif_of.c vers.c
      7 CFLAGS+=	-msoft-float -Wno-main
      8 #CPPFLAGS+=	-DDEBUG -DNETIF_DEBUG
      9 CPPFLAGS+=	-D_STANDALONE -DSUPPORT_DHCP -I${.CURDIR}
     10 DBG=		-Os -mmultiple
     11 
     12 SRCS+=		ofwmagic.S
     13 .PATH:		${S}/arch/powerpc/powerpc
     14 
     15 SRCS+=		byteorder.c
     16 .PATH:		${S}/lib/libsa
     17 
     18 NOMAN=		# defined
     19 STRIPFLAG=
     20 BINMODE=	444
     21 
     22 NEWVERSWHAT=	"OpenFirmware Boot"
     23 
     24 # For now...
     25 RELOC=		20000
     26 
     27 ENTRY=		_start
     28 
     29 CLEANFILES+=	vers.c
     30 
     31 CPPFLAGS+=	-I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
     32 CPPFLAGS+=	-DRELOC=0x${RELOC}
     33 CPPFLAGS+=	-DFIRMWORKSBUGS
     34 CPPFLAGS+=	-DCOMPAT_386BSD_MBRPART
     35 
     36 .BEGIN:
     37 	@[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
     38 	@[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc
     39 .NOPATH: machine powerpc
     40 CLEANFILES+= machine powerpc
     41 
     42 ### find out what to use for libkern
     43 KERN_AS=	library
     44 .include "${S}/lib/libkern/Makefile.inc"
     45 LIBKERN=	${KERNLIB}
     46 
     47 ### find out what to use for libz
     48 Z_AS=		library
     49 .include "${S}/lib/libz/Makefile.inc"
     50 LIBZ=		${ZLIB}
     51 
     52 ### find out what to use for libsa
     53 SA_AS=		library
     54 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
     55 .include "${S}/lib/libsa/Makefile.inc"
     56 LIBSA=		${SALIB}
     57 
     58 .PHONY: vers.c
     59 vers.c: version
     60 	sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version "ofppc" ${NEWVERSWHAT}
     61 
     62 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     63 	${LD} -s -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG}.X \
     64 	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     65 	mv -f ${PROG}.X ${PROG}
     66 
     67 .include <bsd.prog.mk>
     68