Makefile.buildboot revision 1.1 1 # $NetBSD: Makefile.buildboot,v 1.1 2002/12/28 23:57:36 reinoud Exp $
2
3 S?= ${.CURDIR}/../../../..
4
5 .PATH: ${.CURDIR}/../lib
6
7 SRCS= ${PROGSOURCE}
8 NOMAN=# defined
9 BINDIR=/usr/mdec
10 BINMODE=444
11 FILESDIR=/usr/mdec
12
13 RISCOSTYPE ?= ff8
14
15 SRCS+= vers.c
16 CLEANFILES+= vers.c
17 .PHONY: vers.c
18 vers.c: ${.CURDIR}/version
19 sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version ${MACHINE} ${NEWVERSWHAT}
20
21 CPPFLAGS+= -D_STANDALONE
22 CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
23 CPPFLAGS+= -I${.CURDIR}/../lib
24 CFLAGS= -O2
25 CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes
26
27 .if !make(obj) && !make(clean) && !make(cleandir)
28 .BEGIN: machine
29 .NOPATH: machine
30 .endif
31
32 realdepend realall: machine
33 CLEANFILES+= machine
34
35 machine::
36 -rm -f $@
37 ln -s $S/arch/acorn32/include $@
38
39 ${OBJS}: machine
40
41 ### find out what to use for libkern
42 KERN_AS= library
43 .include "${S}/lib/libkern/Makefile.inc"
44 LIBKERN= ${KERNLIB}
45
46 ### find out what to use for libz
47 Z_AS= library
48 .include "${S}/lib/libz/Makefile.inc"
49 LIBZ= ${ZLIB}
50
51 ### find out what to use for libsa
52 SA_AS= library
53 SAMISCMAKEFLAGS+= SA_INCLUDE_NET=no SA_USE_LOADFILE=yes SA_USE_CREAD=yes
54 CPPFLAGS+= -DLIBSA_NO_RAW_ACCESS \
55 -DLIBSA_SINGLE_FILESYSTEM=riscos \
56 -DLIBSA_NO_FS_WRITE \
57 -DLIBSA_USE_MEMCPY -DLIBSA_USE_MEMSET \
58 -DHEAP_VARIABLE
59 .include "${S}/lib/libsa/Makefile.inc"
60 LIBSA= ${SALIB}
61
62 ### find out what to use for libriscos
63 RISCOS_AS= library
64 .include "${S}/arch/acorn32/stand/lib/Makefile.inc"
65 LIBRISCOS= ${RISCOSLIB}
66
67 RELOC=8000
68 # -N (OMAGIC) since we don't need a gap between text and data.
69 LINKFLAGS=-N
70
71 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBRISCOS}
72 ${LD} -o ${.TARGET} ${LINKFLAGS} -Ttext ${RELOC} ${OBJS} \
73 ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBRISCOS} ${LIBSA}
74 ${SIZE} ${.TARGET}
75
76 ${PROG},${RISCOSTYPE}: ${PROG}
77 ${OBJCOPY} --output-target=binary ${.ALLSRC} ${.TARGET}
78
79 realall: ${PROG},${RISCOSTYPE}
80
81 CLEANFILES+= ${PROG},${RISCOSTYPE}
82 FILES+= ${PROG},${RISCOSTYPE}
83
84 .include <bsd.prog.mk>
85