| @@ -1,77 +1,77 @@ | | | @@ -1,77 +1,77 @@ |
1 | # $NetBSD: Makefile.host,v 1.24 2008/10/19 19:38:55 apb Exp $ | | 1 | # $NetBSD: Makefile.host,v 1.25 2009/12/01 09:08:25 uebayasi Exp $ |
2 | | | 2 | |
3 | NOINFO= # defined | | 3 | NOINFO= # defined |
4 | NOLINT= # defined | | 4 | NOLINT= # defined |
5 | NOMAN= # defined | | 5 | NOMAN= # defined |
6 | | | 6 | |
7 | .include <bsd.own.mk> | | 7 | .include <bsd.own.mk> |
8 | | | 8 | |
9 | .ifndef NOCOMPATLIB | | 9 | .ifndef NOCOMPATLIB |
10 | COMPATOBJ!= cd ${.CURDIR}/../compat && ${PRINTOBJDIR} | | 10 | COMPATOBJ!= cd ${NETBSDSRCDIR}/compat && ${PRINTOBJDIR} |
11 | .-include "${COMPATOBJ}/defs.mk" | | 11 | .-include "${COMPATOBJ}/defs.mk" |
12 | .endif | | 12 | .endif |
13 | | | 13 | |
14 | # Resolve pathnames in variables. | | 14 | # Resolve pathnames in variables. |
15 | _RESOLVE_VARS= CFLAGS CPPFLAGS DPADD HOST_CPPFLAGS LDADD | | 15 | _RESOLVE_VARS= CFLAGS CPPFLAGS DPADD HOST_CPPFLAGS LDADD |
16 | .for var in ${_RESOLVE_VARS} | | 16 | .for var in ${_RESOLVE_VARS} |
17 | ${var}:= ${${var}} | | 17 | ${var}:= ${${var}} |
18 | .endfor | | 18 | .endfor |
19 | | | 19 | |
20 | # Switch over to the "real" Makefile. | | 20 | # Switch over to the "real" Makefile. |
21 | .PROGDIR:= ${.CURDIR}/../../${HOST_SRCDIR} | | 21 | .PROGDIR:= ${NETBSDSRCDIR}/${HOST_SRCDIR} |
22 | _CURDIR:= ${.CURDIR} | | 22 | _CURDIR:= ${.CURDIR} |
23 | HOSTPROG?= ${PROG} | | 23 | HOSTPROG?= ${PROG} |
24 | | | 24 | |
25 | .CURDIR:= ${.PROGDIR} | | 25 | .CURDIR:= ${.PROGDIR} |
26 | .PATH: ${.CURDIR} | | 26 | .PATH: ${.CURDIR} |
27 | .include "${.CURDIR}/Makefile" | | 27 | .include "${.CURDIR}/Makefile" |
28 | .-include "${.CURDIR}/../Makefile.inc" | | 28 | .-include "${.CURDIR}/../Makefile.inc" |
29 | | | 29 | |
30 | # Resolve pathnames from "real" Makefile, and switch .CURDIR back. | | 30 | # Resolve pathnames from "real" Makefile, and switch .CURDIR back. |
31 | .for var in ${_RESOLVE_VARS} | | 31 | .for var in ${_RESOLVE_VARS} |
32 | ${var}:= ${${var}} | | 32 | ${var}:= ${${var}} |
33 | .endfor | | 33 | .endfor |
34 | .CURDIR:= ${_CURDIR} | | 34 | .CURDIR:= ${_CURDIR} |
35 | .undef _CURDIR | | 35 | .undef _CURDIR |
36 | | | 36 | |
37 | # Set up the environment for <bsd.hostprog.mk>. | | 37 | # Set up the environment for <bsd.hostprog.mk>. |
38 | .if ${USETOOLS} != "yes" | | 38 | .if ${USETOOLS} != "yes" |
39 | .undef HOSTPROG | | 39 | .undef HOSTPROG |
40 | .endif | | 40 | .endif |
41 | | | 41 | |
42 | HOSTPROGNAME?= ${HOSTPROG} | | 42 | HOSTPROGNAME?= ${HOSTPROG} |
43 | HOST_BINDIR?= ${TOOLDIR}/bin | | 43 | HOST_BINDIR?= ${TOOLDIR}/bin |
44 | HOST_CPPFLAGS:= ${HOST_CPPFLAGS} ${CPPFLAGS} | | 44 | HOST_CPPFLAGS:= ${HOST_CPPFLAGS} ${CPPFLAGS} |
45 | .undef LINKS | | 45 | .undef LINKS |
46 | | | 46 | |
47 | SRCS?= ${HOSTPROG}.c | | 47 | SRCS?= ${HOSTPROG}.c |
48 | SRCS+= ${HOST_SRCS} | | 48 | SRCS+= ${HOST_SRCS} |
49 | | | 49 | |
50 | .PATH: ${.PROGDIR} | | 50 | .PATH: ${.PROGDIR} |
51 | | | 51 | |
52 | # Install rule. | | 52 | # Install rule. |
53 | realinstall: install.host install.files | | 53 | realinstall: install.host install.files |
54 | install.host: ${HOST_BINDIR}/${HOSTPROGNAME} | | 54 | install.host: ${HOST_BINDIR}/${HOSTPROGNAME} |
55 | ${HOST_BINDIR}/${HOSTPROGNAME}:: ${HOSTPROG} | | 55 | ${HOST_BINDIR}/${HOSTPROGNAME}:: ${HOSTPROG} |
56 | ${_MKTARGET_INSTALL} | | 56 | ${_MKTARGET_INSTALL} |
57 | mkdir -p ${HOST_BINDIR} | | 57 | mkdir -p ${HOST_BINDIR} |
58 | ${HOST_INSTALL_FILE} -m ${BINMODE} ${HOSTPROG}${HOSTEXEEXT} ${.TARGET} | | 58 | ${HOST_INSTALL_FILE} -m ${BINMODE} ${HOSTPROG}${HOSTEXEEXT} ${.TARGET} |
59 | | | 59 | |
60 | .if ${MKUPDATE} == "no" | | 60 | .if ${MKUPDATE} == "no" |
61 | .PHONY: ${HOST_BINDIR}/${HOSTPROGNAME} | | 61 | .PHONY: ${HOST_BINDIR}/${HOSTPROGNAME} |
62 | .endif | | 62 | .endif |
63 | | | 63 | |
64 | install.files: | | 64 | install.files: |
65 | .for F in ${HOSTFILES} | | 65 | .for F in ${HOSTFILES} |
66 | install.files: ${HOST_FILESDIR}/${F} | | 66 | install.files: ${HOST_FILESDIR}/${F} |
67 | ${HOST_FILESDIR}/${F}: ${F} | | 67 | ${HOST_FILESDIR}/${F}: ${F} |
68 | ${_MKTARGET_INSTALL} | | 68 | ${_MKTARGET_INSTALL} |
69 | mkdir -p ${HOST_FILESDIR} | | 69 | mkdir -p ${HOST_FILESDIR} |
70 | ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET} | | 70 | ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET} |
71 | | | 71 | |
72 | .if ${MKUPDATE} == "no" | | 72 | .if ${MKUPDATE} == "no" |
73 | .PHONY: ${HOST_FILESDIR}/${F} | | 73 | .PHONY: ${HOST_FILESDIR}/${F} |
74 | .endif | | 74 | .endif |
75 | .endfor | | 75 | .endfor |
76 | | | 76 | |
77 | .include <bsd.hostprog.mk> | | 77 | .include <bsd.hostprog.mk> |