f85d2d1c14
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH; Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
71 lines
1.5 KiB
Makefile
71 lines
1.5 KiB
Makefile
# $NetBSD: Makefile,v 1.5 2003/10/26 07:25:37 lukem 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 -ffreestanding
|
|
|
|
SRCS+= byteorder.c
|
|
.PATH: ${S}/lib/libsa
|
|
|
|
# XXX SHOULD NOT NEED TO DEFINE THESE!
|
|
LIBCRT0=
|
|
LIBC=
|
|
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
|
|
${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "shark" ${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>
|