0ba671bfd1
support building it for variant architectures. It was already becoming clear that the former structure was too rigid and didn't scale well. The usual sort of makefile magic arranges to .include an architecture specific makefile "Makefile.${MACHINE_ARCH}" in each directory where it exists. Also, sources will be found in each subdirectory "${MACHINE_ARCH}" that exists. This is all taken care of automatically by the top level "Makefile.inc0". This all seems to work right for the i386 now. I have also converted those alpha pieces already present to the new schema as best I could. Also: change the BINDIR on the i386 to /usr/libexec/elf for "ar" and "ranlib". They are not object format independent enough to put into /usr/bin.
40 lines
1.0 KiB
Makefile
40 lines
1.0 KiB
Makefile
#
|
|
# $Id: Makefile.inc0,v 1.1.1.1 1998/03/01 23:40:48 jdp Exp $
|
|
#
|
|
|
|
#
|
|
# This is included explicitly at the top of each sub-Makefile. We can't
|
|
# use the normal "Makefile.inc" mechanism, because we need some of these
|
|
# definitions before the sub-Makefile is processed.
|
|
#
|
|
|
|
VERSION= 2.8.1
|
|
|
|
# RELTOP is the relative path to this point in the source or object
|
|
# tree, from any subdirectory of same. It gets extra "../" prefixes
|
|
# added to it as we descend into subdirectories.
|
|
RELTOP:= ..
|
|
|
|
RELSRC= ${RELTOP}/../../../contrib/binutils
|
|
SRCDIR= ${.CURDIR}/${RELSRC}
|
|
|
|
CFLAGS+= -D_GNU_SOURCE
|
|
|
|
# We use "-I-" because without it our yacc-generated parser tries to
|
|
# use GNU's bison-generated header files.
|
|
CFLAGS+= -I- -I.
|
|
.if exists(${.CURDIR}/${MACHINE_ARCH})
|
|
CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH}
|
|
.endif
|
|
CFLAGS+= -I${.CURDIR}
|
|
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd
|
|
CFLAGS+= -I${SRCDIR}/include
|
|
|
|
.if exists(${.CURDIR}/${MACHINE_ARCH})
|
|
.PATH: ${.CURDIR}/${MACHINE_ARCH}
|
|
.endif
|
|
|
|
.if exists(${.CURDIR}/Makefile.${MACHINE_ARCH})
|
|
.include "${.CURDIR}/Makefile.${MACHINE_ARCH}"
|
|
.endif
|