blob: d769547460d9663ba37bfc6472e060c7e7466556 (
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
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
|
# $Id$
#
# Cudd - DD package
#---------------------------
.SUFFIXES: .o .c .u
CC = gcc
RANLIB = ranlib
PURE =
# Define EXE as .exe for MS-DOS and derivatives.
EXE =
#EXE = .exe
MFLAG =
ICFLAGS = -g
XCFLAGS = -DDD_STATS
CFLAGS = $(ICFLAGS) $(MFLAG) $(XCFLAGS)
#DDDEBUG = -DDD_DEBUG -DDD_CACHE_PROFILE -DDD_VERBOSE -DDD_UNIQUE_PROFILE
DDDEBUG =
LINTFLAGS = -u -n -DDD_STATS -DDD_CACHE_PROFILE -DDD_VERBOSE -DDD_DEBUG -DDD_UNIQUE_PROFILE
# this is to create the lint library
LINTSWITCH = -o
WHERE = ..
INCLUDE = $(WHERE)/include
LIBS = ./libcudd.a $(WHERE)/mtr/libmtr.a \
$(WHERE)/st/libst.a $(WHERE)/util/libutil.a $(WHERE)/epd/libepd.a
MNEMLIB =
BLIBS = -kL. -klcudd -kL$(WHERE)/mtr -klmtr \
-kL$(WHERE)/st -klst -kL$(WHERE)/util -klutil -kL$(WHERE)/epd -klepd
LINTLIBS = ./llib-lcudd.ln $(WHERE)/mtr/llib-lmtr.ln \
$(WHERE)/st/llib-lst.ln $(WHERE)/util/llib-lutil.ln \
$(WHERE)/epd/llib-lepd.ln
LDFLAGS =
# files for the package
P = cudd
PSRC = cuddAPI.c cuddAddAbs.c cuddAddApply.c cuddAddFind.c cuddAddIte.c \
cuddAddInv.c cuddAddNeg.c cuddAddWalsh.c cuddAndAbs.c \
cuddAnneal.c cuddApa.c cuddApprox.c cuddBddAbs.c cuddBddCorr.c \
cuddBddIte.c cuddBridge.c cuddCache.c cuddCheck.c cuddClip.c \
cuddCof.c cuddCompose.c cuddDecomp.c cuddEssent.c \
cuddExact.c cuddExport.c cuddGenCof.c cuddGenetic.c \
cuddGroup.c cuddHarwell.c cuddInit.c cuddInteract.c \
cuddLCache.c cuddLevelQ.c \
cuddLinear.c cuddLiteral.c cuddMatMult.c cuddPriority.c \
cuddRead.c cuddRef.c cuddReorder.c cuddSat.c cuddSign.c \
cuddSolve.c cuddSplit.c cuddSubsetHB.c cuddSubsetSP.c cuddSymmetry.c \
cuddTable.c cuddUtil.c cuddWindow.c cuddZddCount.c cuddZddFuncs.c \
cuddZddGroup.c cuddZddIsop.c cuddZddLin.c cuddZddMisc.c \
cuddZddPort.c cuddZddReord.c cuddZddSetop.c cuddZddSymm.c \
cuddZddUtil.c
PHDR = cudd.h cuddInt.h
POBJ = $(PSRC:.c=.o)
PUBJ = $(PSRC:.c=.u)
TARGET = test$(P)$(EXE)
TARGETu = test$(P)-u
# files for the test program
SRC = test$(P).c
OBJ = $(SRC:.c=.o)
UBJ = $(SRC:.c=.u)
#------------------------------------------------------
lib$(P).a: $(POBJ)
ar rv $@ $?
$(RANLIB) $@
.c.o: $(PSRC) $(PHDR)
$(CC) -c $< -I$(INCLUDE) $(CFLAGS) $(DDDEBUG)
optimize_dec: lib$(P).b
lib$(P).b: $(PUBJ)
ar rv $@ $?
$(RANLIB) $@
.c.u: $(PSRC) $(PHDR)
cc -j $< -I$(INCLUDE) $(XCFLAGS)
# if the header files change, recompile
$(POBJ): $(PHDR)
$(PUBJ): $(PHDR)
$(OBJ): $(PHDR)
$(UBJ): $(PHDR)
$(TARGET): $(SRC) $(OBJ) $(HDR) $(LIBS) $(MNEMLIB)
$(PURE) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(MNEMLIB) -lm
# optimize (DECstations and Alphas only: uses u-code)
$(TARGETu): $(SRC) $(UBJ) $(HDR) $(LIBS:.a=.b)
$(CC) -O3 -Olimit 1000 $(XCFLAGS) $(LDFLAGS) -o $@ $(UBJ) $(BLIBS) -lm
lint: llib-l$(P).ln
llib-l$(P).ln: $(PSRC) $(PHDR)
lint $(LINTFLAGS) $(LINTSWITCH)$(P) -I$(INCLUDE) $(PSRC)
lintpgm: lint
lint $(LINTFLAGS) -I$(INCLUDE) $(SRC) $(LINTLIBS)
tags: $(PSRC) $(PHDR)
ctags $(PSRC) $(PHDR)
all: lib$(P).a lib$(P).b llib-l$(P).ln tags
programs: $(TARGET) $(TARGETu) lintpgm
clean:
rm -f *.o *.u mon.out gmon.out *.pixie *.Addrs *.Counts mnem.* \
.pure core *.warnings
distclean: clean
rm -f $(TARGET) $(TARGETu) lib*.a lib$(P).b llib-l$(P).ln \
*.bak *~ tags .gdb_history *.qv *.qx
|