1 # $NetBSD: Makefile.host,v 1.31 2013/06/14 16:10:02 tsutsui Exp $
10 # Use TOOLDIR copy of libnbcompat and associated *.h files
11 .-include "${TOOLDIR}/share/compat/defs.mk"
12 .elif !empty(.MAKE.OS:M*CYGWIN*)
16 # Resolve pathnames in variables.
17 _RESOLVE_VARS= CFLAGS CPPFLAGS DPADD HOST_CPPFLAGS LDADD
18 .for var in ${_RESOLVE_VARS}
22 # Switch over to the "real" Makefile.
23 .PROGDIR:= ${.CURDIR}/../../${HOST_SRCDIR}
29 .include "${.CURDIR}/Makefile"
30 .-include "${.CURDIR}/../Makefile.inc"
32 # Resolve pathnames from "real" Makefile, and switch .CURDIR back.
33 .for var in ${_RESOLVE_VARS}
39 # Set up the environment for <bsd.hostprog.mk>.
40 .if ${USETOOLS} != "yes"
44 HOSTPROGNAME?= ${HOSTPROG}
45 HOST_BINDIR?= ${TOOLDIR}/bin
46 HOST_CPPFLAGS:= ${HOST_CPPFLAGS} ${CPPFLAGS}
47 HOST_CPPFLAGS:= ${HOST_CPPFLAGS:N-Wp,-iremap,*:N--sysroot=*}
48 HOST_INSTALLPROG?=${HOST_BINDIR}/${HOSTPROGNAME}${HOSTEXEEXT}
57 realinstall: install.host install.files
58 install.host: ${HOST_INSTALLPROG}
59 ${HOST_INSTALLPROG}:: ${HOSTPROG}
61 mkdir -p ${HOST_BINDIR}
62 ${HOST_INSTALL_FILE} -m ${BINMODE} ${HOSTPROG}${HOSTEXEEXT} ${.TARGET}
63 .if !empty(.MAKE.OS:M*CYGWIN*)
64 ${HOST_SH} ${NETBSDSRCDIR}/tools/binstall/mkmanifest ${.TARGET}
67 .if ${MKUPDATE} == "no"
68 .PHONY: ${HOST_INSTALLPROG}
72 .for F in ${HOSTFILES}
73 install.files: ${HOST_FILESDIR}/${F}
74 ${HOST_FILESDIR}/${F}: ${F}
76 mkdir -p ${HOST_FILESDIR}
77 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
79 .if ${MKUPDATE} == "no"
80 .PHONY: ${HOST_FILESDIR}/${F}
84 .include <bsd.hostprog.mk>