Sync usage with man page.
[netbsd-mini2440.git] / sys / arch / acorn26 / stand / Makefile.buildboot
blobc9073f91fcc90ae0ad6077033907a50519754ea1
1 #       $NetBSD: Makefile.buildboot,v 1.10 2005/12/11 12:16:05 christos Exp $
3 S?=     ${.CURDIR}/../../../..
5 .PATH: ${.CURDIR}/../lib
7 SRCS=   ${PROGSOURCE}
8 NOMAN=# defined
9 BINDIR=/usr/mdec
10 BINMODE=444
11 FILESDIR=/usr/mdec
13 # XXX SHOULD NOT NEED TO DEFINE THESE!
14 LIBCRT0=
15 LIBC=
16 LIBCRTBEGIN=
17 LIBCRTEND=
19 RISCOSTYPE ?= ff8
21 SRCS+=          vers.c
22 CLEANFILES+=    vers.c
23 .PHONY: vers.c
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
30 CFLAGS=         -O2
31 CFLAGS+=        -ffreestanding
32 CFLAGS+=        -Wall -Wstrict-prototypes -Wmissing-prototypes
34 .if !make(obj) && !make(clean) && !make(cleandir)
35 .BEGIN:
36         -rm -f machine ${MACHINE_ARCH}
37         ln -s $S/arch/${MACHINE}/include machine
38         ln -s $S/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH}
39 .endif
41 CLEANFILES+= machine ${MACHINE_ARCH}
43 ### find out what to use for libkern
44 KERN_AS=        library
45 .include "${S}/lib/libkern/Makefile.inc"
46 LIBKERN=        ${KERNLIB}
48 ### find out what to use for libz
49 Z_AS=           library
50 .include "${S}/lib/libz/Makefile.inc"
51 LIBZ=           ${ZLIB}
53 ### find out what to use for libsa
54 SA_AS=          library
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 \
58                 -DLIBSA_NO_FS_WRITE \
59                 -DHEAP_VARIABLE
60 .include "${S}/lib/libsa/Makefile.inc"
61 LIBSA=          ${SALIB}
63 ### find out what to use for libriscos
64 RISCOS_AS=              library
65 .include "${S}/arch/acorn26/stand/lib/Makefile.inc"
66 LIBRISCOS=              ${RISCOSLIB}
68 RELOC=8000
69 # -N (OMAGIC) since we don't need a gap between text and data.
70 LINKFLAGS=-N
72 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBRISCOS}
73         ${LD} -o ${.TARGET} ${LINKFLAGS} -Ttext ${RELOC} ${OBJS} \
74             ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBRISCOS} ${LIBSA}
75         ${SIZE} ${.TARGET}
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>