summaryrefslogtreecommitdiff
path: root/cross/h8300-hms-gcc/Makefile
blob: c4ba3dea5b07d8c8910266a4beeae791920bd3bd (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
# $NetBSD: Makefile,v 1.29 2014/12/19 08:49:37 obache Exp $

DISTNAME=		gcc-core-3.1
PKGNAME=		cross-h8300-hms-gcc-3.1
PKGREVISION=		6
CATEGORIES=		cross
MASTER_SITES=		${MASTER_SITE_GNU:=gcc/gcc-3.1/}
DISTFILES=		${DISTNAME}${EXTRACT_SUFX} \
			${DISTNAME:S/-core-/-g++-/}${EXTRACT_SUFX} \
			newlib-1.10.0.tar.gz

SITES.newlib-1.10.0.tar.gz=	ftp://sources.redhat.com/pub/newlib/
PATCH_SITES=		${MASTER_SITE_SOURCEFORGE:=h8300-hms/}
PATCHFILES=		h8300-hms-gcc-3.1-1.patch
PATCH_DIST_ARGS=	-d ${SRCDIR} -E -p1

MAINTAINER=		pkgsrc-users@NetBSD.org
HOMEPAGE=		#empty
COMMENT=		GCC compiler for h8300-hms

DEPENDS+=	cross-h8300-hms-binutils-[0-9]*:../../cross/h8300-hms-binutils

H8300_PREFIX=		${LOCALBASE}/libexec/cross-h8300-hms

WRKSRC=			${WRKDIR}/objdir
USE_TOOLS+=		gmake
HAS_CONFIGURE=		yes
CONFIGURE_ARGS+=	--prefix=${H8300_PREFIX:Q}
CONFIGURE_ARGS+=	--infodir=${H8300_PREFIX}/gcc
CONFIGURE_ARGS+=	--target=h8300-hms
CONFIGURE_ARGS+=	--enable-languages=c,c++
CONFIGURE_ARGS+=	--with-newlib
CONFIGURE_SCRIPT=	${SRCDIR}/configure
SRCDIR=			${WRKDIR}/gcc-3.1
MAKE_ENV+=		SHELL=${CONFIG_SHELL}
BUILD_TARGET=		CFLAGS="-O2 -fomit-frame-pointer" all
INSTALLATION_DIRS+=	bin libexec/cross-h8300-hms/h8300-hms/bin
INFO_FILES=		yes

GCC_REQD+=		2.8.0

post-extract:
	${LN} -s ${WRKDIR}/newlib-1.10.0/newlib ${SRCDIR}/newlib
	${MKDIR} ${WRKSRC}

post-install:
	for f in h8300-hms-cpp    h8300-hms-gcc \
		 h8300-hms-c++    h8300-hms-g++ \
		 h8300-hms-gccbug h8300-hms-gcov \
		 ; do \
		${LN} -s ../libexec/cross-h8300-hms/bin/"$$f" \
			${DESTDIR}${PREFIX}/bin/"$$f" || exit 1; \
	done

.include "../../mk/bsd.pkg.mk"