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.

116 lines
2.8 KiB

25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
  1. # Makefile for cln/examples
  2. # This is only needed while CLN has not been installed in a public place on
  3. # your system (such as /usr/local/include and /usr/local/lib). Once CLN is
  4. # installed, a simple C++ compiler command suffices.
  5. #### Start of system configuration section. ####
  6. # Directories used by "make":
  7. srcdir = @srcdir@
  8. top_srcdir = @top_srcdir@
  9. # Programs used by "make":
  10. # C compiler
  11. CC = @CC@
  12. CFLAGS = @CFLAGS@
  13. CPP = @CPP@
  14. CPPFLAGS = @CPPFLAGS@
  15. # C++ compiler
  16. CXX = @CXX@
  17. CXXFLAGS = @CXXFLAGS@
  18. CXXCPP = @CXXCPP@
  19. INCLUDES = -I../include -I${top_srcdir}/include -I${srcdir}
  20. override CPPFLAGS += ${INCLUDES}
  21. LIBTOOL = @LIBTOOL@
  22. LIBTOOL_LINK = ${LIBTOOL} --mode=link
  23. MV = mv
  24. LN = ln
  25. RM = rm -f
  26. @SET_MAKE@
  27. EXEEXT = @EXEEXT@
  28. #### End of system configuration section. ####
  29. SHELL = /bin/sh
  30. # Needed by ${LIBTOOL}.
  31. top_builddir = ..
  32. VPATH = ${srcdir}
  33. FILES_CC := $(notdir $(wildcard ${srcdir}/*.cc))
  34. FILES_CC := $(filter-out %.i.cc, ${FILES_CC})
  35. FILES_I_CC := $(patsubst %.cc,%.i.cc,${FILES_CC})
  36. FILES_S := $(patsubst %.cc,%.s,${FILES_CC})
  37. FILES_O := $(patsubst %.cc,%.o,${FILES_CC})
  38. OBJECTS = ${FILES_O}
  39. LIBS = ../src/libcln.la -lm
  40. LIBDEPS = ../src/libcln.la
  41. PROGRAMS = $(addsuffix ${EXEEXT},contfrac e fibonacci legendre lucaslehmer nextprime perfnum pi)
  42. MODULES_contfrac = contfrac
  43. MODULES_e = e
  44. MODULES_fibonacci = fibonacci
  45. MODULES_legendre = legendre
  46. MODULES_lucaslehmer = lucaslehmer
  47. MODULES_nextprime = nextprime
  48. MODULES_perfnum = perfnum
  49. MODULES_pi = pi
  50. all : $(addsuffix ${EXEEXT}, contfrac e fibonacci legendre lucaslehmer nextprime perfnum pi)
  51. %.s : %.c
  52. ${CC} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -S $< -o $@
  53. %.s : %.cc
  54. ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -S $< -o $@
  55. %.o : %.c
  56. ${CC} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -c $< -o $@
  57. %.o : %.cc
  58. ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -c $< -o $@
  59. %.i : %.c
  60. ${CPP} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} $< > $@
  61. %.i.cc : %.cc
  62. ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} $< > $@
  63. contfrac${EXEEXT} : $(patsubst %,%.o,${MODULES_contfrac})
  64. e${EXEEXT} : $(patsubst %,%.o,${MODULES_e})
  65. fibonacci${EXEEXT} : $(patsubst %,%.o,${MODULES_fibonacci})
  66. legendre${EXEEXT} : $(patsubst %,%.o,${MODULES_legendre})
  67. lucaslehmer${EXEEXT} : $(patsubst %,%.o,${MODULES_lucaslehmer})
  68. nextprime${EXEEXT} : $(patsubst %,%.o,${MODULES_nextprime})
  69. perfnum${EXEEXT} : $(patsubst %,%.o,${MODULES_perfnum})
  70. pi${EXEEXT} : $(patsubst %,%.o,${MODULES_pi})
  71. ${PROGRAMS} : %${EXEEXT} : ${LIBDEPS}
  72. ${LIBTOOL_LINK} ${CXX} ${CXXFLAGS} ${TARGET_ARCH} $(patsubst %,%.o,$(MODULES_$(*F))) ${LDFLAGS} ${LIBS} -o $@
  73. install : all
  74. installdirs :
  75. uninstall :
  76. check : all
  77. mostlyclean : clean
  78. clean : force
  79. ${RM} *.s *.o *.a ${PROGRAMS} a.out core
  80. ${RM} -r .libs _libs
  81. distclean : clean
  82. ${RM} config.status config.log config.cache Makefile
  83. maintainer-clean : distclean
  84. force :