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.

124 lines
3.2 KiB

  1. # $Id$
  2. #
  3. # Cudd - DD package
  4. #---------------------------
  5. .SUFFIXES: .o .c .u
  6. CC = gcc
  7. RANLIB = ranlib
  8. PURE =
  9. # Define EXE as .exe for MS-DOS and derivatives.
  10. EXE =
  11. #EXE = .exe
  12. MFLAG =
  13. ICFLAGS = -g
  14. XCFLAGS = -DDD_STATS
  15. CFLAGS = $(ICFLAGS) $(MFLAG) $(XCFLAGS)
  16. #DDDEBUG = -DDD_DEBUG -DDD_CACHE_PROFILE -DDD_VERBOSE -DDD_UNIQUE_PROFILE
  17. DDDEBUG =
  18. LINTFLAGS = -u -n -DDD_STATS -DDD_CACHE_PROFILE -DDD_VERBOSE -DDD_DEBUG -DDD_UNIQUE_PROFILE
  19. # this is to create the lint library
  20. LINTSWITCH = -o
  21. WHERE = ..
  22. INCLUDE = $(WHERE)/include
  23. LIBS = ./libcudd.a $(WHERE)/mtr/libmtr.a \
  24. $(WHERE)/st/libst.a $(WHERE)/util/libutil.a $(WHERE)/epd/libepd.a
  25. MNEMLIB =
  26. BLIBS = -kL. -klcudd -kL$(WHERE)/mtr -klmtr \
  27. -kL$(WHERE)/st -klst -kL$(WHERE)/util -klutil -kL$(WHERE)/epd -klepd
  28. LINTLIBS = ./llib-lcudd.ln $(WHERE)/mtr/llib-lmtr.ln \
  29. $(WHERE)/st/llib-lst.ln $(WHERE)/util/llib-lutil.ln \
  30. $(WHERE)/epd/llib-lepd.ln
  31. LDFLAGS =
  32. # files for the package
  33. P = cudd
  34. PSRC = cuddAPI.c cuddAddAbs.c cuddAddApply.c cuddAddFind.c cuddAddIte.c \
  35. cuddAddInv.c cuddAddNeg.c cuddAddWalsh.c cuddAndAbs.c \
  36. cuddAnneal.c cuddApa.c cuddApprox.c cuddBddAbs.c cuddBddCorr.c \
  37. cuddBddIte.c cuddBridge.c cuddCache.c cuddCheck.c cuddClip.c \
  38. cuddCof.c cuddCompose.c cuddDecomp.c cuddEssent.c \
  39. cuddExact.c cuddExport.c cuddGenCof.c cuddGenetic.c \
  40. cuddGroup.c cuddHarwell.c cuddInit.c cuddInteract.c \
  41. cuddLCache.c cuddLevelQ.c \
  42. cuddLinear.c cuddLiteral.c cuddMatMult.c cuddPriority.c \
  43. cuddRead.c cuddRef.c cuddReorder.c cuddSat.c cuddSign.c \
  44. cuddSolve.c cuddSplit.c cuddSubsetHB.c cuddSubsetSP.c cuddSymmetry.c \
  45. cuddTable.c cuddUtil.c cuddWindow.c cuddZddCount.c cuddZddFuncs.c \
  46. cuddZddGroup.c cuddZddIsop.c cuddZddLin.c cuddZddMisc.c \
  47. cuddZddPort.c cuddZddReord.c cuddZddSetop.c cuddZddSymm.c \
  48. cuddZddUtil.c
  49. PHDR = cudd.h cuddInt.h
  50. POBJ = $(PSRC:.c=.o)
  51. PUBJ = $(PSRC:.c=.u)
  52. TARGET = test$(P)$(EXE)
  53. TARGETu = test$(P)-u
  54. # files for the test program
  55. SRC = test$(P).c
  56. OBJ = $(SRC:.c=.o)
  57. UBJ = $(SRC:.c=.u)
  58. #------------------------------------------------------
  59. lib$(P).a: $(POBJ)
  60. ar rv $@ $?
  61. $(RANLIB) $@
  62. .c.o: $(PSRC) $(PHDR)
  63. $(CC) -c $< -I$(INCLUDE) $(CFLAGS) $(DDDEBUG)
  64. optimize_dec: lib$(P).b
  65. lib$(P).b: $(PUBJ)
  66. ar rv $@ $?
  67. $(RANLIB) $@
  68. .c.u: $(PSRC) $(PHDR)
  69. cc -j $< -I$(INCLUDE) $(XCFLAGS)
  70. # if the header files change, recompile
  71. $(POBJ): $(PHDR)
  72. $(PUBJ): $(PHDR)
  73. $(OBJ): $(PHDR)
  74. $(UBJ): $(PHDR)
  75. $(TARGET): $(SRC) $(OBJ) $(HDR) $(LIBS) $(MNEMLIB)
  76. $(PURE) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(MNEMLIB) -lm
  77. # optimize (DECstations and Alphas only: uses u-code)
  78. $(TARGETu): $(SRC) $(UBJ) $(HDR) $(LIBS:.a=.b)
  79. $(CC) -O3 -Olimit 1000 $(XCFLAGS) $(LDFLAGS) -o $@ $(UBJ) $(BLIBS) -lm
  80. lint: llib-l$(P).ln
  81. llib-l$(P).ln: $(PSRC) $(PHDR)
  82. lint $(LINTFLAGS) $(LINTSWITCH)$(P) -I$(INCLUDE) $(PSRC)
  83. lintpgm: lint
  84. lint $(LINTFLAGS) -I$(INCLUDE) $(SRC) $(LINTLIBS)
  85. tags: $(PSRC) $(PHDR)
  86. ctags $(PSRC) $(PHDR)
  87. all: lib$(P).a lib$(P).b llib-l$(P).ln tags
  88. programs: $(TARGET) $(TARGETu) lintpgm
  89. clean:
  90. rm -f *.o *.u mon.out gmon.out *.pixie *.Addrs *.Counts mnem.* \
  91. .pure core *.warnings
  92. distclean: clean
  93. rm -f $(TARGET) $(TARGETu) lib*.a lib$(P).b llib-l$(P).ln \
  94. *.bak *~ tags .gdb_history *.qv *.qx