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.

115 lines
2.6 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
  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. #### End of system configuration section. ####
  28. SHELL = /bin/sh
  29. # Needed by $(LIBTOOL).
  30. top_builddir = ..
  31. VPATH = $(srcdir)
  32. FILES_CC := $(notdir $(wildcard $(srcdir)/*.cc))
  33. FILES_CC := $(filter-out %.i.cc, $(FILES_CC))
  34. FILES_I_CC := $(patsubst %.cc,%.i.cc,$(FILES_CC))
  35. FILES_S := $(patsubst %.cc,%.s,$(FILES_CC))
  36. FILES_O := $(patsubst %.cc,%.o,$(FILES_CC))
  37. OBJECTS = $(FILES_O)
  38. LIBS = ../src/libcln.la -lm
  39. LIBDEPS = ../src/libcln.la
  40. PROGRAMS = contfrac e fibonacci legendre lucaslehmer nextprime perfnum pi
  41. MODULES_contfrac = contfrac
  42. MODULES_e = e
  43. MODULES_fibonacci = fibonacci
  44. MODULES_legendre = legendre
  45. MODULES_lucaslehmer = lucaslehmer
  46. MODULES_nextprime = nextprime
  47. MODULES_perfnum = perfnum
  48. MODULES_pi = pi
  49. all : contfrac e fibonacci legendre lucaslehmer nextprime perfnum pi
  50. %.s : %.c
  51. $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -S $< -o $@
  52. %.s : %.cc
  53. $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -S $< -o $@
  54. %.o : %.c
  55. $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
  56. %.o : %.cc
  57. $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
  58. %.i : %.c
  59. $(CPP) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $< > $@
  60. %.i.cc : %.cc
  61. $(CXXCPP) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $< > $@
  62. contfrac : $(patsubst %,%.o,$(MODULES_contfrac))
  63. e : $(patsubst %,%.o,$(MODULES_e))
  64. fibonacci : $(patsubst %,%.o,$(MODULES_fibonacci))
  65. legendre : $(patsubst %,%.o,$(MODULES_legendre))
  66. lucaslehmer : $(patsubst %,%.o,$(MODULES_lucaslehmer))
  67. nextprime : $(patsubst %,%.o,$(MODULES_nextprime))
  68. perfnum : $(patsubst %,%.o,$(MODULES_perfnum))
  69. pi : $(patsubst %,%.o,$(MODULES_pi))
  70. $(PROGRAMS) : % : $(LIBDEPS)
  71. $(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) $(TARGET_ARCH) $(patsubst %,%.o,$(MODULES_$(*F))) $(LDFLAGS) $(LIBS) -o $@
  72. install : all
  73. installdirs :
  74. uninstall :
  75. check : all
  76. mostlyclean : clean
  77. clean : force
  78. $(RM) *.s *.o *.a $(PROGRAMS) a.out core
  79. $(RM) -r .libs _libs
  80. distclean : clean
  81. $(RM) config.status config.log config.cache Makefile
  82. maintainer-clean : distclean
  83. force :