2001-11-23 15:58:03 +03:00
|
|
|
# $NetBSD: Makefile.buildboot,v 1.6 2001/11/23 12:58:03 bjh21 Exp $
|
2001-07-27 02:16:26 +04:00
|
|
|
|
|
|
|
S?= ${.CURDIR}/../../../..
|
|
|
|
|
|
|
|
.PATH: ${.CURDIR}/../lib
|
|
|
|
|
2001-08-03 03:38:04 +04:00
|
|
|
SRCS= ${PROGSOURCE}
|
2001-07-27 02:16:26 +04:00
|
|
|
MKMAN=no
|
2001-07-28 16:44:54 +04:00
|
|
|
BINDIR=/usr/mdec
|
2001-07-27 02:16:26 +04:00
|
|
|
BINMODE=444
|
2001-07-28 16:44:54 +04:00
|
|
|
FILESDIR=/usr/mdec
|
2001-07-27 02:16:26 +04:00
|
|
|
|
2001-08-03 03:38:04 +04:00
|
|
|
RISCOSTYPE ?= ff8
|
|
|
|
|
2001-07-27 02:16:26 +04:00
|
|
|
SRCS+= vers.c
|
|
|
|
CLEANFILES+= vers.c
|
|
|
|
.PHONY: vers.c
|
|
|
|
vers.c: ${.CURDIR}/version
|
|
|
|
sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version ${MACHINE} ${NEWVERSWHAT}
|
|
|
|
|
2001-07-28 03:13:49 +04:00
|
|
|
CPPFLAGS+= -D_STANDALONE -DHIMEM=0x20000
|
2001-07-27 02:16:26 +04:00
|
|
|
CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
|
|
|
|
CPPFLAGS+= -I${.CURDIR}/../lib
|
|
|
|
CFLAGS= -O2
|
|
|
|
CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes
|
|
|
|
|
|
|
|
### 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
|
2001-07-28 03:13:49 +04:00
|
|
|
SAMISCMAKEFLAGS+= SA_INCLUDE_NET=no SA_USE_LOADFILE=yes SA_USE_CREAD=yes
|
|
|
|
CPPFLAGS += -DLIBSA_SINGLE_FILESYSTEM=riscos -DHEAP_VARIABLE
|
2001-07-27 02:16:26 +04:00
|
|
|
.include "${S}/lib/libsa/Makefile.inc"
|
|
|
|
LIBSA= ${SALIB}
|
|
|
|
|
|
|
|
### find out what to use for libriscos
|
|
|
|
RISCOS_AS= library
|
|
|
|
.include "${S}/arch/arm26/stand/lib/Makefile.inc"
|
|
|
|
LIBRISCOS= ${RISCOSLIB}
|
|
|
|
|
|
|
|
RELOC=8000
|
2001-07-28 03:13:49 +04:00
|
|
|
# -N (OMAGIC) since we don't need a gap between text and data.
|
|
|
|
LINKFLAGS=-N
|
2001-07-27 02:16:26 +04:00
|
|
|
|
|
|
|
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBRISCOS}
|
|
|
|
${LD} -o ${.TARGET} ${LINKFLAGS} -Ttext ${RELOC} ${OBJS} \
|
|
|
|
${LIBSA} ${LIBZ} ${LIBKERN} ${LIBRISCOS} ${LIBSA}
|
|
|
|
${SIZE} ${.TARGET}
|
|
|
|
|
2001-08-03 03:38:04 +04:00
|
|
|
${PROG},${RISCOSTYPE}: ${PROG}
|
2001-07-27 02:16:26 +04:00
|
|
|
${OBJCOPY} --output-target=binary ${.ALLSRC} ${.TARGET}
|
|
|
|
|
2001-11-23 15:58:03 +03:00
|
|
|
realall: ${PROG},${RISCOSTYPE}
|
2001-07-27 02:16:26 +04:00
|
|
|
|
2001-08-03 03:38:04 +04:00
|
|
|
CLEANFILES+= ${PROG},${RISCOSTYPE}
|
|
|
|
FILES+= ${PROG},${RISCOSTYPE}
|
2001-07-27 02:16:26 +04:00
|
|
|
|
2001-07-28 03:13:49 +04:00
|
|
|
.if !make(obj)
|
|
|
|
.BEGIN:
|
|
|
|
@([ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine)
|
|
|
|
.NOPATH: machine
|
|
|
|
CLEANFILES+= machine
|
|
|
|
.endif
|
|
|
|
|
2001-07-27 02:16:26 +04:00
|
|
|
.include <bsd.prog.mk>
|