minix/tools/Makefile.host
Lionel Sambuc 84d9c625bf Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
2014-07-28 17:05:06 +02:00

88 lines
2 KiB
Text

# $NetBSD: Makefile.host,v 1.31 2013/06/14 16:10:02 tsutsui Exp $
NOINFO= # defined
NOLINT= # defined
NOMAN= # defined
.include <bsd.own.mk>
.ifndef NOCOMPATLIB
# Use TOOLDIR copy of libnbcompat and associated *.h files
.-include "${TOOLDIR}/share/compat/defs.mk"
.elif !empty(.MAKE.OS:M*CYGWIN*)
HOSTEXEEXT=.exe
.endif
.if ${HOST_OSTYPE:C/\-.*//} == "Minix"
LDADD+= -lcompat_minix
.endif # ${HOST_OSTYPE:C/\-.*//} == "Minix"
# Resolve pathnames in variables.
_RESOLVE_VARS= CFLAGS CPPFLAGS DPADD HOST_CPPFLAGS LDADD
.for var in ${_RESOLVE_VARS}
${var}:= ${${var}}
.endfor
# Switch over to the "real" Makefile.
.PROGDIR:= ${.CURDIR}/../../${HOST_SRCDIR}
_CURDIR:= ${.CURDIR}
HOSTPROG?= ${PROG}
.CURDIR:= ${.PROGDIR}
.PATH: ${.CURDIR}
.include "${.CURDIR}/Makefile"
.-include "${.CURDIR}/../Makefile.inc"
# Resolve pathnames from "real" Makefile, and switch .CURDIR back.
.for var in ${_RESOLVE_VARS}
${var}:= ${${var}}
.endfor
.CURDIR:= ${_CURDIR}
.undef _CURDIR
# Set up the environment for <bsd.hostprog.mk>.
.if ${USETOOLS} != "yes"
.undef HOSTPROG
.endif
HOSTPROGNAME?= ${HOSTPROG}
HOST_BINDIR?= ${TOOLDIR}/bin
HOST_CPPFLAGS:= ${HOST_CPPFLAGS} ${CPPFLAGS}
HOST_CPPFLAGS:= ${HOST_CPPFLAGS:N-Wp,-iremap,*:N--sysroot=*}
HOST_INSTALLPROG?=${HOST_BINDIR}/${HOSTPROGNAME}${HOSTEXEEXT}
.undef LINKS
SRCS?= ${HOSTPROG}.c
SRCS+= ${HOST_SRCS}
.PATH: ${.PROGDIR}
# Install rule.
realinstall: install.host install.files
install.host: ${HOST_INSTALLPROG}
${HOST_INSTALLPROG}:: ${HOSTPROG}
${_MKTARGET_INSTALL}
mkdir -p ${HOST_BINDIR}
${HOST_INSTALL_FILE} -m ${BINMODE} ${HOSTPROG}${HOSTEXEEXT} ${.TARGET}
.if !empty(.MAKE.OS:M*CYGWIN*)
${HOST_SH} ${NETBSDSRCDIR}/tools/binstall/mkmanifest ${.TARGET}
.endif
.if ${MKUPDATE} == "no"
.PHONY: ${HOST_INSTALLPROG}
.endif
install.files:
.for F in ${HOSTFILES}
install.files: ${HOST_FILESDIR}/${F}
${HOST_FILESDIR}/${F}: ${F}
${_MKTARGET_INSTALL}
mkdir -p ${HOST_FILESDIR}
${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}
.if ${MKUPDATE} == "no"
.PHONY: ${HOST_FILESDIR}/${F}
.endif
.endfor
.include <bsd.hostprog.mk>