| @@ -1,54 +1,65 @@ | | | @@ -1,54 +1,65 @@ |
1 | # $NetBSD: Makefile.booters,v 1.6 2005/12/11 12:18:20 christos Exp $ | | 1 | # $NetBSD: Makefile.booters,v 1.7 2009/01/12 07:25:39 tsutsui Exp $ |
2 | | | 2 | |
3 | S?= ${.CURDIR}/../../../.. | | 3 | S?= ${.CURDIR}/../../../.. |
4 | MDEC_DIR?= /usr/mdec | | 4 | MDEC_DIR?= /usr/mdec |
5 | RELOC?= 0x3F0000 | | 5 | RELOC?= 0x3F0000 |
6 | COPTS?= -O2 -Wall -Wno-main -Wmissing-prototypes -Wstrict-prototypes | | 6 | COPTS?= -O2 -Wall -Wno-main -Wmissing-prototypes -Wstrict-prototypes |
7 | DEFS?= | | 7 | DEFS?= |
8 | STRIPFLAG?= | | 8 | STRIPFLAG?= |
9 | | | 9 | |
10 | NOMAN= # defined | | 10 | NOMAN= # defined |
11 | NOMAN= # defined | | 11 | NOMAN= # defined |
12 | NOLINT= # defined | | 12 | NOLINT= # defined |
13 | NOLINT= # defined | | 13 | NOLINT= # defined |
14 | NOPIC= # defined | | 14 | NOPIC= # defined |
15 | NOPROFILE=# defined | | 15 | NOPROFILE=# defined |
16 | NOLINT=# defined | | 16 | NOLINT=# defined |
17 | | | 17 | |
18 | INCPATH=-I${.OBJDIR} -I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libbug \ | | 18 | INCPATH=-I${.OBJDIR} -I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libbug \ |
19 | -I${.CURDIR}/../../include -I${S} -I${S}/lib/libsa | | 19 | -I${.CURDIR}/../../include -I${S} -I${S}/lib/libsa |
20 | CFLAGS= -nostdinc -ffreestanding | | 20 | CFLAGS= -nostdinc -ffreestanding |
21 | CPPFLAGS= -D_STANDALONE \ | | 21 | CPPFLAGS= -D_STANDALONE \ |
22 | -DLIBSA_USE_MEMSET -DLIBSA_USE_MEMCPY ${INCPATH} ${DEFS} | | 22 | -DLIBSA_USE_MEMSET -DLIBSA_USE_MEMCPY ${INCPATH} ${DEFS} |
23 | BINDIR= ${MDEC_DIR} | | 23 | BINDIR= ${MDEC_DIR} |
24 | | | 24 | |
| | | 25 | # XXX SHOULD NOT NEED TO DEFINE THESE! |
| | | 26 | LIBCRT0= |
| | | 27 | LIBC= |
| | | 28 | LIBCRTBEGIN= |
| | | 29 | LIBCRTEND= |
| | | 30 | |
25 | .if exists(${.CURDIR}/version) | | 31 | .if exists(${.CURDIR}/version) |
26 | SRCS+= vers.c | | 32 | SRCS+= vers.c |
27 | CLEANFILES+= vers.c | | 33 | CLEANFILES+= vers.c |
28 | | | 34 | |
29 | vers.c: version | | 35 | vers.c: version |
30 | ${HOST_SH} ${S}/conf/newvers_stand.sh -DM ${.CURDIR}/version "mvmeppc" | | 36 | ${HOST_SH} ${S}/conf/newvers_stand.sh -DM ${.CURDIR}/version "mvmeppc" |
31 | .endif | | 37 | .endif |
32 | | | 38 | |
33 | CLEANFILES+= machine powerpc | | 39 | CLEANFILES+= machine powerpc |
34 | | | 40 | |
| | | 41 | .if !make(obj) && !make(clean) && !make(cleandir) |
| | | 42 | .NOPATH: machine powerpc |
| | | 43 | .BEGIN: machine powerpc |
| | | 44 | |
35 | machine : | | 45 | machine : |
36 | -rm -f ${.TARGET} | | 46 | -rm -f ${.TARGET} |
37 | ln -s $S/arch/mvmeppc/include machine | | 47 | ln -s $S/arch/mvmeppc/include machine |
38 | | | 48 | |
39 | powerpc : | | 49 | powerpc : |
40 | -rm -f ${.TARGET} | | 50 | -rm -f ${.TARGET} |
41 | ln -s $S/arch/powerpc/include powerpc | | 51 | ln -s $S/arch/powerpc/include powerpc |
| | | 52 | .endif |
42 | | | 53 | |
43 | .if defined(LIB) | | 54 | .if defined(LIB) |
44 | | | 55 | |
45 | lib${LIB}.a:: machine powerpc ${OBJS} | | 56 | lib${LIB}.a:: machine powerpc ${OBJS} |
46 | beforedepend: machine powerpc | | 57 | beforedepend: machine powerpc |
47 | | | 58 | |
48 | .else | | 59 | .else |
49 | | | 60 | |
50 | PROGDEPENDS?= ${SRTOBJ} ${OBJS} ${LIBS} | | 61 | PROGDEPENDS?= ${SRTOBJ} ${OBJS} ${LIBS} |
51 | PROGLINKOBJS?= ${PROGDEPENDS} | | 62 | PROGLINKOBJS?= ${PROGDEPENDS} |
52 | | | 63 | |
53 | ${PROG}: machine powerpc ${PROGDEPENDS} | | 64 | ${PROG}: machine powerpc ${PROGDEPENDS} |
54 | ${LD} -N -Ttext ${RELOC} -o $@ ${PROGLINKOBJS} | | 65 | ${LD} -N -Ttext ${RELOC} -o $@ ${PROGLINKOBJS} |