head	1.3;
access;
symbols
	jdp_2_8_1:1.1.1.1
	JDP:1.1.1;
locks; strict;
comment	@# @;


1.3
date	98.03.12.02.55.16;	author jdp;	state dead;
branches;
next	1.2;

1.2
date	98.03.08.08.08.39;	author peter;	state Exp;
branches;
next	1.1;

1.1
date	98.03.01.23.41.02;	author jdp;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	98.03.01.23.41.02;	author jdp;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Restructure the binutils hierarchy somewhat in order to better
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.
@
text
@#
# $Id: Makefile,v 1.2 1998/03/08 08:08:39 peter Exp $
#

.include "../Makefile.inc0"

.PATH: ${SRCDIR}/ld

EMULATION=	elf_i386
LDSCRIPTS=	elf_i386.x elf_i386.xbn elf_i386.xn elf_i386.xr \
		elf_i386.xs elf_i386.xu i386freebsd.x i386freebsd.xbn \
		i386freebsd.xn i386freebsd.xr i386freebsd.xu

PROG=		ld
BINDIR=		/usr/libexec/elf
SCRIPTDIR=	/usr/libdata/ldscripts
SRCS=		ldgram.c eelf_i386.c ei386freebsd.c ldcref.c \
		ldctor.c  ldemul.c ldexp.c ldfile.c ldlang.c \
		ldlex.l ldmain.c ldmisc.c ldver.c ldwrite.c \
		lexsup.c mri.c
CFLAGS+=	-DDEFAULT_EMULATION=\"${EMULATION}\"
CFLAGS+=	-DSCRIPTDIR=\"${DESTDIR}/usr/libdata\"
CFLAGS+=	-DTARGET=\"${TARGET}\"
CFLAGS+=	-I${SRCDIR}/ld
LDADD+=		-L${RELTOP}/libbfd -lbfd
LDADD+=		-L${RELTOP}/libiberty -liberty
CLEANFILES+=	eelf_i386.c ei386freebsd.c ldgram.c ldgram.h ldlex.c
CLEANDIRS+=	ldscripts

beforedepend: eelf_i386.c ei386freebsd.c ldgram.c ldgram.h ldlex.c

eelf_i386.c:	emulparams/elf_i386.sh emultempl/elf32.em \
		scripttempl/elf.sc genscripts.sh emultempl/stringify.sed
	env LIB_PATH="/usr/lib" \
	    sh ${SRCDIR}/ld/genscripts.sh ${SRCDIR}/ld ${DESTDIR}/usr/lib \
	    ${HOST} ${TARGET} ${TARGET} ${EMULATION} "" \
	    ${EMULATION} ${TARGET}

ei386freebsd.c:	emulparams/elf_i386.sh emultempl/elf32.em \
		scripttempl/elf.sc genscripts.sh emultempl/stringify.sed
	env LIB_PATH="/usr/lib" \
	    sh ${SRCDIR}/ld/genscripts.sh ${SRCDIR}/ld ${DESTDIR}/usr/lib \
	    ${HOST} ${TARGET} ${TARGET} ${EMULATION} "" \
	    i386freebsd i386-unknown-freebsd

ldgram.c ldgram.h: ldgram.y
	${YACC} ${YFLAGS} -o ${.TARGET:S/.h$/.c/} ${.ALLSRC}

afterinstall:
	${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
	    ${LDSCRIPTS:S|^|ldscripts/|} ${DESTDIR}${SCRIPTDIR}

.include <bsd.prog.mk>
@


1.2
log
@Set LIB_PATH explicitly otherwise genscripts makes (incorrect) references
all over the place.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.1.1.1 1998/03/01 23:41:02 jdp Exp $
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
# $Id$
d34 2
a35 1
	sh ${SRCDIR}/ld/genscripts.sh ${SRCDIR}/ld ${DESTDIR}/usr/lib \
d41 2
a42 1
	sh ${SRCDIR}/ld/genscripts.sh ${SRCDIR}/ld ${DESTDIR}/usr/lib \
@


1.1.1.1
log
@Add bmakefiles for building binutils from the contrib tree.

This finishes up the binutils import.  But I am leaving it disabled
in "src/gnu/usr.bin/Makefile" for now.  It is not used by anything
yet, so I'll take this opportunity to run one more round of tests
before enabling it.
@
text
@@
