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 #----------------------------------------------------------------------------#
10 # it makes the library libdddmp.a
12 # it makes the testdddmp program, which allows to test the dddmp
17 # it cleans dddmp (as clean) with libraries and executable
20 #----------------------------------------------------------------------------#
21 # Configuration Section #
22 # uncomment the desired options/sections #
23 #----------------------------------------------------------------------------#
25 #--------------------#
26 # Define Directories #
27 #--------------------#
31 #WHERE = ../cudd-2.4.0
33 # Include directory (Cudd include files)
34 INCLUDE
= $(WHERE
)/include
36 #------------------------#
37 # Define C Compiler Used #
38 #------------------------#
54 # For machines with ranlib and you think it is needed
56 # For machines which either do not have ranlib or can do without it
59 #----------------------------------#
60 # Define Machine Independent Flags #
61 #----------------------------------#
67 # Settings for optimized code with gcc
69 #ICFLAGS = -g -O3 -Wall
70 ICFLAGS
= -g
-O6
-Wall
72 #--------------------------------#
73 # Define Machine Dependent Flags #
74 #--------------------------------#
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.
81 #XCFLAGS = -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
91 #---------------------------------------------#
92 # Define Level of Self-Checking and Verbosity #
93 #---------------------------------------------#
95 # ... for the CUDD package
96 #DDDEBUG = -DDD_DEBUG -DDD_VERBOSE -DDD_STATS -DDD_CACHE_PROFILE -DDD_UNIQUE_PROFILE -DDD_COUNT
99 # ... for the MTR package
100 #MTRDEBUG = -DMTR_DEBUG
103 # ... for the DDDMP package
104 #DDDMPDEBUG = -DDDDMP_DEBUG
107 #-----------------------#
108 # Define Loader Options #
109 #-----------------------#
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.
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
127 # ... as purify to link with purify.
129 # ... as quantify to link with quantify.
137 # ... as .exe for MS-DOS and derivatives.
140 #----------------------------------------------------------------------------#
141 # Files for the Package #
142 #----------------------------------------------------------------------------#
145 PSRC
= 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 \
150 PHDR
= dddmp.h dddmpInt.h
$(INCLUDE
)/cudd.h
$(INCLUDE
)/cuddInt.h
153 TARGET
= test$(P
)$(EXE
)
156 # files for the test program
161 #----------------------------------------------------------------------------#
162 # Rules to compile and build libraries and executables #
163 #----------------------------------------------------------------------------#
167 MNEMLIB
= ..
/mnemosyne
/libmnem.a
169 # This is to create the lint library
173 LIBS
= .
/libdddmp.a
$(WHERE
)/cudd
/libcudd.a
$(WHERE
)/mtr
/libmtr.a \
174 $(WHERE
)/st
/libst.a
$(WHERE
)/util
/libutil.a
$(WHERE
)/epd
/libepd.a
178 BLIBS
= -kL.
-kldddmp
-kL
$(WHERE
)/cudd
-klcudd
-kL
$(WHERE
)/mtr
-klmtr \
179 -kL
$(WHERE
)/st
-klst
-kL
$(WHERE
)/util
-klutil
181 LINTLIBS
= .
/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
190 $(CC
) -c
$< -I
$(INCLUDE
) $(ICFLAGS
) $(XCFLAGS
) $(DDDEBUG
) $(MTRDEBUG
) $(DDDMPDEBUG
) $(LDFLAGS
)
192 optimize_dec
: lib
$(P
).b
199 cc -c
$< -I
$(INCLUDE
) $(CFLAGS
)
201 # if the header files change, recompile
207 $(TARGET
): $(SRC
) $(OBJ
) $(PHDR
) $(LIBS
) $(MNEMLIB
)
208 $(PURE
) $(CC
) $(ICFLAGS
) $(XCFLAGS
) $(DDDEBUG
) $(MTRDEBUG
) $(DDDMPDEBUG
) $(LDFLAGS
) -o
$@
$(OBJ
) $(LIBS
) $(MNEMLIB
) -lm
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
216 llib-l
$(P
).ln
: $(PSRC
) $(PHDR
)
217 lint
$(LINTFLAGS
) $(LINTSWITCH
)$(P
) -I
$(INCLUDE
) $(PSRC
)
220 lint
$(LINTFLAGS
) -I
$(INCLUDE
) $(SRC
) $(LINTLIBS
)
222 tags: $(PSRC
) $(PHDR
)
223 ctags
$(PSRC
) $(PHDR
)
225 all: lib
$(P
).a lib
$(P
).b llib-l
$(P
).ln
tags
227 programs
: $(TARGET
) $(TARGETu
) lintpgm
229 #----------------------------------------------------------------------------#
230 # Clean the Package #
231 #----------------------------------------------------------------------------#
234 rm -f
*.o
*.u mon.out gmon.out
*.pixie
*.Addrs
*.Counts mnem.
* \
235 .pure core
*.warnings
238 rm -f
$(TARGET
) $(TARGETu
) lib
*.a lib
$(P
).b llib-l
$(P
).ln \
239 *.bak
*~
tags .gdb_history
*.qv
*.qx