-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
executable file
·96 lines (78 loc) · 2.11 KB
/
Makefile
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
SRCPKGS = util cmd mod abc bdd itp ntk sim vrf ext prove
LIBPKGS = util cmd mod abc bdd itp ntk sim vrf prove
MAIN = main
EXTLIBS = -lm -lz -lreadline -ltermcap -ldl -lstdc++ -ltcl -lffi -lgmp
SRCLIBS = $(addprefix -l, $(LIBPKGS)) $(addprefix -l, $(ENGPKGS))
#ENGPKGS += quteRTL
ENGPKGS += boolector
ENGPKGS += lgl
ENGPKGS += btor2parser
#ENGPKGS += minisat
ENGPKGS += abcc
ENGPKGS += yosys
ENGSSRC = eng
EXEC = gv
.PHONY : all debug
all : EXEC = gv
debug : EXEC = gv.debug
all: DEBUG_FLAG =
debug:DEBUG_FLAG = -DGV_DEBUG
LIB = libgv.a
all debug: srcLib
@echo "Checking $(MAIN)..."
@cd src/$(MAIN); make --no-print-directory EXTLIB="$(SRCLIBS) $(EXTLIBS)" EXEC=$(EXEC); cd ../.. ;
srcLib: engLib
@cd include; ln -fs ../src/*/*.h ./;
@for pkg in $(SRCPKGS); \
do \
echo "Checking $$pkg..."; \
cd src/$$pkg; make --no-print-directory DEBUG_FLAG=$(DEBUG_FLAG) PKGNAME=$$pkg || exit; \
cd ../.. ; \
done
engLib:
@for pkg in $(ENGPKGS); \
do \
cd include ; ln -fs ../src/$(ENGSSRC)/$$pkg/* .; cd .. ; \
cd lib ; ln -fs ../src/$(ENGSSRC)/$$pkg/*.a .; ln -fs ../src/$(ENGSSRC)/$$pkg/*.so .; cd .. ; \
done
@rm -f include/*.a
main:
@echo "Checking $(MAIN)..."
@cd src/$(MAIN); \
make --no-print-directory EXTLIB="$(SRCLIBS) $(EXTLIBS)" EXEC=$(EXEC);
@ln -fs bin/$(EXEC) .
# @strip bin/$(EXEC)
clean:
@for pkg in $(SRCPKGS); \
do \
echo "Cleaning $$pkg..."; \
cd src/$$pkg; make --no-print-directory PKGNAME=$$pkg clean; \
cd ../.. ; \
done
@echo "Cleaning $(MAIN)..."
@cd src/$(MAIN); make --no-print-directory clean
@echo "Removing $(EXEC)..."
@rm -f $(EXEC)
ctags:
@rm -f src/tags
@for pkg in $(SRCPKGS); \
do \
echo "Tagging $$pkg..."; \
cd src; ctags -a $$pkg/*.cpp $$pkg/*.h; cd ..; \
done
@echo "Tagging $(MAIN)..."
cd src; ctags -a $(MAIN)/*.cpp
@echo "Tagging $(GUI)..."
cd src; ctags -a $(GUI)/*.cpp
rmdep:
@for pkg in $(SRCPKGS); \
do \
rm src/$$pkg/.*.mak; \
done
@rm src/main/.*.mak;
linux18 linux16 mac:
@for pkg in $(REFPKGS); \
do \
cd lib; ln -sf [email protected] lib$$pkg.a; cd ../..; \
done
@cd ref; ln -sf $(EXEC)-$@ $(EXEC);