Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / acorn32 / stand / Makefile.buildboot
blob51918f1bf6e6f124951011a915b1094b04a41ee4
1 #       $NetBSD: Makefile.buildboot,v 1.12 2006/04/02 22:13:32 bjh21 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 MKMODULE?=no
20 .if ${MKMODULE} == "yes"
21 RISCOSTYPE ?= ffa
22 LINKFLAGS+=-shared -Bsymbolic --no-undefined -T ${.CURDIR}/../module.ldscript
23 CFLAGS+=-DRISCOS_MODULE
24 .else
25 RISCOSTYPE ?= ff8
26 RELOC=8000
27 # -N (OMAGIC) since we don't need a gap between text and data.
28 LINKFLAGS+=-N -Ttext ${RELOC}
29 .endif
31 SRCS+=          vers.c
32 CLEANFILES+=    vers.c
33 .PHONY: vers.c
34 vers.c: ${.CURDIR}/version
35         ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version ${MACHINE} ${NEWVERSWHAT}
37 CPPFLAGS+=      -D_STANDALONE 
38 CPPFLAGS+=      -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
39 CPPFLAGS+=      -I${.CURDIR}/../lib
40 CFLAGS=         -O2
41 CFLAGS+=        -ffreestanding
42 CFLAGS+=        -Wall -Wstrict-prototypes -Wmissing-prototypes
44 .if !make(obj) && !make(clean) && !make(cleandir)
45 .BEGIN:
46         -rm -f machine ${MACHINE_ARCH}
47         ln -s $S/arch/${MACHINE}/include machine
48         ln -s $S/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH}
49 .endif
51 CLEANFILES+= machine ${MACHINE_ARCH}
53 ### find out what to use for libkern
54 KERN_AS=        library
55 .include "${S}/lib/libkern/Makefile.inc"
56 LIBKERN=        ${KERNLIB}
58 ### find out what to use for libz
59 Z_AS=           library
60 .include "${S}/lib/libz/Makefile.inc"
61 LIBZ=           ${ZLIB}
63 ### find out what to use for libsa
64 SA_AS=          library
65 SAMISCMAKEFLAGS+= SA_INCLUDE_NET=no
66 CPPFLAGS+=      -DLIBSA_NO_RAW_ACCESS \
67                 -DHEAP_VARIABLE
68 .include "${S}/lib/libsa/Makefile.inc"
69 LIBSA=          ${SALIB}
71 ### find out what to use for libriscos
72 RISCOS_AS=              library
73 .include "${S}/arch/acorn32/stand/lib/Makefile.inc"
74 LIBRISCOS=              ${RISCOSLIB}
76 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBRISCOS}
77         ${_MKTARGET_LINK}
78         ${LD} -o ${.TARGET} ${LINKFLAGS} ${OBJS} \
79             --start-group ${LIBSA} ${LIBZ} ${LIBRISCOS} ${LIBKERN} --end-group
80         ${SIZE} ${.TARGET}
82 ${PROG},${RISCOSTYPE}: ${PROG}
83         ${_MKTARGET_CREATE}
84         ${OBJCOPY} --output-target=binary ${.ALLSRC} ${.TARGET}
86 realall: ${PROG},${RISCOSTYPE}
88 CLEANFILES+=    ${PROG},${RISCOSTYPE}
89 FILES+=         ${PROG},${RISCOSTYPE}
91 .include <bsd.prog.mk>