summaryrefslogtreecommitdiff
path: root/devel/sdcc3/Makefile
blob: 47ed48cb5540ae1e2c753c9a35ee31a9150a000c (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
# $NetBSD: Makefile,v 1.7 2014/05/29 23:36:29 wiz Exp $

DISTNAME=	sdcc-src-3.3.0
PKGNAME=	${DISTNAME:S/-src//}
PKGREVISION=	6
CATEGORIES=	devel lang
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=sdcc/}
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://sdcc.sourceforge.net/
COMMENT=	Cross compile 8051 code
LICENSE=	gnu-gpl-v2

DEPENDS+=	gputils-[0-9]*:../../devel/gputils

MAKE_JOBS_SAFE=		no

USE_LANGUAGES=	c c++

# XXX - This HACK circumvent a problem with the use of yacc that breaks the
# XXX - building process of sdcc.  Use of bison fixes this problem for now.
#
USE_TOOLS+=	bison

BUILD_TARGET=	dep all

WRKSRC=			${WRKDIR}/${DISTNAME:S/src-//}
GNU_CONFIGURE=		YES
USE_TOOLS+=		gmake lex perl:run

CONFIGURE_ARGS+=	--datadir=${PREFIX}/share/sdcc
CONFIGURE_ARGS+=	--docdir=${PREFIX}/share/doc/sdcc

# needed for some arch's.  -fdollars-in-identifiers is enabled
# by default on some, not on others
CPPFLAGS+=		-fdollars-in-identifiers
CONFIGURE_ENV+=		MACHINE_ARCH=${MACHINE_ARCH:Q}
CONFIGURE_ENV+=		sdcc_cv_c_ggdb="no"

REPLACE_PYTHON=		support/scripts/as2gbmap.py

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "NetBSD"
CPPFLAGS+=		-DYY_NEVER_INTERACTIVE

pre-configure: sys-endian-buildlink

sys-endian-buildlink:
	${MKDIR} ${BUILDLINK_DIR}/include
	${LN} -fs /usr/include/sys/endian.h ${BUILDLINK_DIR}/include
.endif

post-install:
	${INSTALL_DATA} ${WRKSRC}/doc/*.lyx ${DESTDIR}${PREFIX}/share/doc/sdcc
	${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DESTDIR}${PREFIX}/share/doc/sdcc

.include "../../devel/boehm-gc/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"