summaryrefslogtreecommitdiff
path: root/cad/verilog/Makefile
blob: d3ea37ec3fc7cad1aea773ee7f3e7952e8734ed3 (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
67
68
69
70
71
72
73
74
75
76
77
# $NetBSD: Makefile,v 1.42 2016/07/24 23:43:12 rillig Exp $
#

DISTNAME=	verilog-0.9.7
CATEGORIES=	cad
MASTER_SITES=	ftp://icarus.com/pub/eda/verilog/v0.9/

MAINTAINER=	dmcmahill@NetBSD.org
HOMEPAGE=	http://iverilog.icarus.com/
COMMENT=	Verilog simulation and synthesis tool (stable release version)
LICENSE=	gnu-gpl-v2

CONFLICTS+=	verilog-current-[0-9]*

USE_LANGUAGES=	c c++

GNU_CONFIGURE=		yes
USE_TOOLS+=		gmake bison lex
TEST_TARGET=		check

INSTALLATION_DIRS+=	share/ivl

SUBST_CLASSES+=		destdir
SUBST_FILES.destdir=	tgt-vhdl/Makefile.in \
			tgt-fpga/Makefile.in \
			tgt-null/Makefile.in \
			tgt-pal/Makefile.in \
			tgt-stub/Makefile.in \
			tgt-verilog/Makefile.in \
			tgt-vvp/Makefile.in
SUBST_MESSAGE.destdir=	Fix DESTDIR in various Makefile.in
SUBST_STAGE.destdir=	pre-configure
SUBST_SED.destdir=	-e 's, $$(libdir)/ivl, $$(DESTDIR)$$(libdir)/ivl,g'
# Leading TAB
SUBST_SED.destdir+=	-e 's,	$$(libdir)/ivl,	$$(DESTDIR)$$(libdir)/ivl,g'
# target:
SUBST_SED.destdir+=	-e 's,^$$(libdir)/ivl,$$(DESTDIR)$$(libdir)/ivl,'

SUBST_CLASSES+=		vpi-dest
SUBST_STAGE.vpi-dest=	pre-configure
SUBST_FILES.vpi-dest=	vpi/Makefile.in
SUBST_MESSAGE.vpi-dest=	Fix DESTDIR in vpi/Makefile.in (watch target:)
SUBST_SED.vpi-dest=	-e 's, $$(vpidir)/, $$(DESTDIR)$$(vpidir)/,g'
# Leading TAB
SUBST_SED.vpi-dest+=	-e 's,	$$(vpidir)/,	$$(DESTDIR)$$(vpidir)/,g'
SUBST_SED.vpi-dest+=	-e 's,^$$(vpidir)/,$$(DESTDIR)$$(vpidir)/,g'

pre-build:
	cd ${WRKSRC} && ${BUILD_MAKE_CMD} dep

# Some missing files not installed are handled by SUBST (above)
# and rest of them are by following target.
post-install:
	(cd ${WRKSRC}; ${INSTALL_DATA} \
		QUICK_START.txt \
		README.txt      \
	${DESTDIR}${PREFIX}/share/ivl )
# include/iverilog
	(cd ${WRKSRC}; ${INSTALL_DATA} \
		acc_user.h ivl_target.h veriuser.h vpi_user.h \
	${DESTDIR}${PREFIX}/include/iverilog )
# lib/ivl/include
	(cd ${WRKSRC}; ${INSTALL_DATA} \
		constants.vams \
		disciplines.vams \
	${DESTDIR}${PREFIX}/lib/ivl/include )

#
# 1. this should be BUILD_DEPENDS
# 2. it doesn't actually run it during the build anyhow
#
#.include "../../devel/gperf/buildlink3.mk"

.include "../../devel/zlib/buildlink3.mk"
.include "../../archivers/bzip2/buildlink3.mk"
.include "../../mk/readline.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"