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