You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

323 lines
11 KiB

  1. # $Id$
  2. #
  3. # Makefile for the CUDD distribution kit
  4. #---------------------------------------------------------------------------
  5. # Beginning of the configuration section. These symbol definitions can
  6. # be overridden from the command line.
  7. # C++ compiler
  8. #CXX = g++
  9. #CXX = icpc
  10. #CXX = ecpc
  11. #CXX = CC
  12. #CXX = /usr/local/opt/SUNWspro/bin/CC
  13. #CXX = cxx
  14. CXX = clang++
  15. # Specific options for compilation of C++ files.
  16. CXXFLAGS = -std=c++11 -stdlib=libc++
  17. # Stricter standard conformance for g++.
  18. #CXXFLAGS = -std=c++98
  19. # For Sun CC version 5, this invokes compatibility mode.
  20. #CXXFLAGS = -compat
  21. # On some versions of UP-UX, it is necessary to pass the option +a1
  22. # to CC for the C++ test program to compile successfully.
  23. #CXXFLAGS = +a1
  24. # C compiler used for all targets except optimize_dec, which always uses cc.
  25. #CC = cc
  26. #CC = /usr/local/opt/SUNWspro/bin/cc
  27. #CC = gcc
  28. #CC = icc
  29. #CC = ecc
  30. #CC = /usr/ucb/cc
  31. #CC = c89
  32. #CC = $(CXX)
  33. CC = clang
  34. # On some machines ranlib is either non-existent or redundant.
  35. # Use the following definition if your machine has ranlib and you think
  36. # it is needed.
  37. RANLIB = ranlib
  38. # Use the following definition if your machine either does not have
  39. # ranlib (e.g., SUN running solaris) or can do without it (e.g., DEC Alpha).
  40. #RANLIB = :
  41. # Use ICFLAGS to specify machine-independent compilation flags.
  42. # These three are typical settings for cc.
  43. #ICFLAGS = -g
  44. #ICFLAGS = -O
  45. #ICFLAGS =
  46. # These two are typical settings for optimized code with gcc.
  47. #ICFLAGS = -g -O3 -Wall
  48. ICFLAGS = -O4
  49. # Use XCFLAGS to specify machine-dependent compilation flags.
  50. # For some platforms no special flags are needed.
  51. #XCFLAGS = -DHAVE_IEEE_754 -DBSD
  52. #
  53. #==========================
  54. # Linux
  55. #
  56. # Gcc 4.2.4 or higher on i686.
  57. XCFLAGS = -arch x86_64 -DHAVE_IEEE_754 -DBSD -DSIZEOF_VOID_P=8 -DSIZEOF_LONG=8
  58. # Gcc 3.2.2 or higher on i686.
  59. #XCFLAGS = -mtune=pentium4 -malign-double -DHAVE_IEEE_754 -DBSD
  60. # Gcc 2.8.1 on i686.
  61. #XCFLAGS = -mcpu=pentiumpro -malign-double -DHAVE_IEEE_754 -DBSD
  62. # Gcc 4.2.4 or higher on x86_64 (64-bit compilation)
  63. #XCFLAGS = -mtune=native -DHAVE_IEEE_754 -DBSD -DSIZEOF_VOID_P=8 -DSIZEOF_LONG=8
  64. # Gcc 4.2.4 or higher on x86_64 (32-bit compilation)
  65. #XCFLAGS = -m32 -mtune=native -malign-double -DHAVE_IEEE_754 -DBSD
  66. # Icc on i686 (older versions may not support -xHost).
  67. #XCFLAGS = -ansi -xHost -align -ip -DHAVE_IEEE_754 -DBSD
  68. # Icc on x86_64 (64-bit compilation).
  69. #XCFLAGS = -ansi -xHost -align -ip -DHAVE_IEEE_754 -DBSD -DSIZEOF_VOID_P=8 -DSIZEOF_LONG=8
  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
  74. #
  75. #==========================
  76. # Solaris
  77. #
  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
  95. #
  96. #==========================
  97. # DEC Alphas running Digital Unix
  98. #
  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.
  114. #
  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
  125. #
  126. #==========================
  127. #
  128. # IBM RS6000
  129. #
  130. # For the IBM RS6000 -qstrict is necessary when specifying -O3 with cc.
  131. #XCFLAGS = -DBSD -DHAVE_IEEE_754 -DEPD_BIG_ENDIAN -O3 -qstrict
  132. #
  133. #==========================
  134. #
  135. # HP-UX
  136. #
  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
  142. #
  143. #==========================
  144. #
  145. # Windows 95/98/NT/XP/Vista/7 with Cygwin tools
  146. #
  147. # The value of RLIMIT_DATA_DEFAULT should reflect the amount of
  148. # available memory (expressed in bytes).
  149. # Recent versions of cygwin have getrlimit, but the datasize limit
  150. # cannot be set.
  151. #XCFLAGS = -mtune=native -malign-double -DHAVE_IEEE_754 -DHAVE_GETRLIMIT=0 -DRLIMIT_DATA_DEFAULT=268435456
  152. # Define the level of self-checking and verbosity of the CUDD package.
  153. #DDDEBUG = -DDD_DEBUG -DDD_VERBOSE -DDD_STATS -DDD_CACHE_PROFILE -DDD_UNIQUE_PROFILE -DDD_COUNT
  154. DDDEBUG =
  155. # Define the level of self-checking and verbosity of the MTR package.
  156. #MTRDEBUG = -DMTR_DEBUG
  157. MTRDEBUG =
  158. # Loader options.
  159. LDFLAGS =
  160. # This may produce faster code on the DECstations.
  161. #LDFLAGS = -jmpopt -Olimit 1000
  162. # This may be necessary under some old versions of Linux.
  163. #LDFLAGS = -static
  164. # This normally makes the program faster on the DEC Alphas.
  165. #LDFLAGS = -non_shared -om
  166. # This is for 32-bit pointers on the DEC Alphas.
  167. #LDFLAGS = -non_shared -om -taso
  168. #LDFLAGS = -non_shared -taso
  169. # Define PURE as purify to link with purify.
  170. # Define PURE as quantify to link with quantify.
  171. # Remember to compile with -g if you want line-by-line info with quantify.
  172. PURE =
  173. #PURE = purify
  174. #PURE = quantify
  175. # Define EXE as .exe for MS-DOS and derivatives. Not required by recent
  176. # versions of cygwin.
  177. EXE =
  178. #EXE = .exe
  179. # End of the configuration section.
  180. #---------------------------------------------------------------------------
  181. MFLAG = -DMNEMOSYNE
  182. MNEMLIB = ../mnemosyne/libmnem.a
  183. DDWDIR = .
  184. IDIR = $(DDWDIR)/include
  185. INCLUDE = -I$(IDIR)
  186. BDIRS = cudd dddmp mtr st util epd obj
  187. DIRS = $(BDIRS)
  188. #------------------------------------------------------------------------
  189. .PHONY : build
  190. .PHONY : nanotrav
  191. .PHONY : check_leaks
  192. .PHONY : optimize_dec
  193. .PHONY : testcudd
  194. .PHONY : libobj
  195. .PHONY : testobj
  196. .PHONY : testdddmp
  197. .PHONY : testmtr
  198. .PHONY : lint
  199. .PHONY : all
  200. .PHONY : clean
  201. .PHONY : distclean
  202. build:
  203. sh ./setup.sh
  204. @for dir in $(DIRS); do \
  205. (cd $$dir; \
  206. echo Making $$dir ...; \
  207. make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
  208. done
  209. nanotrav: build
  210. check_leaks:
  211. sh ./setup.sh
  212. @for dir in mnemosyne $(DIRS); do \
  213. (cd $$dir; \
  214. echo Making $$dir ...; \
  215. make CC=$(CC) RANLIB=$(RANLIB) MFLAG=$(MFLAG) MNEMLIB=$(MNEMLIB) ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" EXE="$(EXE)" )\
  216. done
  217. optimize_dec:
  218. sh ./setup.sh
  219. @for dir in $(DIRS); do \
  220. (cd $$dir; \
  221. echo Making $$dir ...; \
  222. make CC=$(CC) RANLIB=$(RANLIB) XCFLAGS="$(XCFLAGS)" LDFLAGS="$(LDFLAGS)" optimize_dec )\
  223. done
  224. lint:
  225. sh ./setup.sh
  226. @for dir in $(DIRS) obj; do \
  227. (cd $$dir; \
  228. echo Making lint in $$dir ...; \
  229. make CC=$(CC) lint )\
  230. done
  231. tags:
  232. sh ./setup.sh
  233. @for dir in $(DIRS) obj; do \
  234. (cd $$dir; \
  235. echo Making tags in $$dir ...; \
  236. make CC=$(CC) tags )\
  237. done
  238. all:
  239. sh ./setup.sh
  240. @for dir in $(DIRS); do \
  241. (cd $$dir; \
  242. echo Making all in $$dir ...; \
  243. make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" all )\
  244. done
  245. testcudd:
  246. sh ./setup.sh
  247. @for dir in util st mtr epd; do \
  248. (cd $$dir; \
  249. echo Making $$dir ...; \
  250. make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
  251. done
  252. @(cd cudd; \
  253. echo Making testcudd ...; \
  254. make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testcudd$(EXE) )
  255. objlib:
  256. sh ./setup.sh
  257. @for dir in $(BDIRS); do \
  258. (cd $$dir; \
  259. echo Making $$dir ...; \
  260. make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
  261. done
  262. @(cd obj; \
  263. echo Making obj ...; \
  264. make CXX=$(CXX) CXXFLAGS=$(CXXFLAGS) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )
  265. testobj: objlib
  266. @(cd obj; \
  267. echo Making testobj ...; \
  268. 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) )
  269. testdddmp: build
  270. @(cd dddmp; \
  271. echo Making testdddmp ...; \
  272. make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testdddmp$(EXE) )
  273. testmtr: build
  274. @(cd mtr; \
  275. echo Making testmtr ...; \
  276. make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testmtr$(EXE) )
  277. clean:
  278. @for dir in mnemosyne $(DIRS) obj; do \
  279. (cd $$dir; \
  280. echo Cleaning $$dir ...; \
  281. make -s clean ) \
  282. done
  283. distclean:
  284. @for dir in mnemosyne $(DIRS) obj; do \
  285. (cd $$dir; \
  286. echo Cleaning $$dir ...; \
  287. make -s EXE="$(EXE)" distclean ) \
  288. done
  289. sh ./shutdown.sh