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.

112 lines
2.6 KiB

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. 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
  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. all : contfrac e fibonacci legendre lucaslehmer nextprime perfnum
  48. %.s : %.c
  49. $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -S $< -o $@
  50. %.s : %.cc
  51. $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -S $< -o $@
  52. %.o : %.c
  53. $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
  54. %.o : %.cc
  55. $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
  56. %.i : %.c
  57. $(CPP) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $< > $@
  58. %.i.cc : %.cc
  59. $(CXXCPP) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $< > $@
  60. contfrac : $(patsubst %,%.o,$(MODULES_contfrac))
  61. e : $(patsubst %,%.o,$(MODULES_e))
  62. fibonacci : $(patsubst %,%.o,$(MODULES_fibonacci))
  63. legendre : $(patsubst %,%.o,$(MODULES_legendre))
  64. lucaslehmer : $(patsubst %,%.o,$(MODULES_lucaslehmer))
  65. nextprime : $(patsubst %,%.o,$(MODULES_nextprime))
  66. perfnum : $(patsubst %,%.o,$(MODULES_perfnum))
  67. $(PROGRAMS) : % : $(LIBDEPS)
  68. $(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) $(TARGET_ARCH) $(patsubst %,%.o,$(MODULES_$(*F))) $(LDFLAGS) $(LIBS) -o $@
  69. install : all
  70. installdirs :
  71. uninstall :
  72. check : all
  73. mostlyclean : clean
  74. clean : force
  75. $(RM) *.s *.o *.a $(PROGRAMS) a.out core
  76. $(RM) -r .libs _libs
  77. distclean : clean
  78. $(RM) config.status config.log config.cache Makefile
  79. maintainer-clean : distclean
  80. force :