2002-01-10 02:47:04 +03:00
|
|
|
# $NetBSD: Makefile,v 1.3 2002/01/09 23:47:04 thorpej Exp $
|
2001-11-02 01:50:18 +03:00
|
|
|
|
2002-01-10 02:47:04 +03:00
|
|
|
S= ${.CURDIR}/../../../..
|
2001-11-02 01:50:18 +03:00
|
|
|
|
|
|
|
PROG= ofwboot
|
|
|
|
SRCS= srt0.S Locore.c alloc.c boot.c ofdev.c net.c netif_of.c vers.c
|
|
|
|
CFLAGS+= -Wno-main
|
|
|
|
#CPPFLAGS+= -DDEBUG -DNETIF_DEBUG
|
|
|
|
CPPFLAGS+= -DSUPPORT_DHCP -I${.CURDIR}
|
2002-01-10 02:47:04 +03:00
|
|
|
CPPFLAGS+= -D_STANDALONE
|
2001-11-02 01:50:18 +03:00
|
|
|
DBG= -Os
|
|
|
|
|
2002-01-10 02:47:04 +03:00
|
|
|
# XXX SHOULD NOT NEED TO DEFINE THESE!
|
|
|
|
LIBCRT0=
|
|
|
|
LIBCRTBEGIN=
|
|
|
|
LIBCRTEND=
|
|
|
|
|
2001-12-12 04:48:43 +03:00
|
|
|
NOMAN= # defined
|
2001-11-02 01:50:18 +03:00
|
|
|
STRIPFLAG=
|
|
|
|
BINMODE= 444
|
|
|
|
|
|
|
|
NEWVERSWHAT= "OpenFirmware Boot"
|
|
|
|
|
|
|
|
RELOC= f0000000
|
|
|
|
|
|
|
|
ENTRY= _start
|
|
|
|
|
|
|
|
CLEANFILES+= vers.c
|
|
|
|
|
2002-01-10 02:47:04 +03:00
|
|
|
CPPFLAGS+= -nostdinc -I. -I${.CURDIR}/../../.. -I${S}
|
2001-11-02 01:50:18 +03:00
|
|
|
CPPFLAGS+= -DRELOC=0x${RELOC}
|
|
|
|
|
|
|
|
.BEGIN:
|
|
|
|
@[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
|
|
|
|
@[ -h arm ] || ln -s ${S}/arch/arm/include arm
|
|
|
|
.NOPATH: machine arm
|
|
|
|
CLEANFILES+= machine arm
|
|
|
|
|
2002-01-10 02:47:04 +03:00
|
|
|
CLEANFILES+= ${PROG}.aout
|
|
|
|
|
2001-11-02 01:50:18 +03:00
|
|
|
### find out what to use for libkern
|
|
|
|
KERN_AS= library
|
|
|
|
.include "${S}/lib/libkern/Makefile.inc"
|
|
|
|
LIBKERN= ${KERNLIB}
|
|
|
|
|
|
|
|
### find out what to use for libz
|
|
|
|
Z_AS= library
|
|
|
|
.include "${S}/lib/libz/Makefile.inc"
|
|
|
|
LIBZ= ${ZLIB}
|
|
|
|
|
|
|
|
### find out what to use for libsa
|
|
|
|
SA_AS= library
|
|
|
|
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
|
|
|
|
.include "${S}/lib/libsa/Makefile.inc"
|
|
|
|
LIBSA= ${SALIB}
|
|
|
|
|
|
|
|
.PHONY: vers.c
|
|
|
|
vers.c: version
|
|
|
|
sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version "dnard" ${NEWVERSWHAT}
|
2002-01-10 02:47:04 +03:00
|
|
|
|
2001-11-02 01:50:18 +03:00
|
|
|
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
2002-01-10 02:47:04 +03:00
|
|
|
${LD} -s -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET}.aout \
|
2001-11-02 01:50:18 +03:00
|
|
|
${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
2002-01-10 02:47:04 +03:00
|
|
|
${OBJCOPY} -O binary ${.TARGET}.aout ${.TARGET}
|
2001-11-02 01:50:18 +03:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|