1 # $NetBSD: Makefile.host,v 1.28 2011/04/10 16:52:36 joerg Exp $
10 COMPATOBJ!= cd ${.CURDIR}/../compat && ${PRINTOBJDIR}
11 .-include "${COMPATOBJ}/defs.mk"
14 # Resolve pathnames in variables.
15 _RESOLVE_VARS= CFLAGS CPPFLAGS DPADD HOST_CPPFLAGS LDADD
16 .for var in ${_RESOLVE_VARS}
20 # Switch over to the "real" Makefile.
21 .PROGDIR:= ${.CURDIR}/../../${HOST_SRCDIR}
27 .include "${.CURDIR}/Makefile"
28 .-include "${.CURDIR}/../Makefile.inc"
30 # Resolve pathnames from "real" Makefile, and switch .CURDIR back.
31 .for var in ${_RESOLVE_VARS}
37 # Set up the environment for <bsd.hostprog.mk>.
38 .if ${USETOOLS} != "yes"
42 HOSTPROGNAME?= ${HOSTPROG}
43 HOST_BINDIR?= ${TOOLDIR}/bin
44 HOST_CPPFLAGS:= ${HOST_CPPFLAGS} ${CPPFLAGS}
45 HOST_CPPFLAGS:= ${HOST_CPPFLAGS:N-Wp,-iremap,*:N--sysroot=*}
54 realinstall: install.host install.files
55 install.host: ${HOST_BINDIR}/${HOSTPROGNAME}
56 ${HOST_BINDIR}/${HOSTPROGNAME}:: ${HOSTPROG}
58 mkdir -p ${HOST_BINDIR}
59 ${HOST_INSTALL_FILE} -m ${BINMODE} ${HOSTPROG}${HOSTEXEEXT} ${.TARGET}
61 .if ${MKUPDATE} == "no"
62 .PHONY: ${HOST_BINDIR}/${HOSTPROGNAME}
66 .for F in ${HOSTFILES}
67 install.files: ${HOST_FILESDIR}/${F}
68 ${HOST_FILESDIR}/${F}: ${F}
70 mkdir -p ${HOST_FILESDIR}
71 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
73 .if ${MKUPDATE} == "no"
74 .PHONY: ${HOST_FILESDIR}/${F}
78 .include <bsd.hostprog.mk>