Makefile.inc0 revision 68788
1242667Sdteske# 2242667Sdteske# $FreeBSD: head/gnu/usr.bin/binutils/Makefile.inc0 68788 2000-11-15 22:05:00Z obrien $ 3242667Sdteske# 4242667Sdteske 5242667Sdteske# 6242667Sdteske# This is included explicitly at the top of each sub-Makefile. We can't 7242667Sdteske# use the normal "Makefile.inc" mechanism, because we need some of these 8242667Sdteske# definitions before the sub-Makefile is processed. 9242667Sdteske# 10242667Sdteske 11242667SdteskeVERSION= 2.10.1 12242667SdteskeTARGET_ARCH?= ${MACHINE_ARCH} 13242667Sdteske 14242667Sdteske.if ${TARGET_ARCH} == "mipsel" || ${TARGET_ARCH} == "mipseb" 15242667SdteskeBINUTIL_ARCH=mips 16242667Sdteske.else 17242667SdteskeBINUTIL_ARCH=${TARGET_ARCH} 18242667Sdteske.endif 19242667Sdteske 20242667Sdteske# RELTOP is the relative path to this point in the source or object 21242667Sdteske# tree, from any subdirectory of same. It gets extra "../" prefixes 22242667Sdteske# added to it as we descend into subdirectories. 23242667SdteskeRELTOP:= .. 24242667Sdteske 25242667SdteskeRELSRC= ${RELTOP}/../../../contrib/binutils 26242667SdteskeSRCDIR= ${.CURDIR}/${RELSRC} 27242667Sdteske 28242667SdteskeCFLAGS+= -D_GNU_SOURCE 29242667Sdteske 30242667Sdteske# We use "-I-" because without it our yacc-generated parser tries to 31242667Sdteske# use GNU's bison-generated header files. 32242667SdteskeCFLAGS+= -I- -I. 33242667Sdteske.if exists(${.CURDIR}/${BINUTIL_ARCH}) 34242667SdteskeCFLAGS+= -I${.CURDIR}/${BINUTIL_ARCH} 35242667Sdteske.endif 36242667SdteskeCFLAGS+= -I${.CURDIR} 37242667SdteskeCFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd/${BINUTIL_ARCH} 38242667SdteskeCFLAGS+= -I${SRCDIR}/include 39242667Sdteske 40242667Sdteske.if exists(${.CURDIR}/${BINUTIL_ARCH}) 41242667Sdteske.PATH: ${.CURDIR}/${BINUTIL_ARCH} 42242667Sdteske.endif 43242667Sdteske 44242667SdteskeARCHS= ${BINUTIL_ARCH} 45242667Sdteske 46242667Sdteske.for _arch in ${CROSS_ARCH} 47242667Sdteske.if (${ARCHS:R:M${_arch:R}} == "") 48242667SdteskeARCHS+=$(_arch) 49242667Sdteske.endif 50242667Sdteske.endfor 51242667Sdteske 52242667Sdteske.for _arch in ${ARCHS} 53242667Sdteske.if exists(${.CURDIR}/Makefile.${_arch}) 54242667Sdteske.include "${.CURDIR}/Makefile.${_arch}" 55242667Sdteske.endif 56242667Sdteske.endfor 57242667Sdteske