summaryrefslogtreecommitdiff
path: root/lang/gcc3/buildlink2.mk
blob: a2283afff19725553f593fb90a6841d049065990 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# $NetBSD: buildlink2.mk,v 1.7 2003/09/12 13:03:41 grant Exp $

# Do not directly include this file in package Makefiles. It is
# automatically included when required based on USE_GCC3.

.if !defined(GCC3_BUILDLINK2_MK)
GCC3_BUILDLINK2_MK=	# defined

BUILDLINK_DEPENDS.gcc?=		gcc3>=${GCC_REQD}
BUILDLINK_PKGSRCDIR.gcc?=	../../lang/gcc3

# Packages that link against gcc shared libraries need a full
# dependency.
#
.if defined(USE_GCC_SHLIB)
BUILDLINK_DEPMETHOD.gcc+=	full
.else
BUILDLINK_DEPMETHOD.gcc?=	build
.endif

BUILDLINK_PREFIX.gcc=	${LOCALBASE}

_GCC_PREFIX=		${BUILDLINK_PREFIX.gcc}/${_GCC_SUBPREFIX}
_GCC_LIBGCCDIR!= \
  dirname `${_GCC_PREFIX}bin/gcc --print-libgcc-file-name`
_GCC_ARCHSUBDIR= \
  ${_GCC_LIBGCCDIR:S|^${BUILDLINK_PREFIX.gcc}/${_GCC_SUBPREFIX}||}

BUILDLINK_LDFLAGS.gcc=	-L${_GCC_ARCHDIR} -Wl,${RPATH_FLAG}${_GCC_ARCHDIR} -L${_GCC_PREFIX}lib -Wl,${RPATH_FLAG}${_GCC_PREFIX}lib

BUILDLINK_PACKAGES+=	gcc

.if defined(USE_GCC_SHLIB)
LDFLAGS+=		${BUILDLINK_LDFLAGS.gcc}
.endif
BUILDLINK_WRAPPER_ENV+=	\
	COMPILER_PATH="${BUILDLINK_DIR}/bin"; export COMPILER_PATH

# These files are from gcc-3.3.
BUILDLINK_FILES.gcc=	${_GCC_SUBPREFIX}include/c++/3.3/*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}include/c++/3.3/*/*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}${_GCC_ARCHSUBDIR}/include/*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}${_GCC_ARCHSUBDIR}/include/*/*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}${_GCC_ARCHSUBDIR}/include/*/*/*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}${_GCC_ARCHSUBDIR}/include/*/*/*/*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}${_GCC_ARCHSUBDIR}/lib*.*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}${_GCC_ARCHSUBDIR}/specs
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}${MACHINE_GNU_PLATFORM}/include/*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}${MACHINE_GNU_PLATFORM}/include/*/*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}lib/lib-org-w3c-dom.*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}lib/lib-org-xml-sax.*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}lib/libffi*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}lib/libfrtbegin.*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}lib/libg2c.*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}lib/libgcc_s.*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}lib/libgcj.*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}lib/libiberty.*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}lib/libobjc.*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}lib/libstdc++.*
BUILDLINK_FILES.gcc+=	${_GCC_SUBPREFIX}lib/libsupc++.*

BUILDLINK_TARGETS+=	gcc-buildlink

gcc-buildlink: _BUILDLINK_USE

.endif	# GCC3_BUILDLINK2_MK