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 .if ${HOST_OSTYPE:C/\-.*//} == "Minix"
17 LDADD+= -lcompat_minix
18 .endif # ${HOST_OSTYPE:C/\-.*//} == "Minix"
20 # Resolve pathnames in variables.
21 _RESOLVE_VARS= CFLAGS CPPFLAGS DPADD HOST_CPPFLAGS LDADD
22 .for var in ${_RESOLVE_VARS}
26 # Switch over to the "real" Makefile.
27 .PROGDIR:= ${.CURDIR}/../../${HOST_SRCDIR}
33 .include "${.CURDIR}/Makefile"
34 .-include "${.CURDIR}/../Makefile.inc"
36 # Resolve pathnames from "real" Makefile, and switch .CURDIR back.
37 .for var in ${_RESOLVE_VARS}
43 # Set up the environment for <bsd.hostprog.mk>.
44 .if ${USETOOLS} != "yes"
48 HOSTPROGNAME?= ${HOSTPROG}
49 HOST_BINDIR?= ${TOOLDIR}/bin
50 HOST_CPPFLAGS:= ${HOST_CPPFLAGS} ${CPPFLAGS}
51 HOST_CPPFLAGS:= ${HOST_CPPFLAGS:N-Wp,-iremap,*:N--sysroot=*}
52 HOST_INSTALLPROG?=${HOST_BINDIR}/${HOSTPROGNAME}${HOSTEXEEXT}
61 realinstall: install.host install.files
62 install.host: ${HOST_INSTALLPROG}
63 ${HOST_INSTALLPROG}:: ${HOSTPROG}
65 mkdir -p ${HOST_BINDIR}
66 ${HOST_INSTALL_FILE} -m ${BINMODE} ${HOSTPROG}${HOSTEXEEXT} ${.TARGET}
67 .if !empty(.MAKE.OS:M*CYGWIN*)
68 ${HOST_SH} ${NETBSDSRCDIR}/tools/binstall/mkmanifest ${.TARGET}
71 .if ${MKUPDATE} == "no"
72 .PHONY: ${HOST_INSTALLPROG}
76 .for F in ${HOSTFILES}
77 install.files: ${HOST_FILESDIR}/${F}
78 ${HOST_FILESDIR}/${F}: ${F}
80 mkdir -p ${HOST_FILESDIR}
81 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
83 .if ${MKUPDATE} == "no"
84 .PHONY: ${HOST_FILESDIR}/${F}
88 .include <bsd.hostprog.mk>