-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
138 lines (94 loc) · 5.08 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
CUDDDIR = ./cudd-symlink
OCUDDDIR = ./cudd-symlink-original
CUDDINC= -I$(CUDDDIR)/include
CUDDLIBS = $(CUDDDIR)/lib/libcudd.a
CUDDFLAGS =
OCUDDINC= -I$(OCUDDDIR)/include
OCUDDLIBS = $(OCUDDDIR)/lib/libcudd.a
OCUDDFLAGS = -DNO_CHAINING
# Temporary
CUDDIINC= \
-I/src/boolean/Chain-CUDD-3.0.0/ \
-I/src/boolean/Chain-CUDD-3.0.0/cudd \
-I/src/boolean/Chain-CUDD-3.0.0/epd \
-I/src/boolean/Chain-CUDD-3.0.0/mtr \
-I/src/boolean/Chain-CUDD-3.0.0/st \
-I/src/boolean/Chain-CUDD-3.0.0/util
VLEVEL=5
CC=gcc
#CFLAGS= -Wall -g -O0 -DRPT=$(VLEVEL)
CFLAGS = -Wall -g -O2 -DRPT=$(VLEVEL)
# Optionally test version with very small hash signatures to stress aliasing code
BDDFLAGS=
#BDDFLAGS=-DSMALL_HASH
PFILES = agent.h bdd.h chunk.h conjunct.h console.h dtype.h msg.h report.h shadow.h table.h \
agent.c bdd.c bworker.c chunk.c conjunct.c console.c controller.c msg.c report.c \
router.c runbdd.c shadow.c table.c
default: runbdd
b: runbdd bworker controller router
dft: controller router tworker tclient
code.pdf: $(PFILES)
enscript -E -2r $(PFILES) -o code.ps
ps2pdf code.ps
tests: chunk_test set_test word_set_test chunktable_test shadow_test console_test
chunk.o: chunk.c chunk.h dtype.h
$(CC) $(CFLAGS) -c chunk.c
table.o: table.c table.h dtype.h
$(CC) $(CFLAGS) -c table.c
report.o: report.c report.h
$(CC) $(CFLAGS) -c report.c
bdd.o: bdd.c dtype.h bdd.h table.h chunk.h report.h msg.h console.h agent.h
$(CC) $(CFLAGS) $(BDDFLAGS) -c bdd.c
shadow.o: shadow.c shadow.h bdd.h table.h chunk.h report.h console.h agent.h msg.h
$(CC) $(CFLAGS) $(CUDDFLAGS) $(BDDFLAGS) $(CUDDINC) -c shadow.c
shadow-nochain.o: shadow.c shadow.h bdd.h table.h chunk.h report.h console.h agent.h msg.h
$(CC) $(CFLAGS) $(CUDDFLAGS) $(BDDFLAGS) $(CUDDINC) -DNO_CHAINING -c shadow.c -o shadow-nochain.o
conjunct.o: conjunct.c msg.h console.h agent.h bdd.h shadow.h report.h conjunct.h
$(CC) $(CFLAGS) $(CUDDFLAGS) $(BDDFLAGS) $(CUDDINC) -c conjunct.c
console.o: console.c console.h report.h
$(CC) $(CFLAGS) -c console.c
agent.o: agent.c dtype.h table.h chunk.h report.h msg.h console.h agent.h
$(CC) $(CFLAGS) -c agent.c
msg.o: msg.c table.h chunk.h report.h msg.h
$(CC) $(CFLAGS) -c msg.c
test_df.o: test_df.c dtype.h table.h chunk.h report.h msg.h console.h agent.h test_df.h
$(CC) $(CFLAGS) -c test_df.c
# Temporary
cuddLoadStore.o: cuddLoadStore.c cudd-ls.h
$(CC) $(CFLAGS) $(CUDDIINC) -c cuddLoadStore.c
chunk_test: chunk_test.c dtype.h table.h chunk.h report.h chunk.o report.o table.o
$(CC) $(CFLAGS) -o chunk_test chunk_test.c chunk.o report.o table.o
set_test: set_test.c dtype.h table.h report.h table.o report.o
$(CC) $(CFLAGS) -o set_test set_test.c table.o report.o
word_set_test: word_set_test.c dtype.h table.h report.h table.o report.o
$(CC) $(CFLAGS) -o word_set_test word_set_test.c table.o report.o
chunktable_test: chunktable_test.c dtype.h table.h chunk.h report.h chunk.o report.o table.o
$(CC) $(CFLAGS) -o chunktable_test chunktable_test.c chunk.o report.o table.o
shadow_test: shadow_test.c console.o chunk.o table.o report.o bdd.o shadow.o msg.o agent.o
$(CC) $(CFLAGS) $(BDDFLAGS) $(CUDDINC) -o shadow_test shadow_test.c console.o chunk.o table.o report.o bdd.o shadow.o msg.o agent.o $(CUDDLIBS)
console_test: console_test.c console.h report.h console.o report.o chunk.o table.o
$(CC) $(CFLAGS) -o console_test console_test.c console.o report.o chunk.o table.o
runbdd: runbdd.c conjunct.o console.o chunk.o table.o report.o bdd.o shadow.o msg.o agent.o
$(CC) $(CFLAGS) $(CUDDFLAGS) $(BDDFLAGS) $(CUDDINC) -o runbdd runbdd.c \
chunk.o conjunct.o console.o table.o report.o bdd.o shadow.o msg.o agent.o \
$(CUDDLIBS) -lm
# Use standard version of CUDD
runbdd-cudd: runbdd.c conjunct.o console.o chunk.o table.o report.o bdd.o shadow.c msg.o agent.o
$(CC) $(CFLAGS) $(CUDDFLAGS) $(BDDFLAGS) $(OCUDDFLAGS) $(OCUDDINC) -o runbdd-cudd runbdd.c chunk.o conjunct.o console.o table.o report.o bdd.o shadow.c msg.o agent.o $(OCUDDLIBS) -lm
bworker: bworker.c table.o chunk.o report.o msg.o console.o agent.o bdd.o
$(CC) $(CFLAGS) -o bworker bworker.c table.o chunk.o report.o msg.o console.o agent.o bdd.o
router: router.c table.o chunk.o report.o msg.o dtype.h table.h chunk.h report.h msg.h
$(CC) $(CFLAGS) -o router router.c table.o chunk.o report.o msg.o
tclient: tclient.c table.o chunk.o report.o msg.o console.o agent.o test_df.o dtype.h table.h chunk.h report.h msg.h
$(CC) $(CFLAGS) -o tclient tclient.c table.o chunk.o report.o msg.o console.o agent.o test_df.o
tworker: tworker.c table.o chunk.o report.o msg.o console.o agent.o test_df.o dtype.h table.h chunk.h report.h msg.h
$(CC) $(CFLAGS) -o tworker tworker.c table.o chunk.o report.o msg.o console.o agent.o test_df.o
controller: controller.c table.o chunk.o report.o msg.o console.o dtype.h table.h chunk.h report.h msg.h console.h
$(CC) $(CFLAGS) -o controller controller.c table.o chunk.o report.o msg.o console.o
memtest: memtest.c report.o
$(CC) $(CFLAGS) -o memtest memtest.c report.o
clean:
rm -f *.o *~ *.dat
rm -rf *.dSYM
rm -f chunk_test chunktable_test shadow_test console_test set_test
rm -f runbdd tworker tclient bworker router controller