1994-08-02 20:15:59 +00:00
|
|
|
#
|
1998-01-25 09:49:00 +00:00
|
|
|
# $Id: Makefile.inc,v 1.21 1998/01/11 04:10:26 jb Exp $
|
1994-08-02 20:15:59 +00:00
|
|
|
#
|
|
|
|
|
1996-09-19 15:53:53 +00:00
|
|
|
# Sometimes this is .include'd several times...
|
|
|
|
.if !defined(GCCDIR)
|
|
|
|
GCCDIR= ${.CURDIR}/../../../../contrib/gcc
|
|
|
|
.PATH: ../cc_tools ${GCCDIR} ${GCCDIR}/cp ${GCCDIR}/objc
|
|
|
|
|
|
|
|
BISON?= bison
|
|
|
|
|
|
|
|
# Machine description.
|
1998-01-25 09:49:00 +00:00
|
|
|
MD_FILE= ${GCCDIR}/config/${MACHINE_ARCH}/${MACHINE_ARCH}.md
|
|
|
|
OUT_FILE= ${MACHINE_ARCH}.c
|
|
|
|
OUT_OBJ= ${MACHINE_ARCH}
|
|
|
|
.PATH: ${GCCDIR}/config/${MACHINE_ARCH}
|
1996-09-19 15:53:53 +00:00
|
|
|
|
1998-01-11 04:10:26 +00:00
|
|
|
.if ${MACHINE} == "alpha"
|
|
|
|
BINFORMAT= elf
|
|
|
|
.else
|
1996-09-19 15:53:53 +00:00
|
|
|
# Pick aout for now. the elf config is not binary compatable.
|
1997-03-28 04:45:30 +00:00
|
|
|
BINFORMAT?= aout
|
|
|
|
#BINFORMAT?= elf
|
1998-01-11 04:10:26 +00:00
|
|
|
.endif
|
1996-09-19 15:53:53 +00:00
|
|
|
|
|
|
|
.if ${BINFORMAT} == aout
|
|
|
|
CFLAGS+= -DFREEBSD_AOUT
|
1998-01-25 09:49:00 +00:00
|
|
|
target= ${MACHINE_ARCH}-unknown-freebsd
|
1996-09-19 15:53:53 +00:00
|
|
|
.endif
|
|
|
|
.if ${BINFORMAT} == elf
|
|
|
|
CFLAGS+= -DFREEBSD_ELF
|
1998-01-25 09:49:00 +00:00
|
|
|
target= ${MACHINE_ARCH}-unknown-freebsdelf
|
1996-09-19 15:53:53 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
version!= sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${GCCDIR}/version.c
|
|
|
|
|
|
|
|
CFLAGS+= -I${GCCDIR} -I${GCCDIR}/config
|
|
|
|
CFLAGS+= -DFREEBSD_NATIVE
|
|
|
|
CFLAGS+= -DDEFAULT_TARGET_VERSION=\"$(version)\"
|
|
|
|
CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"$(target)\"
|
|
|
|
|
|
|
|
.if exists(${.OBJDIR}/../cc_tools)
|
|
|
|
CFLAGS+= -I${.OBJDIR}/../cc_tools
|
|
|
|
.else
|
|
|
|
CFLAGS+= -I${.CURDIR}/../cc_tools
|
|
|
|
.endif
|
1994-08-28 18:49:06 +00:00
|
|
|
|
1996-06-24 04:26:21 +00:00
|
|
|
.if exists(${.OBJDIR}/../cc_int)
|
|
|
|
LIBDESTDIR= ${.OBJDIR}/../cc_int
|
1994-08-28 18:49:06 +00:00
|
|
|
.else
|
|
|
|
LIBDESTDIR= ${.CURDIR}/../cc_int
|
|
|
|
.endif
|
|
|
|
|
1994-09-19 21:37:50 +00:00
|
|
|
LIBCC_INT= ${LIBDESTDIR}/libcc_int.a
|
1996-09-19 15:53:53 +00:00
|
|
|
|
|
|
|
.endif
|