source: icGREP/icgrep-devel/cudd-2.5.1/dddmp/Makefile @ 4597

Last change on this file since 4597 was 4597, checked in by nmedfort, 4 years ago

Upload of the CUDD library.

File size: 6.9 KB
Line 
1#----------------------------------------------------------------------------#
2# Makefile for the dddmp distribution kit                                    #
3# dddmp: Decision Diagram DuMP                                               #
4#        (storage and retrieval of BDDs, ADDs and CNF formulas)              #
5# Revision: Version 2.0.2, February 01, 2004                                 #
6#----------------------------------------------------------------------------#
7
8# Commands Available:
9# make
10#    it makes the library libdddmp.a
11# make testdddmp
12#    it makes the testdddmp program, which allows to test the dddmp
13#    package
14# make clean
15#    it cleans dddmp
16# make distclean
17#    it cleans dddmp (as clean) with libraries and executable
18#    files
19
20#----------------------------------------------------------------------------#
21# Configuration Section                                                      #
22# uncomment the desired options/sections                                     #
23#----------------------------------------------------------------------------#
24
25#--------------------#
26# Define Directories #
27#--------------------#
28
29# Cudd directory
30WHERE   = ..
31#WHERE  = ../cudd-2.4.0
32
33# Include directory (Cudd include files)
34INCLUDE = $(WHERE)/include
35
36#------------------------#
37# Define C Compiler Used #
38#------------------------#
39
40CC      = gcc
41#CC     = g++
42#CC     = cc
43#CC     = icc
44#CC     = ecc
45#CC     = /usr/ucb/cc
46#CC     = c89
47
48.SUFFIXES: .o .c .u
49
50#---------------#
51# Define ranlib #
52#---------------#
53
54# For machines with ranlib and you think it is needed
55RANLIB  = ranlib
56# For machines which either do not have ranlib or can do without it
57#RANLIB = :
58
59#----------------------------------#
60# Define Machine Independent Flags #
61#----------------------------------#
62
63# Settings for cc
64#ICFLAGS        =
65#ICFLAGS        = -g
66#ICFLAGS        = -O
67# Settings for optimized code with gcc
68#ICFLAGS        = -g -Wall
69#ICFLAGS        = -g -O3 -Wall
70ICFLAGS = -g -O6 -Wall
71     
72#--------------------------------#
73# Define Machine Dependent Flags #
74#--------------------------------#
75
76# When no special flags are needed
77#XCFLAGS        = -DHAVE_IEEE_754 -DBSD
78# Linux with Gcc 2.8.1 or higher on i686.
79#XCFLAGS        = -mcpu=pentiumpro -malign-double -DHAVE_IEEE_754 -DBSD
80# Gcc 3.3.2 or higher on i686.
81XCFLAGS = -mcpu=pentium4 -malign-double -DHAVE_IEEE_754 -DBSD
82# For Solaris, BSD should not be replaced by UNIX100.
83#XCFLAGS        = -DHAVE_IEEE_754 -DUNIX100 -DEPD_BIG_ENDIAN
84# New native compiler for the Alphas; 64-bit pointers.
85#XCFLAGS        = -g3 -O4 -std -DBSD -DHAVE_IEEE_754 -ieee_with_no_inexact -tune host -DSIZEOF_VOID_P=8 -DSIZEOF_LONG=8
86# New native compiler for the Alphas; 32-bit pointers.
87#XCFLAGS        = -g3 -O4 -std -DBSD -DHAVE_IEEE_754 -ieee_with_no_inexact -tune host -xtaso -DSIZEOF_LONG=8
88#  Windows95/98/NT/XP with Cygwin tools
89#XCFLAGS        = -mcpu=pentiumpro -malign-double -DHAVE_IEEE_754 -DHAVE_GETRLIMIT=0 -DRLIMIT_DATA_DEFAULT=67108864
90
91#---------------------------------------------#
92# Define Level of Self-Checking and Verbosity #
93#---------------------------------------------#
94
95# ... for the CUDD package
96#DDDEBUG = -DDD_DEBUG -DDD_VERBOSE -DDD_STATS -DDD_CACHE_PROFILE -DDD_UNIQUE_PROFILE -DDD_COUNT
97DDDEBUG =
98
99# ... for the MTR package
100#MTRDEBUG = -DMTR_DEBUG
101MTRDEBUG =
102
103# ... for the DDDMP package
104#DDDMPDEBUG = -DDDDMP_DEBUG
105DDDMPDEBUG =
106
107#-----------------------#
108# Define Loader Options #
109#-----------------------#
110
111LDFLAGS =
112# This may produce faster code on the DECstations.
113#LDFLAGS        = -jmpopt -Olimit 1000
114# This may be necessary under some old versions of Linux.
115#LDFLAGS        = -static
116# This normally makes the program faster on the DEC Alphas.
117#LDFLAGS        = -non_shared -om
118# This is for 32-bit pointers on the DEC Alphas.
119#LDFLAGS        = -non_shared -om -taso
120#LDFLAGS        = -non_shared -taso
121
122#-------------#
123# Define PURE #
124#-------------#
125
126PURE =
127# ... as purify to link with purify.
128#PURE   = purify
129# ... as quantify to link with quantify.
130#PURE   = quantify
131
132#------------#
133# Define EXE #
134#------------#
135
136EXE     =
137# ... as .exe for MS-DOS and derivatives.
138#EXE    = .exe
139
140#----------------------------------------------------------------------------#
141# Files for the Package                                                      #
142#----------------------------------------------------------------------------#
143
144P       = dddmp
145PSRC    = dddmpStoreBdd.c dddmpStoreAdd.c dddmpStoreCnf.c \
146          dddmpLoad.c dddmpLoadCnf.c \
147          dddmpNodeBdd.c dddmpNodeAdd.c dddmpNodeCnf.c \
148          dddmpStoreMisc.c dddmpUtil.c dddmpBinary.c dddmpConvert.c \
149          dddmpDbg.c
150PHDR    = dddmp.h dddmpInt.h $(INCLUDE)/cudd.h $(INCLUDE)/cuddInt.h
151POBJ    = $(PSRC:.c=.o)
152PUBJ    = $(PSRC:.c=.u)
153TARGET  = test$(P)$(EXE)
154TARGETu = test$(P)-u
155
156# files for the test program
157SRC     = test$(P).c
158OBJ     = $(SRC:.c=.o)
159UBJ     = $(SRC:.c=.u)
160
161#----------------------------------------------------------------------------#
162# Rules to compile and build libraries and executables                       #
163#----------------------------------------------------------------------------#
164
165#MFLAG =
166MFLAG   = -DMNEMOSYNE
167MNEMLIB = ../mnemosyne/libmnem.a
168
169# This is to create the lint library
170LINTFLAGS = -u -n
171LINTSWITCH = -o
172
173LIBS    = ./libdddmp.a $(WHERE)/cudd/libcudd.a $(WHERE)/mtr/libmtr.a \
174        $(WHERE)/st/libst.a $(WHERE)/util/libutil.a $(WHERE)/epd/libepd.a
175
176MNEMLIB =
177
178BLIBS   = -kL. -kldddmp -kL$(WHERE)/cudd -klcudd -kL$(WHERE)/mtr -klmtr \
179        -kL$(WHERE)/st -klst -kL$(WHERE)/util -klutil
180
181LINTLIBS = ./llib-ldddmp.ln $(WHERE)/cudd/llib-lcudd.ln \
182        $(WHERE)/mtr/llib-lmtr.ln $(WHERE)/st/llib-lst.ln \
183        $(WHERE)/util/llib-lutil.ln
184
185lib$(P).a: $(POBJ)
186        ar rv $@ $?
187        $(RANLIB) $@
188
189.c.o: $(PHDR)
190        $(CC) -c $< -I$(INCLUDE) $(ICFLAGS) $(XCFLAGS) $(DDDEBUG) $(MTRDEBUG) $(DDDMPDEBUG) $(LDFLAGS)
191
192optimize_dec: lib$(P).b
193
194lib$(P).b: $(PUBJ)
195        ar rv $@ $?
196        $(RANLIB) $@
197
198.c.u: $(PHDR)
199        cc -c $< -I$(INCLUDE) $(CFLAGS)
200
201# if the header files change, recompile
202$(POBJ): $(PHDR)
203$(PUBJ): $(PHDR)
204$(OBJ): $(PHDR)
205$(UBJ): $(PHDR)
206
207$(TARGET): $(SRC) $(OBJ) $(PHDR) $(LIBS) $(MNEMLIB)
208        $(PURE) $(CC) $(ICFLAGS) $(XCFLAGS) $(DDDEBUG) $(MTRDEBUG) $(DDDMPDEBUG) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(MNEMLIB) -lm
209
210# optimize (DECstations and Alphas only: uses u-code)
211$(TARGETu): $(SRC) $(UBJ) $(PHDR) $(LIBS:.a=.b)
212        cc -O3 -Olimit 1000 $(XCFLAGS) $(LDFLAGS) -o $@ $(UBJ) $(BLIBS) -lm
213
214lint: llib-l$(P).ln
215
216llib-l$(P).ln: $(PSRC) $(PHDR)
217        lint $(LINTFLAGS) $(LINTSWITCH)$(P) -I$(INCLUDE) $(PSRC)
218
219lintpgm: lint
220        lint $(LINTFLAGS) -I$(INCLUDE) $(SRC) $(LINTLIBS)
221
222tags: $(PSRC) $(PHDR)
223        ctags $(PSRC) $(PHDR)
224
225all: lib$(P).a lib$(P).b llib-l$(P).ln tags
226
227programs: $(TARGET) $(TARGETu) lintpgm
228
229#----------------------------------------------------------------------------#
230# Clean the Package                                                          #
231#----------------------------------------------------------------------------#
232
233clean:
234        rm -f *.o *.u mon.out gmon.out *.pixie *.Addrs *.Counts mnem.* \
235        .pure core *.warnings
236
237distclean: clean
238        rm -f $(TARGET) $(TARGETu) lib*.a lib$(P).b llib-l$(P).ln \
239        *.bak *~ tags .gdb_history *.qv *.qx
240
241
242
243
Note: See TracBrowser for help on using the repository browser.