summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-11-27 09:08:35 +0100
committerClifford Wolf <clifford@clifford.at>2013-11-27 09:08:35 +0100
commit38e7fa6530f0c5ba5044dcd79f391e49fcdef84c (patch)
tree031c5757ecf204357c41e542672dcaac0c3855a1 /Makefile
parentbc3cc8871973c23043da48c1db76f352b33ea259 (diff)
Tighter integration of ABC build
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 20 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 40bc61f4..c477c93d 100644
--- a/Makefile
+++ b/Makefile
@@ -3,9 +3,13 @@ CONFIG := clang-debug
# CONFIG := gcc-debug
# CONFIG := release
+# features (the more the better)
ENABLE_TCL := 1
ENABLE_QT4 := 1
ENABLE_MINISAT := 1
+ENABLE_ABC := 1
+
+# other configuration flags
ENABLE_GPROF := 0
DESTDIR := /usr/local
@@ -61,6 +65,10 @@ ifeq ($(ENABLE_QT4),1)
TARGETS += yosys-svgviewer
endif
+ifeq ($(ENABLE_ABC),1)
+TARGETS += yosys-abc
+endif
+
OBJS += kernel/driver.o kernel/register.o kernel/rtlil.o kernel/log.o kernel/calc.o
OBJS += libs/bigint/BigIntegerAlgorithms.o libs/bigint/BigInteger.o libs/bigint/BigIntegerUtils.o
@@ -107,6 +115,18 @@ endif
cd abc && $(MAKE)
cp abc/abc yosys-abc
+abc/abc-$(ABCREV):
+ if test "`cd abc && hg identify`" != "$(ABCREV)"; then \
+ test $(ABCPULL) -ne 0 || { echo; echo "!!! ABC not up to date and ABCPULL set to 0 in Makefile !!!"; echo; exit 1; }; \
+ test -d abc || hg clone https://bitbucket.org/alanmi/abc abc; \
+ cd abc && hg pull && hg update -r $(ABCREV); \
+ fi
+ cd abc && $(MAKE)
+ cp abc/abc abc/abc-$(ABCREV)
+
+yosys-abc: abc/abc-$(ABCREV)
+ cp abc/abc-$(ABCREV) yosys-abc
+
test: yosys
cd tests/simple && bash run-test.sh
cd tests/hana && bash run-test.sh
@@ -118,9 +138,6 @@ install: $(TARGETS) $(EXTRA_TARGETS)
$(INSTALL_SUDO) mkdir -p $(DESTDIR)/share/yosys
$(INSTALL_SUDO) cp -r share/. $(DESTDIR)/share/yosys/.
-install-abc:
- $(INSTALL_SUDO) install yosys-abc $(DESTDIR)/bin/
-
manual:
cd manual && bash make.sh