Makefile.bootprogs revision 1.1.74.1 1 # $NetBSD: Makefile.bootprogs,v 1.1.74.1 2009/04/28 07:34:16 skrll 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= -m4-nofpu -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 .include <bsd.klinks.mk>
33
34 lib:
35 .ifdef LIBOBJ
36 -rm -f $@
37 ln -s ${LIBOBJ}/lib .
38 [ -d ${LIBOBJ}/lib ] || mkdir ${LIBOBJ}/lib
39 .else
40 mkdir lib
41 .endif
42
43 ### find out what to use for libsa
44 SA_AS= library
45 .include "${S}/lib/libsa/Makefile.inc"
46 LIBSA= ${SALIB}
47 CPPFLAGS+= -I$(SADIR)
48
49 ### find out what to use for libkern
50 KERN_AS= library
51 .include "${S}/lib/libkern/Makefile.inc"
52 LIBKERN= ${KERNLIB}
53
54 ### find out what to use for libz
55 Z_AS= library
56 .include "${S}/lib/libz/Makefile.inc"
57 LIBZ= ${ZLIB}
58
59 realdepend realall: lib
60
61 cleandir distclean: cleanlibdir
62
63 cleanlibdir:
64 -rm -rf lib
65