Makefile.host revision 1.6
11.6Sthorpej# $NetBSD: Makefile.host,v 1.6 2001/10/25 02:02:46 thorpej Exp $ 21.1Stv 31.1Stv# Preload <bsd.obj.mk> to set up obj rules (with proper ${.CURDIR}). 41.1Stv.include <bsd.obj.mk> 51.1Stv 61.4Sthorpej# We might need the PRINTOBJDIR variable -- make sure it's defined. 71.4Sthorpej# XXX It really sucks to have to copy this from <bsd.own.mk>. 81.4SthorpejPRINTOBJDIR= printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -B -s -f- 91.4Sthorpej 101.1Stv# Save value of .CURDIR, and reassign it to the "real" source directory. 111.1Stv_CURDIR:= ${.CURDIR} 121.1Stv.CURDIR:= ${_CURDIR}/../../${HOST_SRCDIR} 131.1Stv 141.1Stv# Set HOSTPROG as a flag to the real program not to include <bsd.prog.mk>. 151.1StvHOSTPROG?= ${PROG} 161.1Stv 171.1Stv# Pull in the "real" Makefile. 181.1Stv.include "${.CURDIR}/Makefile" 191.3Sjmc.if exists(${.CURDIR}/../Makefile.inc) 201.3Sjmc.include "${.CURDIR}/../Makefile.inc" 211.3Sjmc.endif 221.1Stv 231.1Stv# Set up the environment for <bsd.hostprog.mk>. 241.1StvHOSTPROGNAME?= ${HOSTPROG} 251.1StvHOST_BINDIR?= ${TOOLDIR}/bin 261.1StvHOST_CPPFLAGS:= -include ${_CURDIR}/../compat/compat_netbsd.h -Wall \ 271.6Sthorpej ${HOST_CPPFLAGS} ${CPPFLAGS} 281.1StvMKMAN= no 291.1StvSRCS?= ${PROG}.c 301.1StvSRCS+= ${HOST_SRCS} nb_progname.c 311.1StvTIMESTAMP?= ${HOST_BINDIR}/${HOSTPROGNAME} 321.1Stv.undef LINKS 331.1Stv 341.1Stv.PATH: ${.CURDIR} ${_CURDIR}/../compat 351.1Stv${TIMESTAMP}: ${.CURDIR}/Makefile 361.1Stv 371.1Stv# Include the local definitions, and then <bsd.hostprog.mk>. 381.1Stv.include "${_CURDIR}/../Makefile.inc" 391.1Stv.include <bsd.hostprog.mk> 401.1Stv 411.1Stv# Install rule. 421.2Sjmcrealinstall: install.host install.files 431.1Stvinstall.host: 441.1Stv mkdir -p ${HOST_BINDIR} 451.1Stv ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -m ${BINMODE} \ 461.1Stv ${HOSTPROG} ${HOST_BINDIR}/${HOSTPROGNAME} 471.2Sjmc 481.2Sjmc.if defined(HOSTFILES) 491.2Sjmcinstall.files: 501.2Sjmc mkdir -p ${HOST_FILESDIR} 511.2Sjmc for i in ${HOSTFILES}; \ 521.2Sjmc do \ 531.2Sjmc ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -m ${NONBINMODE} \ 541.2Sjmc ${.CURDIR}/$$i ${HOST_FILESDIR}/$$i; \ 551.2Sjmc done 561.2Sjmc.else 571.2Sjmcinstall.files: 581.2Sjmc.endif 59