summaryrefslogtreecommitdiff
path: root/devel/bcc/Makefile
blob: 65aed061d73be442a91436e5f7fcfe34c71a9d20 (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
# $NetBSD: Makefile,v 1.32 2020/05/03 16:01:27 rillig Exp $

DISTNAME=		bcc
PKGREVISION=		3
PKGNAME=		bcc-95.3.12
CATEGORIES=		devel lang

MAINTAINER=		pkgsrc-users@NetBSD.org
COMMENT=		Bruce Evans' C compiler (with as and ld); can do 16-bit code
LICENSE=		gnu-gpl-v2

CONFLICTS=		bin86-[0-9]*
CONFLICTS+=		dev86-[0-9]*

NOT_FOR_PLATFORM=	Interix-*-*		# no <a.out.h>
# These platforms cannot build 32-on-64 binaries.
NOT_FOR_PLATFORM+=	*-*-alpha
NOT_FOR_PLATFORM+=	DragonFly-*-x86_64

USE_BSD_MAKEFILE=	yes
USE_TOOLS+=		groff nroff

INSTALLATION_DIRS=	bin lib/bcc ${PKGMANDIR}/cat1 ${PKGMANDIR}/man1

CWARNFLAGS.clang=	-Wno-error=logical-op-parentheses -Wno-error=array-bounds
MAKE_FLAGS+=		CWARNFLAGS.clang=${CWARNFLAGS.clang:Q}

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

# This package has LP64 issues, so must build as 32-bit binary.
.for platform in ${LP64PLATFORMS}
.  if ${MACHINE_PLATFORM:M${platform}}
CFLAGS+=		-m32
LDFLAGS+=		-m32
.  endif
.endfor

CPPFLAGS.DragonFly+=	-D_POSIX_SOURCE

# Lots of array[char] expressions, but all harmless.
BUILDLINK_TRANSFORM+=	rm:-Werror=char-subscripts

post-extract:
	set -e; \
	cd ${FILESDIR}; \
	mkdir ${WRKSRC}/bcc-cc1; \
	cp Makefile.main ${WRKSRC}/Makefile; \
	cp Makefile.ld ${WRKSRC}/ld/Makefile; \
	cp ld86.1 ${WRKSRC}/ld/; \
	cp Makefile.as ${WRKSRC}/as/Makefile; \
	cp as86.1 ${WRKSRC}/as/; \
	cp Makefile.bcc ${WRKSRC}/bcc/Makefile; \
	cp bcc.1 ${WRKSRC}/bcc/; \
	cp Makefile.bcc-cc1 ${WRKSRC}/bcc-cc1/Makefile; \
	cp bcc-cc1.1 ${WRKSRC}/bcc-cc1/
	rm -f ${WRKSRC}/as/typeconv.o

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