Skip to content

Commit 2baa405

Browse files
authored
Merge branch 'berkeley-abc:master' into master
2 parents 30d93e4 + c4b2b5c commit 2baa405

File tree

587 files changed

+143209
-2191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

587 files changed

+143209
-2191
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ lib/abc*
1212
lib/m114*
1313
lib/bip*
1414
docs/
15-
.vscode/
1615
.cache/
1716

1817
src/ext*
@@ -31,6 +30,7 @@ src/aig/ddb/
3130
*.plg
3231

3332
*.zip
33+
*.DS_Store
3434

3535
abcspaceext.dsw
3636
abcext.dsp

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.10.0)
33
include(CMakeParseArguments)
44
include(CheckCCompilerFlag)
55
include(CheckCXXCompilerFlag)
6+
# Generate compilation database compile_commands.json
7+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
68

79
# Default c++ standard used unless otherwise specified in target_compile_features.
810
set(CMAKE_CXX_STANDARD 17 CACHE STRING "the C++ standard to use for this project")

Makefile

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,19 @@ MSG_PREFIX ?=
88
ABCSRC ?= .
99
VPATH = $(ABCSRC)
1010

11-
$(info $(MSG_PREFIX)Using CC=$(CC))
12-
$(info $(MSG_PREFIX)Using CXX=$(CXX))
13-
$(info $(MSG_PREFIX)Using AR=$(AR))
14-
$(info $(MSG_PREFIX)Using LD=$(LD))
11+
# whether to print build options, tools, and echo commands while building
12+
ifdef ABC_MAKE_VERBOSE
13+
VERBOSE=
14+
abc_info = $(info $(1))
15+
else
16+
VERBOSE=@
17+
abc_info =
18+
endif
19+
20+
$(call abc_info,$(MSG_PREFIX)Using CC=$(CC))
21+
$(call abc_info,$(MSG_PREFIX)Using CXX=$(CXX))
22+
$(call abc_info,$(MSG_PREFIX)Using AR=$(AR))
23+
$(call abc_info,$(MSG_PREFIX)Using LD=$(LD))
1524

1625
PROG := abc
1726
OS := $(shell uname -s)
@@ -26,9 +35,9 @@ MODULES := \
2635
src/misc/vec src/misc/hash src/misc/tim src/misc/bzlib src/misc/zlib \
2736
src/misc/mem src/misc/bar src/misc/bbl src/misc/parse \
2837
src/opt/cut src/opt/fxu src/opt/fxch src/opt/rwr src/opt/mfs src/opt/sim \
29-
src/opt/ret src/opt/fret src/opt/res src/opt/lpk src/opt/nwk src/opt/rwt \
30-
src/opt/cgt src/opt/csw src/opt/dar src/opt/dau src/opt/dsc src/opt/sfm src/opt/sbd \
31-
src/sat/bsat src/sat/xsat src/sat/satoko src/sat/csat src/sat/msat src/sat/psat src/sat/cnf src/sat/bmc src/sat/glucose src/sat/glucose2 \
38+
src/opt/ret src/opt/fret src/opt/res src/opt/lpk src/opt/nwk src/opt/rwt src/opt/rar \
39+
src/opt/cgt src/opt/csw src/opt/dar src/opt/dau src/opt/dsc src/opt/sfm src/opt/sbd src/opt/eslim \
40+
src/sat/bsat src/sat/xsat src/sat/satoko src/sat/csat src/sat/msat src/sat/psat src/sat/cnf src/sat/bmc src/sat/glucose src/sat/glucose2 src/sat/kissat src/sat/cadical \
3241
src/bool/bdc src/bool/deco src/bool/dec src/bool/kit src/bool/lucky \
3342
src/bool/rsb src/bool/rpo \
3443
src/proof/pdr src/proof/abs src/proof/live src/proof/ssc src/proof/int \
@@ -67,14 +76,14 @@ endif
6776
ifdef ABC_USE_NAMESPACE
6877
CFLAGS += -DABC_NAMESPACE=$(ABC_USE_NAMESPACE) -fpermissive -x c++
6978
CC := $(CXX)
70-
$(info $(MSG_PREFIX)Compiling in namespace $(ABC_NAMESPACE))
79+
$(call abc_info,$(MSG_PREFIX)Compiling in namespace $(ABC_USE_NAMESPACE))
7180
endif
7281

7382
# compile CUDD with ABC
7483
ifndef ABC_USE_NO_CUDD
7584
CFLAGS += -DABC_USE_CUDD=1
7685
MODULES += src/bdd/cudd src/bdd/extrab src/bdd/dsd src/bdd/epd src/bdd/mtr src/bdd/reo src/bdd/cas src/bdd/bbr src/bdd/llb
77-
$(info $(MSG_PREFIX)Compiling with CUDD)
86+
$(call abc_info,$(MSG_PREFIX)Compiling with CUDD)
7887
endif
7988

8089
ABC_READLINE_INCLUDES ?=
@@ -88,28 +97,21 @@ ifndef ABC_USE_NO_READLINE
8897
CFLAGS += -I/usr/local/include
8998
LDFLAGS += -L/usr/local/lib
9099
endif
91-
$(info $(MSG_PREFIX)Using libreadline)
100+
$(call abc_info,$(MSG_PREFIX)Using libreadline)
92101
endif
93102

94103
# whether to compile with thread support
95104
ifndef ABC_USE_NO_PTHREADS
96105
CFLAGS += -DABC_USE_PTHREADS
97106
LIBS += -lpthread
98-
$(info $(MSG_PREFIX)Using pthreads)
107+
$(call abc_info,$(MSG_PREFIX)Using pthreads)
99108
endif
100109

101110
# whether to compile into position independent code
102111
ifdef ABC_USE_PIC
103112
CFLAGS += -fPIC
104113
LIBS += -fPIC
105-
$(info $(MSG_PREFIX)Compiling position independent code)
106-
endif
107-
108-
# whether to echo commands while building
109-
ifdef ABC_MAKE_VERBOSE
110-
VERBOSE=
111-
else
112-
VERBOSE=@
114+
$(call abc_info,$(MSG_PREFIX)Compiling position independent code)
113115
endif
114116

115117
# Set -Wno-unused-bug-set-variable for GCC 4.6.0 and greater only
@@ -121,16 +123,16 @@ GCC_VERSION=$(shell $(CC) -dumpversion)
121123
GCC_MAJOR=$(word 1,$(subst .,$(space),$(GCC_VERSION)))
122124
GCC_MINOR=$(word 2,$(subst .,$(space),$(GCC_VERSION)))
123125

124-
$(info $(MSG_PREFIX)Found GCC_VERSION $(GCC_VERSION))
126+
$(call abc_info,$(MSG_PREFIX)Found GCC_VERSION $(GCC_VERSION))
125127
ifeq ($(findstring $(GCC_MAJOR),0 1 2 3),)
126128
ifeq ($(GCC_MAJOR),4)
127-
$(info $(MSG_PREFIX)Found GCC_MAJOR==4)
129+
$(call abc_info,$(MSG_PREFIX)Found GCC_MAJOR==4)
128130
ifeq ($(findstring $(GCC_MINOR),0 1 2 3 4 5),)
129-
$(info $(MSG_PREFIX)Found GCC_MINOR>=6)
131+
$(call abc_info,$(MSG_PREFIX)Found GCC_MINOR>=6)
130132
CFLAGS += -Wno-unused-but-set-variable
131133
endif
132134
else
133-
$(info $(MSG_PREFIX)Found GCC_MAJOR>=5)
135+
$(call abc_info,$(MSG_PREFIX)Found GCC_MAJOR>=5)
134136
CFLAGS += -Wno-unused-but-set-variable
135137
endif
136138
endif
@@ -149,10 +151,10 @@ endif
149151

150152
ifdef ABC_USE_LIBSTDCXX
151153
LIBS += -lstdc++
152-
$(info $(MSG_PREFIX)Using explicit -lstdc++)
154+
$(call abc_info,$(MSG_PREFIX)Using explicit -lstdc++)
153155
endif
154156

155-
$(info $(MSG_PREFIX)Using CFLAGS=$(CFLAGS))
157+
$(call abc_info,$(MSG_PREFIX)Using CFLAGS=$(CFLAGS))
156158
CXXFLAGS += $(CFLAGS) -std=c++17 -fno-exceptions
157159

158160
SRC :=

0 commit comments

Comments
 (0)