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 .if ${HOST_OSTYPE:C/\-.*//} == "Minix"
15 LDADD+= -lcompat_minix
18 # Resolve pathnames in variables.
19 _RESOLVE_VARS= CFLAGS CPPFLAGS DPADD HOST_CPPFLAGS LDADD
20 .for var in ${_RESOLVE_VARS}
24 # Switch over to the "real" Makefile.
25 .PROGDIR:= ${.CURDIR}/../../${HOST_SRCDIR}
31 .include "${.CURDIR}/Makefile"
32 .-include "${.CURDIR}/../Makefile.inc"
34 # Resolve pathnames from "real" Makefile, and switch .CURDIR back.
35 .for var in ${_RESOLVE_VARS}
41 # Set up the environment for <bsd.hostprog.mk>.
42 .if ${USETOOLS} != "yes"
46 HOSTPROGNAME?= ${HOSTPROG}
47 HOST_BINDIR?= ${TOOLDIR}/bin
48 HOST_CPPFLAGS:= ${HOST_CPPFLAGS} ${CPPFLAGS}
49 HOST_CPPFLAGS:= ${HOST_CPPFLAGS:N-Wp,-iremap,*:N--sysroot=*}
58 realinstall: install.host install.files
59 install.host: ${HOST_BINDIR}/${HOSTPROGNAME}
60 ${HOST_BINDIR}/${HOSTPROGNAME}:: ${HOSTPROG}
62 mkdir -p ${HOST_BINDIR}
63 ${HOST_INSTALL_FILE} -m ${BINMODE} ${HOSTPROG}${HOSTEXEEXT} ${.TARGET}
65 .if ${MKUPDATE} == "no"
66 .PHONY: ${HOST_BINDIR}/${HOSTPROGNAME}
70 .for F in ${HOSTFILES}
71 install.files: ${HOST_FILESDIR}/${F}
72 ${HOST_FILESDIR}/${F}: ${F}
74 mkdir -p ${HOST_FILESDIR}
75 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
77 .if ${MKUPDATE} == "no"
78 .PHONY: ${HOST_FILESDIR}/${F}
82 .include <bsd.hostprog.mk>