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.

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