]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - gnu/usr.bin/cc/Makefile.inc
Make little endian compiles produce little endian binaries on mips.
[FreeBSD/FreeBSD.git] / gnu / usr.bin / cc / Makefile.inc
1 # $FreeBSD$
2
3 .include "../Makefile.inc"
4
5 # Sometimes this is .include'd several times...
6 .if !defined(__CC_MAKEFILE_INC__)
7 __CC_MAKEFILE_INC__= ${MFILE}
8
9 GCCDIR= ${.CURDIR}/../../../../contrib/gcc
10 GCCLIB= ${.CURDIR}/../../../../contrib/gcclibs
11
12 .include "Makefile.tgt"
13
14 # Machine description.
15 MD_FILE=        ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md
16 GCC_TARGET=     ${TARGET_ARCH}-undermydesk-freebsd
17
18 CFLAGS+=        -DIN_GCC -DHAVE_CONFIG_H
19 CFLAGS+=        -DPREFIX=\"${TOOLS_PREFIX}/usr\"
20 #CFLAGS+=       -DWANT_COMPILER_INVARIANTS
21 CSTD?=  gnu89
22
23 # If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined
24 # to get the proper sizes in limits.h
25 .if defined(LONG_TYPE_SIZE)
26 CFLAGS+=        -DLONG_TYPE_SIZE=${LONG_TYPE_SIZE}
27 .endif
28
29 .if ${TARGET_ARCH} != ${MACHINE_ARCH}
30 CFLAGS+=        -DCROSS_COMPILE
31 .endif
32
33 .if ${TARGET_ARCH} == "mips" && !defined(TARGET_BIG_ENDIAN)
34 CFLAGS += -DTARGET_ENDIAN_DEFAULT=0
35 .endif
36
37 .if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE)
38 CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE}
39 .endif
40
41 .if exists(${.OBJDIR}/../cc_tools)
42 CFLAGS+=        -I${.OBJDIR}/../cc_tools
43 .endif
44 CFLAGS+=        -I${.CURDIR}/../cc_tools
45 # This must go after the -I for cc_tools to resolve ambiguities for hash.h
46 # correctly.
47 CFLAGS+=        -I${GCCDIR} -I${GCCDIR}/config
48
49 CFLAGS+=        -I${GCCLIB}/include
50 CFLAGS+=        -I${GCCLIB}/libcpp/include
51 CFLAGS+=        -I${GCCLIB}/libdecnumber
52
53 .if exists(${.OBJDIR}/../cc_int)
54 LIBBACKEND=     ${.OBJDIR}/../cc_int/libbackend.a
55 .else
56 LIBBACKEND=     ${.CURDIR}/../cc_int/libbackend.a
57 .endif
58
59 .if exists(${.OBJDIR}/../libiberty)
60 LIBIBERTY=      ${.OBJDIR}/../libiberty/libiberty.a
61 .else
62 LIBIBERTY=      ${.CURDIR}/../libiberty/libiberty.a
63 .endif
64
65 .if exists(${.OBJDIR}/../libcpp)
66 LIBCPP=         ${.OBJDIR}/../libcpp/libcpp.a
67 .else
68 LIBCPP=         ${.CURDIR}/../libcpp/libcpp.a
69 .endif
70
71 .if exists(${.OBJDIR}/../libdecnumber)
72 LIBDECNUMBER=   ${.OBJDIR}/../libdecnumber/libdecnumber.a
73 .else
74 LIBDECNUMBER=   ${.CURDIR}/../libdecnumber/libdecnumber.a
75 .endif
76
77 .endif # !__CC_MAKEFILE_INC__