1 # $NetBSD: Makefile.buildboot,v 1.10 2005/12/11 12:16:05 christos Exp $
3 S?= ${.CURDIR}/../../../..
5 .PATH: ${.CURDIR}/../lib
13 # XXX SHOULD NOT NEED TO DEFINE THESE!
24 vers.c: ${.CURDIR}/version
25 ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version ${MACHINE} ${NEWVERSWHAT}
27 CPPFLAGS+= -D_STANDALONE -DHIMEM=0x28000
28 CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
29 CPPFLAGS+= -I${.CURDIR}/../lib
31 CFLAGS+= -ffreestanding
32 CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes
34 .if !make(obj) && !make(clean) && !make(cleandir)
36 -rm -f machine ${MACHINE_ARCH}
37 ln -s $S/arch/${MACHINE}/include machine
38 ln -s $S/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH}
41 CLEANFILES+= machine ${MACHINE_ARCH}
43 ### find out what to use for libkern
45 .include "${S}/lib/libkern/Makefile.inc"
48 ### find out what to use for libz
50 .include "${S}/lib/libz/Makefile.inc"
53 ### find out what to use for libsa
55 SAMISCMAKEFLAGS+= SA_INCLUDE_NET=no SA_USE_LOADFILE=yes SA_USE_CREAD=yes
56 CPPFLAGS+= -DLIBSA_NO_RAW_ACCESS \
57 -DLIBSA_SINGLE_FILESYSTEM=riscos \
60 .include "${S}/lib/libsa/Makefile.inc"
63 ### find out what to use for libriscos
65 .include "${S}/arch/acorn26/stand/lib/Makefile.inc"
66 LIBRISCOS= ${RISCOSLIB}
69 # -N (OMAGIC) since we don't need a gap between text and data.
72 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBRISCOS}
73 ${LD} -o ${.TARGET} ${LINKFLAGS} -Ttext ${RELOC} ${OBJS} \
74 ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBRISCOS} ${LIBSA}
77 ${PROG},${RISCOSTYPE}: ${PROG}
78 ${OBJCOPY} --output-target=binary ${.ALLSRC} ${.TARGET}
80 realall: ${PROG},${RISCOSTYPE}
82 CLEANFILES+= ${PROG},${RISCOSTYPE}
83 FILES+= ${PROG},${RISCOSTYPE}
85 .include <bsd.prog.mk>