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.

243 lines
6.9 KiB

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