updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / cudd / Makefile
blobc937e533354ee4626949e5b04f034ca07fdc71a2
1 # $Id$
3 # Makefile for the CUDD distribution kit
4 #---------------------------------------------------------------------------
6 # Beginning of the configuration section. These symbol definitions can
7 # be overridden from the command line.
9 # C++ compiler
10 CPP = g++
11 #CPP = icpc
12 #CPP = ecpc
13 #CPP = CC
14 #CPP = /usr/local/opt/SUNWspro/bin/CC
15 #CPP = cxx
17 # Specific options for compilation of C++ files.
18 CPPFLAGS =
19 # Stricter standard conformance for g++.
20 #CPPFLAGS = -std=c++98
21 # For Sun CC version 5, this invokes compatibility mode.
22 #CPPFLAGS = -compat
23 # On some versions of UP-UX, it is necessary to pass the option +a1
24 # to CC for the C++ test program to compile successfully.
25 #CPPFLAGS = +a1
27 # C compiler used for all targets except optimize_dec, which always uses cc.
28 #CC = cc
29 #CC = /usr/local/opt/SUNWspro/bin/cc
30 CC = gcc
31 #CC = icc
32 #CC = ecc
33 #CC = /usr/ucb/cc
34 #CC = c89
35 #CC = $(CPP)
37 # On some machines ranlib is either non-existent or redundant.
38 # Use the following definition if your machine has ranlib and you think
39 # it is needed.
40 RANLIB = ranlib
41 # Use the following definition if your machine either does not have
42 # ranlib (e.g., SUN running solaris) or can do without it (e.g., DEC Alpha).
43 #RANLIB = :
45 # Use ICFLAGS to specify machine-independent compilation flags.
46 # These three are typical settings for cc.
47 #ICFLAGS = -g
48 #ICFLAGS = -O
49 #ICFLAGS =
50 # These four are typical settings for optimized code with gcc. The
51 # last two also work with icc/ecc.
52 #ICFLAGS = -g -O6 -Wall
53 ICFLAGS = -g -O6 -fPIC
54 #ICFLAGS = -g -O3 -Wall
55 #ICFLAGS = -g -O3
57 # Use XCFLAGS to specify machine-dependent compilation flags.
58 # For some platforms no special flags are needed.
59 #XCFLAGS = -DHAVE_IEEE_754 -DBSD
61 #==========================
62 # Linux
64 # Gcc 2.8.1 or higher on i686.
65 #XCFLAGS = -march=pentiumpro -malign-double -DHAVE_IEEE_754 -DBSD
66 # Gcc 3.2.2 or higher on i686.
67 #XCFLAGS = -mcpu=pentium4 -malign-double -DHAVE_IEEE_754 -DBSD
68 # Icc on i686.
69 #XCFLAGS = -ansi -align -ip -DHAVE_IEEE_754 -DBSD
70 # Gcc on ia64.
71 #XCFLAGS = -DHAVE_IEEE_754 -DBSD -DSIZEOF_VOID_P=8 -DSIZEOF_LONG=8
72 # Icc/ecc on ia64.
73 #XCFLAGS = -ansi -DBSD -DHAVE_IEEE_754 -DSIZEOF_VOID_P=8 -DSIZEOF_LONG=8
75 #==========================
76 # Solaris
78 # For Solaris, BSD should not be replaced by UNIX100.
79 #XCFLAGS = -DHAVE_IEEE_754 -DUNIX100 -DEPD_BIG_ENDIAN
80 # Gcc 2.8.1 or higher on Ultrasparc.
81 #XCFLAGS = -mcpu=ultrasparc -DHAVE_IEEE_754 -DUNIX100 -DEPD_BIG_ENDIAN
82 # For Solaris 2.5 and higher, optimized code with /usr/bin/cc or CC.
83 #XCFLAGS = -DHAVE_IEEE_754 -DUNIX100 -xO5 -native -dalign -DEPD_BIG_ENDIAN
84 # On IA platforms, -dalign is not supported and causes warnings.
85 #XCFLAGS = -DHAVE_IEEE_754 -DUNIX100 -xO5 -native
86 # Recent Sun compilers won't let you use -native on old Ultras.
87 #XCFLAGS = -DHAVE_IEEE_754 -DUNIX100 -xO5 -dalign -xlibmil -DEPD_BIG_ENDIAN
88 # For Solaris 2.4, optimized code with /usr/bin/cc.
89 #XCFLAGS = -DHAVE_IEEE_754 -DUNIX100 -xO4 -dalign -DEPD_BIG_ENDIAN
90 # For Solaris 2.5 and higher, optimized code with /usr/ucb/cc.
91 #XCFLAGS = -DHAVE_IEEE_754 -DBSD -xO5 -native -dalign -DEPD_BIG_ENDIAN
92 #XCFLAGS = -DHAVE_IEEE_754 -DBSD -xO5 -dalign -xlibmil -DEPD_BIG_ENDIAN
93 # For Solaris 2.4, optimized code with /usr/ucb/cc.
94 #XCFLAGS = -DHAVE_IEEE_754 -DBSD -xO4 -dalign -DEPD_BIG_ENDIAN
96 #==========================
97 # DEC Alphas running Digital Unix
99 # For DEC Alphas either -ieee_with_inexact or -ieee_with_no_inexact is
100 # needed. If you use only BDDs, -ieee_with_no_inexact is enough.
101 # In the following, we consider three different compilers:
102 # - the old native compiler (the one of MIPS ancestry that produces u-code);
103 # - the new native compiler;
104 # - gcc
105 # On the Alphas, gcc (as of release 2.7.2) does not support 32-bit pointers
106 # and IEEE 754 floating point arithmetic. Therefore, for this architecture
107 # only, the native compilers provide a substatial advantage.
108 # With the native compilers, specify -xtaso for 32-bit pointers.
109 # Do not use -xtaso_short because explicit reference to stdout and stderr
110 # does not work with this option. (Among other things.)
111 # Notice that -taso must be included in LDFLAGS for -xtaso to work.
112 # Given the number of possible choices, only some typical configurations
113 # are proposed here.
115 # Old native compiler for the Alphas; 64-bit pointers.
116 #XCFLAGS = -DBSD -DHAVE_IEEE_754 -ieee_with_no_inexact -tune host -DSIZEOF_VOID_P=8 -DSIZEOF_LONG=8
117 # Old native compiler for the Alphas; 32-bit pointers.
118 #XCFLAGS = -DBSD -DHAVE_IEEE_754 -ieee_with_no_inexact -tune host -xtaso -DSIZEOF_LONG=8
119 # New native compiler for the Alphas; 64-bit pointers.
120 #XCFLAGS = -g3 -O4 -std -DBSD -DHAVE_IEEE_754 -ieee_with_no_inexact -tune host -DSIZEOF_VOID_P=8 -DSIZEOF_LONG=8
121 # New native compiler for the Alphas; 32-bit pointers.
122 #XCFLAGS = -g3 -O4 -std -DBSD -DHAVE_IEEE_754 -ieee_with_no_inexact -tune host -xtaso -DSIZEOF_LONG=8
123 # gcc for the Alphas: compile without HAVE_IEEE_754.
124 #XCFLAGS = -DBSD -DSIZEOF_VOID_P=8 -DSIZEOF_LONG=8
126 #==========================
128 # IBM RS6000
130 # For the IBM RS6000 -qstrict is necessary when specifying -O3 with cc.
131 #XCFLAGS = -DBSD -DHAVE_IEEE_754 -DEPD_BIG_ENDIAN -O3 -qstrict
133 #==========================
135 # HP-UX
137 # I haven't figured out how to enable IEEE 754 on the HPs I've tried...
138 # For HP-UX using gcc.
139 #XCFLAGS = -DUNIX100 -DEPD_BIG_ENDIAN
140 # For HP-UX using c89.
141 #XCFLAGS = +O3 -DUNIX100 -DEPD_BIG_ENDIAN
143 #==========================
145 # Windows95/98/NT/XP with Cygwin tools
147 # For b16 it was also necessary to change setup.sh (define CREATE
148 # as "cp"). This is no longer necessary since b17.1.
149 # The value of RLIMIT_DATA_DEFAULT should reflect the amount of
150 # available memory (expressed in bytes).
151 # Recent versions of cygwin have getrlimit, but the datasize limit
152 # cannot be set.
153 #XCFLAGS = -mcpu=pentiumpro -malign-double -DHAVE_IEEE_754 -DHAVE_GETRLIMIT=0 -DRLIMIT_DATA_DEFAULT=67108864
156 # Define the level of self-checking and verbosity of the CUDD package.
157 #DDDEBUG = -DDD_DEBUG -DDD_VERBOSE -DDD_STATS -DDD_CACHE_PROFILE -DDD_UNIQUE_PROFILE -DDD_COUNT
158 DDDEBUG =
160 # Define the level of self-checking and verbosity of the MTR package.
161 #MTRDEBUG = -DMTR_DEBUG
162 MTRDEBUG =
164 # Loader options.
165 LDFLAGS =
166 # This may produce faster code on the DECstations.
167 #LDFLAGS = -jmpopt -Olimit 1000
168 # This may be necessary under some old versions of Linux.
169 #LDFLAGS = -static
170 # This normally makes the program faster on the DEC Alphas.
171 #LDFLAGS = -non_shared -om
172 # This is for 32-bit pointers on the DEC Alphas.
173 #LDFLAGS = -non_shared -om -taso
174 #LDFLAGS = -non_shared -taso
176 # Define PURE as purify to link with purify.
177 # Define PURE as quantify to link with quantify.
178 # Remember to compile with -g if you want line-by-line info with quantify.
179 PURE =
180 #PURE = purify
181 #PURE = quantify
183 # Define EXE as .exe for MS-DOS and derivatives.
184 EXE =
185 #EXE = .exe
187 # End of the configuration section.
188 #---------------------------------------------------------------------------
190 MFLAG = -DMNEMOSYNE
191 MNEMLIB = ../mnemosyne/libmnem.a
193 DDWDIR = .
194 IDIR = $(DDWDIR)/include
195 INCLUDE = -I$(IDIR)
197 BDIRS = cudd dddmp mtr st util epd
198 DIRS = $(BDIRS) nanotrav
200 #------------------------------------------------------------------------
202 .PHONY : build
203 .PHONY : nanotrav
204 .PHONY : check_leaks
205 .PHONY : optimize_dec
206 .PHONY : testcudd
207 .PHONY : libobj
208 .PHONY : testobj
209 .PHONY : testdddmp
210 .PHONY : testmtr
211 .PHONY : lint
212 .PHONY : all
213 .PHONY : clean
214 .PHONY : distclean
217 build:
218 sh ./setup.sh
219 @for dir in $(DIRS); do \
220 (cd $$dir; \
221 echo Making $$dir ...; \
222 make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
223 done
225 nanotrav: build
227 check_leaks:
228 sh ./setup.sh
229 @for dir in mnemosyne $(DIRS); do \
230 (cd $$dir; \
231 echo Making $$dir ...; \
232 make CC=$(CC) RANLIB=$(RANLIB) MFLAG=$(MFLAG) MNEMLIB=$(MNEMLIB) ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" EXE="$(EXE)" )\
233 done
235 optimize_dec:
236 sh ./setup.sh
237 @for dir in $(DIRS); do \
238 (cd $$dir; \
239 echo Making $$dir ...; \
240 make CC=$(CC) RANLIB=$(RANLIB) XCFLAGS="$(XCFLAGS)" LDFLAGS="$(LDFLAGS)" optimize_dec )\
241 done
243 lint:
244 sh ./setup.sh
245 @for dir in $(DIRS) obj; do \
246 (cd $$dir; \
247 echo Making lint in $$dir ...; \
248 make CC=$(CC) lint )\
249 done
251 tags:
252 sh ./setup.sh
253 @for dir in $(DIRS) obj; do \
254 (cd $$dir; \
255 echo Making tags in $$dir ...; \
256 make CC=$(CC) tags )\
257 done
259 all:
260 sh ./setup.sh
261 @for dir in $(DIRS); do \
262 (cd $$dir; \
263 echo Making all in $$dir ...; \
264 make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" all )\
265 done
267 libso:
268 sh ./setup.sh
269 @for dir in $(BDIRS); do \
270 (cd $$dir; \
271 echo Making all in $$dir ...; \
272 make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" libso )\
273 done
275 testcudd:
276 sh ./setup.sh
277 @for dir in util st mtr epd; do \
278 (cd $$dir; \
279 echo Making $$dir ...; \
280 make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
281 done
282 @(cd cudd; \
283 echo Making testcudd ...; \
284 make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testcudd$(EXE) )
286 objlib:
287 sh ./setup.sh
288 @for dir in $(BDIRS); do \
289 (cd $$dir; \
290 echo Making $$dir ...; \
291 make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
292 done
293 @(cd obj; \
294 echo Making obj ...; \
295 make CPP=$(CPP) CPPFLAGS=$(CPPFLAGS) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )
297 testobj: objlib
298 @(cd obj; \
299 echo Making testobj ...; \
300 make CPP=$(CPP) CPPFLAGS=$(CPPFLAGS) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testobj$(EXE) )
302 testdddmp: build
303 @(cd dddmp; \
304 echo Making testdddmp ...; \
305 make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testdddmp$(EXE) )
307 testmtr: build
308 @(cd mtr; \
309 echo Making testmtr ...; \
310 make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testmtr$(EXE) )
312 clean:
313 @for dir in mnemosyne $(DIRS) obj; do \
314 (cd $$dir; \
315 echo Cleaning $$dir ...; \
316 make -s clean ) \
317 done
319 distclean:
320 @for dir in mnemosyne $(DIRS) obj; do \
321 (cd $$dir; \
322 echo Cleaning $$dir ...; \
323 make -s EXE="$(EXE)" distclean ) \
324 done
325 sh ./shutdown.sh