From df13e7f694c50948c489abf4b3e2afe2d9be5ad7 Mon Sep 17 00:00:00 2001 From: John Birrell Date: Sun, 11 Jan 1998 04:10:26 +0000 Subject: [PATCH] Replace i386 references with ${MACHINE} to make this makefile almost machine independent, with the only dependency being the binary format to build. We only expect to build ELF on alpha although we'll need ECOFF compatibility with Digital Unix. --- gnu/usr.bin/cc/Makefile.inc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index 1b4fd4e4d757..3707b2d5cd23 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -1,5 +1,5 @@ # -# $Id: Makefile.inc,v 1.19 1997/02/22 15:44:48 peter Exp $ +# $Id: Makefile.inc,v 1.20 1997/03/28 04:45:30 jdp Exp $ # # Sometimes this is .include'd several times... @@ -10,22 +10,26 @@ GCCDIR= ${.CURDIR}/../../../../contrib/gcc BISON?= bison # Machine description. -MD_FILE= ${GCCDIR}/config/i386/i386.md -OUT_FILE= i386.c -OUT_OBJ= i386 -.PATH: ${GCCDIR}/config/i386 +MD_FILE= ${GCCDIR}/config/${MACHINE}/${MACHINE}.md +OUT_FILE= ${MACHINE}.c +OUT_OBJ= ${MACHINE} +.PATH: ${GCCDIR}/config/${MACHINE} +.if ${MACHINE} == "alpha" +BINFORMAT= elf +.else # Pick aout for now. the elf config is not binary compatable. BINFORMAT?= aout #BINFORMAT?= elf +.endif .if ${BINFORMAT} == aout CFLAGS+= -DFREEBSD_AOUT -target= i386-unknown-freebsd +target= ${MACHINE}-unknown-freebsd .endif .if ${BINFORMAT} == elf CFLAGS+= -DFREEBSD_ELF -target= i386-unknown-freebsdelf +target= ${MACHINE}-unknown-freebsdelf .endif version!= sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${GCCDIR}/version.c