1 |
# $MidnightBSD: src/gnu/usr.bin/binutils/Makefile.inc0,v 1.3 2009/11/26 15:18:02 laffer1 Exp $ |
2 |
# $FreeBSD: src/gnu/usr.bin/binutils/Makefile.inc0,v 1.38 2007/02/11 07:15:05 marcel Exp $ |
3 |
# |
4 |
# This is included explicitly at the top of each sub-Makefile. We can't |
5 |
# use the normal "Makefile.inc" mechanism, because we need some of these |
6 |
# definitions before the sub-Makefile is processed. |
7 |
|
8 |
VERSION= "2.15 [MidnightBSD] 2004-05-23" |
9 |
|
10 |
TARGET_ARCH?= ${MACHINE_CPUARCH} |
11 |
.if ${TARGET_ARCH} == "amd64" |
12 |
BINUTILS_ARCH=x86_64 |
13 |
.else |
14 |
BINUTILS_ARCH=${TARGET_ARCH} |
15 |
.endif |
16 |
TARGET_TUPLE?= ${BINUTILS_ARCH}-midnightbsd-freebsd |
17 |
|
18 |
# RELTOP is the relative path to this point in the source or object |
19 |
# tree, from any subdirectory of same. It gets extra "../" prefixes |
20 |
# added to it as we descend into subdirectories. |
21 |
RELTOP:= .. |
22 |
|
23 |
RELSRC= ${RELTOP}/../../../contrib/binutils |
24 |
SRCDIR= ${.CURDIR}/${RELSRC} |
25 |
|
26 |
.if ${TARGET_ARCH} == "i386" |
27 |
CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 |
28 |
.else |
29 |
CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 |
30 |
.endif |
31 |
|
32 |
CFLAGS+= -I. |
33 |
.if exists(${.CURDIR}/${TARGET_ARCH}) |
34 |
CFLAGS+= -I${.CURDIR}/${TARGET_ARCH} |
35 |
.endif |
36 |
CFLAGS+= -I${.CURDIR} |
37 |
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd |
38 |
CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd |
39 |
CFLAGS+= -I${SRCDIR}/include |
40 |
|
41 |
.if exists(${.CURDIR}/${TARGET_ARCH}) |
42 |
.PATH: ${.CURDIR}/${TARGET_ARCH} |
43 |
.endif |
44 |
|
45 |
ARCHS= ${TARGET_ARCH} |
46 |
|
47 |
.for _arch in ${CROSS_ARCH} |
48 |
.if (${ARCHS:R:M${_arch:R}} == "") |
49 |
ARCHS+= $(_arch) |
50 |
.endif |
51 |
.endfor |
52 |
|
53 |
.for _arch in ${ARCHS} |
54 |
.if exists(${.CURDIR}/Makefile.${_arch}) |
55 |
.include "${.CURDIR}/Makefile.${_arch}" |
56 |
.endif |
57 |
.endfor |