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