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.

113 lines
2.5 KiB

  1. # $Id: Makefile,v 1.3 2001/03/19 07:34:37 fabio Exp fabio $
  2. #
  3. # obj: CUDD's C++ interface
  4. #---------------------------------------------------------------------------
  5. .SUFFIXES: .o .cc .u
  6. #CXX = g++
  7. CXX = clang++
  8. RANLIB = ranlib
  9. # Define EXE as .exe for MS-DOS and derivatives.
  10. PURE =
  11. EXE =
  12. #EXE = .exe
  13. MFLAG =
  14. #ICFLAGS = -g
  15. ICFLAGS =
  16. XCFLAGS =
  17. #CXXFLAGS =
  18. CXXFLAGS = -O3 -std=c++11 -stdlib=libc++
  19. CFLAGS = $(ICFLAGS) $(MFLAG) $(XCFLAGS) $(CXXFLAGS)
  20. DDDEBUG =
  21. LINTFLAGS = -u -n -DDD_STATS -DDD_CACHE_PROFILE -DDD_VERBOSE -DDD_DEBUG -DDD_UNIQUE_PROFILE
  22. # this is to create the lint library
  23. LINTSWITCH = -o
  24. WHERE = ..
  25. INCLUDE = $(WHERE)/include
  26. LIBS = ./libobj.a $(WHERE)/cudd/libcudd.a $(WHERE)/mtr/libmtr.a \
  27. $(WHERE)/st/libst.a $(WHERE)/util/libutil.a $(WHERE)/epd/libepd.a
  28. MNEMLIB =
  29. BLIBS = -kL. -klobj -kL$(WHERE)/cudd -klcudd -kL$(WHERE)/mtr -klmtr \
  30. -kL$(WHERE)/st -klst -kL$(WHERE)/util -klutil -kL$(WHERE)/epd -klepd
  31. LINTLIBS = ./llib-lobj.ln $(WHERE)/cudd/llib-lcudd.ln \
  32. $(WHERE)/mtr/llib-lmtr.ln $(WHERE)/st/llib-lst.ln \
  33. $(WHERE)/util/llib-lutil.ln $(WHERE)/epd/llib-lepd.ln
  34. LDFLAGS =
  35. # files for the package
  36. P = obj
  37. PSRC = cuddObj.cc
  38. PHDR = cuddObj.hh $(INCLUDE)/cudd.h
  39. POBJ = $(PSRC:.cc=.o)
  40. PUBJ = $(PSRC:.cc=.u)
  41. TARGET = test$(P)$(EXE)
  42. TARGETu = test$(P)-u
  43. # files for the test program
  44. SRC = test$(P).cc
  45. OBJ = $(SRC:.cc=.o)
  46. UBJ = $(SRC:.cc=.u)
  47. #------------------------------------------------------
  48. lib$(P).a: $(POBJ)
  49. ar rv $@ $?
  50. $(RANLIB) $@
  51. .cc.o: $(PHDR)
  52. $(CXX) -c $< -I$(INCLUDE) $(CFLAGS) $(DDDEBUG)
  53. optimize_dec: lib$(P).b
  54. lib$(P).b: $(PUBJ)
  55. ar rv $@ $?
  56. $(RANLIB) $@
  57. .cc.u: $(PHDR)
  58. cxx -j $< -I$(INCLUDE) $(CFLAGS)
  59. # if the header files change, recompile
  60. $(POBJ): $(PHDR)
  61. $(PUBJ): $(PHDR)
  62. $(OBJ): $(PHDR)
  63. $(UBJ): $(PHDR)
  64. $(TARGET): $(SRC) $(OBJ) $(HDR) $(LIBS) $(MNEMLIB)
  65. $(PURE) $(CXX) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(MNEMLIB) -lm
  66. # optimize (DECstations and Alphas only: uses u-code)
  67. $(TARGETu): $(SRC) $(UBJ) $(HDR) $(LIBS:.a=.b)
  68. cxx -O3 -Olimit 1000 $(XCFLAGS) $(LDFLAGS) -o $@ $(UBJ) $(BLIBS) -lm
  69. lint: llib-l$(P).ln
  70. llib-l$(P).ln: $(PSRC) $(PHDR)
  71. lint $(LINTFLAGS) $(LINTSWITCH)$(P) -I$(INCLUDE) $(PSRC)
  72. lintpgm: lint
  73. lint $(LINTFLAGS) -I$(INCLUDE) $(SRC) $(LINTLIBS)
  74. tags: $(PSRC) $(PHDR)
  75. ctags $(PSRC) $(PHDR)
  76. all: lib$(P).a lib$(P).b llib-l$(P).ln tags
  77. programs: $(TARGET) $(TARGETu) lintpgm
  78. clean:
  79. rm -f *.o *.u mon.out gmon.out *.pixie *.Addrs *.Counts mnem.* \
  80. .pure core *.warnings
  81. distclean: clean
  82. rm -f $(TARGET) $(TARGETu) lib*.a lib$(P).b llib-l$(P).ln \
  83. *.bak *~ tags .gdb_history *.qv *.qx