source: icGREP/icgrep-devel/cudd-2.5.1/Makefile @ 6055

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

Upload of the CUDD library.

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