makefile 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. #
  2. #
  3. # Makefile for Meschach for GNU cc
  4. #
  5. # Copyright (C) David Stewart & Zbigniew Leyk 1993
  6. #
  7. # $Id: $
  8. #
  9. srcdir = .
  10. VPATH = .
  11. CC = gcc
  12. DEFS = -DHAVE_CONFIG_H
  13. LIBS = -lm
  14. RANLIB = ranlib
  15. CFLAGS = -O6
  16. .c.o:
  17. $(CC) -c $(CFLAGS) $(DEFS) $<
  18. SHELL = /bin/sh
  19. MES_PAK = mesch12a
  20. TAR = tar
  21. SHAR = stree -u
  22. ZIP = zip -r -l
  23. ###############################
  24. LIST1 = copy.o err.o matrixio.o memory.o vecop.o matop.o pxop.o \
  25. submat.o init.o otherio.o machine.o matlab.o ivecop.o version.o \
  26. meminfo.o memstat.o
  27. LIST2 = lufactor.o bkpfacto.o chfactor.o qrfactor.o solve.o hsehldr.o \
  28. givens.o update.o norm.o hessen.o symmeig.o schur.o svd.o fft.o \
  29. mfunc.o bdfactor.o
  30. LIST3 = sparse.o sprow.o sparseio.o spchfctr.o splufctr.o \
  31. spbkp.o spswap.o iter0.o itersym.o iternsym.o
  32. ZLIST1 = zmachine.o zcopy.o zmatio.o zmemory.o zvecop.o zmatop.o znorm.o \
  33. zfunc.o
  34. ZLIST2 = zlufctr.o zsolve.o zmatlab.o zhsehldr.o zqrfctr.o \
  35. zgivens.o zhessen.o zschur.o
  36. # they are no longer supported
  37. # if you use them add oldpart to all and sparse
  38. OLDLIST = conjgrad.o lanczos.o arnoldi.o
  39. ALL_LISTS = $(LIST1) $(LIST2) $(LIST3) $(ZLIST1) $(ZLIST2) $(OLDLIST)
  40. HLIST = err.h iter.h machine.h matlab.h matrix.h matrix2.h \
  41. meminfo.h oldnames.h sparse.h sparse2.h \
  42. zmatrix.h zmatrix2.h
  43. TORTURE = torture.o sptort.o ztorture.o memtort.o itertort.o \
  44. mfuntort.o iotort.o
  45. OTHERS = dmacheps.c extras.c fmacheps.c maxint.c makefile.in \
  46. README configure configure.in machine.h.in copyright \
  47. tutorial.c tutadv.c rk4.dat ls.dat makefile
  48. # Different configurations
  49. all: part1 part2 part3 zpart1 zpart2
  50. basic: part1 part2
  51. sparse: part1 part2 part3
  52. complex: part1 part2 zpart1 zpart2
  53. HBASE = err.h meminfo.h machine.h matrix.h
  54. $(LIST1): $(HBASE)
  55. part1: $(LIST1)
  56. ar ru meschach.a $(LIST1); $(RANLIB) meschach.a
  57. $(LIST2): $(HBASE) matrix2.h
  58. part2: $(LIST2)
  59. ar ru meschach.a $(LIST2); $(RANLIB)
  60. $(LIST3): $(HBASE) sparse.h sparse2.h
  61. part3: $(LIST3)
  62. ar ru meschach.a $(LIST3); $(RANLIB) meschach.a
  63. $(ZLIST1): $(HBASDE) zmatrix.h
  64. zpart1: $(ZLIST1)
  65. ar ru meschach.a $(ZLIST1); $(RANLIB) meschach.a
  66. $(ZLIST2): $(HBASE) zmatrix.h zmatrix2.h
  67. zpart2: $(ZLIST2)
  68. ar ru meschach.a $(ZLIST2); $(RANLIB) meschach.a
  69. $(OLDLIST): $(HBASE) sparse.h sparse2.h
  70. oldpart: $(OLDLIST)
  71. ar ru meschach.a $(OLDLIST); $(RANLIB) meschach.a
  72. #######################################
  73. tar:
  74. - /bin/rm -f $(MES_PAK).tar
  75. chmod 644 `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
  76. $(OTHERS) $(HLIST) `echo $(TORTURE) | sed -e 's/\.o/.c/g'`
  77. chmod 755 configure
  78. $(TAR) cvf $(MES_PAK).tar \
  79. `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
  80. $(HLIST) $(OTHERS) \
  81. `echo $(TORTURE) | sed -e 's/\.o/.c/g'` \
  82. MACHINES DOC
  83. # use this only for PC machines
  84. msdos-zip:
  85. - /bin/rm -f $(MES_PAK).zip
  86. chmod 644 `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
  87. $(OTHERS) $(HLIST) `echo $(TORTURE) | sed -e 's/\.o/.c/g'`
  88. chmod 755 configure
  89. $(ZIP) $(MES_PAK).zip \
  90. `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
  91. $(HLIST) $(OTHERS) `echo $(TORTURE) | sed -e 's/\.o/.c/g'` \
  92. MACHINES DOC
  93. fullshar:
  94. - /bin/rm -f $(MES_PAK).shar;
  95. chmod 644 `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
  96. $(OTHERS) $(HLIST) `echo $(TORTURE) | sed -e 's/\.o/.c/g'`
  97. chmod 755 configure
  98. $(SHAR) `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
  99. $(HLIST) $(OTHERS) `echo $(TORTURE) | sed -e 's/\.o/.c/g'` \
  100. MACHINES DOC > $(MES_PAK).shar
  101. shar:
  102. - /bin/rm -f meschach1.shar meschach2.shar meschach3.shar \
  103. meschach4.shar oldmeschach.shar meschach0.shar
  104. chmod 644 `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
  105. $(OTHERS) $(HLIST) `echo $(TORTURE) | sed -e 's/\.o/.c/g'`
  106. chmod 755 configure
  107. $(SHAR) `echo $(LIST1) | sed -e 's/\.o/.c/g'` > meschach1.shar
  108. $(SHAR) `echo $(LIST2) | sed -e 's/\.o/.c/g'` > meschach2.shar
  109. $(SHAR) `echo $(LIST3) | sed -e 's/\.o/.c/g'` > meschach3.shar
  110. $(SHAR) `echo $(ZLIST1) | sed -e 's/\.o/.c/g'` \
  111. `echo $(ZLIST2) | sed -e 's/\.o/.c/g'` > meschach4.shar
  112. $(SHAR) `echo $(OLDLIST) | sed -e 's/\.o/.c/g'` > oldmeschach.shar
  113. $(SHAR) $(OTHERS) `echo $(TORTURE) | sed -e 's/\.o/.c/g'` \
  114. $(HLIST) DOC MACHINES > meschach0.shar
  115. clean:
  116. /bin/rm -f *.o core asx5213a.mat iotort.dat
  117. cleanup:
  118. /bin/rm -f *.o core asx5213a.mat iotort.dat *.a
  119. alltorture: torture sptort ztorture memtort itertort mfuntort iotort
  120. torture:torture.o meschach.a
  121. $(CC) $(CFLAGS) $(DEFS) -o torture torture.o \
  122. meschach.a $(LIBS)
  123. sptort:sptort.o meschach.a
  124. $(CC) $(CFLAGS) $(DEFS) -o sptort sptort.o \
  125. meschach.a $(LIBS)
  126. memtort: memtort.o meschach.a
  127. $(CC) $(CFLAGS) $(DEFS) -o memtort memtort.o \
  128. meschach.a $(LIBS)
  129. ztorture:ztorture.o meschach.a
  130. $(CC) $(CFLAGS) $(DEFS) -o ztorture ztorture.o \
  131. meschach.a $(LIBS)
  132. itertort: itertort.o meschach.a
  133. $(CC) $(CFLAGS) $(DEFS) -o itertort itertort.o \
  134. meschach.a $(LIBS)
  135. iotort: iotort.o meschach.a
  136. $(CC) $(CFLAGS) $(DEFS) -o iotort iotort.o \
  137. meschach.a $(LIBS)
  138. mfuntort: mfuntort.o meschach.a
  139. $(CC) $(CFLAGS) $(DEFS) -o mfuntort mfuntort.o \
  140. meschach.a $(LIBS)
  141. tstmove: tstmove.o meschach.a
  142. $(CC) $(CFLAGS) $(DEFS) -o tstmove tstmove.o \
  143. meschach.a $(LIBS)
  144. tstpxvec: tstpxvec.o meschach.a
  145. $(CC) $(CFLAGS) $(DEFS) -o tstpxvec tstpxvec.o \
  146. meschach.a $(LIBS)