NetBSD/sys/arch/arm32/stand/ofwboot/Makefile

67 lines
1.5 KiB
Makefile

# $NetBSD: Makefile,v 1.3 2002/01/09 23:47:04 thorpej Exp $
S= ${.CURDIR}/../../../..
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}
CPPFLAGS+= -D_STANDALONE
DBG= -Os
# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBCRTBEGIN=
LIBCRTEND=
NOMAN= # defined
STRIPFLAG=
BINMODE= 444
NEWVERSWHAT= "OpenFirmware Boot"
RELOC= f0000000
ENTRY= _start
CLEANFILES+= vers.c
CPPFLAGS+= -nostdinc -I. -I${.CURDIR}/../../.. -I${S}
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
CLEANFILES+= ${PROG}.aout
### 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}
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
${LD} -s -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET}.aout \
${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
${OBJCOPY} -O binary ${.TARGET}.aout ${.TARGET}
.include <bsd.prog.mk>