summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/cc/Makefile.inc
blob: 17a0569c16b8c6b2b170a69a84e716e9ed82d0c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#
# $FreeBSD$
#

# 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.
MD_FILE=	${GCCDIR}/config/i386/i386.md
OUT_FILE=	i386.c
OUT_OBJ=	i386
.PATH:		${GCCDIR}/config/i386

# Pick aout for now. the elf config is not binary compatable.
BINFORMAT=	aout
#BINFORMAT=	elf

.if ${BINFORMAT} == aout
CFLAGS+=	-DFREEBSD_AOUT
target=		i386-unknown-freebsd
.endif
.if ${BINFORMAT} == elf
CFLAGS+=	-DFREEBSD_ELF
target=		i386-unknown-freebsdelf
.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

.if exists(${.OBJDIR}/../cc_int)
LIBDESTDIR=	${.OBJDIR}/../cc_int
.else
LIBDESTDIR=	${.CURDIR}/../cc_int
.endif

LIBCC_INT=	${LIBDESTDIR}/libcc_int.a

.endif
OpenPOWER on IntegriCloud