Makefile.bootprogs revision 1.1 1 # $NetBSD: Makefile.bootprogs,v 1.1 2006/09/01 21:26:18 uwe Exp $
2
3 S= ${.CURDIR}/../../../../..
4
5 NOMAN= # defined
6
7 BINDIR= /usr/mdec
8 BINMODE= 0444
9
10 PRIMARY_LOAD_ADDRESS?=0x8c201000
11 SECONDARY_LOAD_ADDRESS?=0x8ff00000
12
13 .include <bsd.own.mk>
14
15 STRIPFLAG= # override
16
17 LIBCRT0= # nothing
18 LIBCRTBEGIN= # nothing
19 LIBCRTEND= # nothing
20 LIBC= # nothing
21
22 .PATH: ${.CURDIR}/..
23
24 COPTS= -Os -ffreestanding
25
26 LDFLAGS+= -N
27 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes
28 CPPFLAGS+= -nostdinc -D_STANDALONE
29 CPPFLAGS+= -DSH4
30 CPPFLAGS+= -I${.OBJDIR} -I${.CURDIR}/.. -I${.CURDIR}/../../boot -I${S}
31
32 LANDISK_STAND_DIR?= $S/arch/landisk/stand
33
34 CLEANFILES+= machine sh3
35
36 .if !make(obj) && !make(clean) && !make(cleandir)
37 .BEGIN: machine sh3
38 .NOPATH: machine sh3
39
40 machine::
41 -rm -f $@
42 ln -s ${S}/arch/${MACHINE}/include $@
43
44 sh3::
45 -rm -f $@
46 ln -s ${S}/arch/sh3/include $@
47 .endif
48
49 lib:
50 .ifdef LIBOBJ
51 -rm -f $@
52 ln -s ${LIBOBJ}/lib .
53 [ -d ${LIBOBJ}/lib ] || mkdir ${LIBOBJ}/lib
54 .else
55 mkdir lib
56 .endif
57
58 ### find out what to use for libsa
59 SA_AS= library
60 .include "${S}/lib/libsa/Makefile.inc"
61 LIBSA= ${SALIB}
62 CPPFLAGS+= -I$(SADIR)
63
64 ### find out what to use for libkern
65 KERN_AS= library
66 .include "${S}/lib/libkern/Makefile.inc"
67 LIBKERN= ${KERNLIB}
68
69 ### find out what to use for libz
70 Z_AS= library
71 .include "${S}/lib/libz/Makefile.inc"
72 LIBZ= ${ZLIB}
73
74 realdepend realall: lib
75
76 cleandir distclean: cleanlibdir
77
78 cleanlibdir:
79 -rm -rf lib
80