Advertisement
Guest User

Untitled

a guest
Nov 7th, 2016
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.53 KB | None | 0 0
  1. HOMEL=$(PWD)
  2. TOP=../bin
  3. ## binary for install
  4. # DEBUG_OPTIONS= -g -pg
  5. ##DEBUG_OPTIONS= -g
  6. BIN=$(HOMEL)/../bin
  7. PERLDIR=$(HOMEL)/perlsrc
  8.  
  9. NLIB=$(HOMEL)/admixlib/nicklib.a
  10. IDIR=$(HOMEL)/admixinclude
  11.  
  12. VPATH=.:nicksrc
  13. DEBUG_OPTIONS= -g
  14.  
  15. CFLAGS= -c -g -p -I$(IDIR) -Wimplicit
  16. BLAS=openblas
  17. ###CC = gcc
  18.  
  19. OBJ=strsubs.o sortit.o vsubs.o statsubs.o linsubs.o getpars.o xsearch.o gauss.o gds.o
  20. ##TWTAB=\"$(HOMEL)/admixtables/twtable\"
  21.  
  22. statsubs.o: tables nicksrc/statsubs.c
  23. $(CC) $(CFLAGS) -o statsubs.o nicksrc/statsubs.c
  24.  
  25. QCC = -Wl,-Bdynamic -lgsl -Wl,-Bstatic -l$(BLAS) -Wl,-Bdynamic -lgfortran -lm
  26.  
  27. T2=dowtjack
  28. T20=dowtjack.o
  29.  
  30. M1=qpDstat
  31. M1O=qpDstat.o qpsubs.o mcio.o ldsubs.o admutils.o egsubs.o regsubs.o
  32.  
  33. M2=qp3Pop
  34. M2O=qp3Pop.o qpsubs.o mcio.o ldsubs.o admutils.o egsubs.o regsubs.o
  35.  
  36. M3=qpF4ratio
  37. M3O=qpF4ratio.o qpsubs.o mcio.o ldsubs.o admutils.o egsubs.o regsubs.o
  38.  
  39. M4=rolloff
  40. M4O=rolloff.o qpsubs.o mcio.o ldsubs.o admutils.o egsubs.o regsubs.o
  41.  
  42. M5=qpBound
  43. M5O=qpBound.o qpsubs.o mcio.o ldsubs.o admutils.o egsubs.o regsubs.o
  44.  
  45. M6=qpdslow
  46. M6O=qpdslow.o qpsubs.o mcio.o ldsubs.o admutils.o egsubs.o regsubs.o
  47.  
  48. M6B=qpdweight
  49. M6BO=qpdweight.o qpsubs.o mcio.o ldsubs.o admutils.o egsubs.o regsubs.o
  50.  
  51. M7=qpwest
  52. M7O=qpwest.o qpsubs.o mcio.o ldsubs.o admutils.o egsubs.o regsubs.o
  53.  
  54. M8=qpAdm
  55. M8O=qpAdm.o qpsubs.o mcio.o ldsubs.o admutils.o egsubs.o regsubs.o f4rank.o eigsubs.o eigx.o
  56.  
  57. M9=qpWave
  58. M9O=qpWave.o qpsubs.o mcio.o ldsubs.o admutils.o egsubs.o regsubs.o f4rank.o eigsubs.o eigx.o
  59. ## was qp4wave2
  60.  
  61.  
  62. M2=qp3Pop
  63. X1=convertf
  64. X1O=convertf.o mcio.o admutils.o egsubs.o h2d.o exclude.o
  65.  
  66. X2=grabpars
  67. X2O=grabpars.o
  68.  
  69. X3=contam1
  70. X3O=contam1.o qpsubs.o mcio.o ldsubs.o admutils.o egsubs.o regsubs.o
  71.  
  72. X4=mksamp1
  73. X4O=mksamp1.o qpsubs.o mcio.o admutils.o egsubs.o h2d.o exclude.o regsubs.o
  74.  
  75. X5=qpff3base
  76. X5O=qpff3base.o qpgsubs.o qpsubs.o mcio.o admutils.o egsubs.o regsubs.o ldsubs.o
  77.  
  78. X6=qpginv
  79. X6O=qpginv.o qpgsubs.o qpsubs.o mcio.o admutils.o egsubs.o regsubs.o ldsubs.o
  80.  
  81. expfit.sh: expfit.templ
  82. sed -e "s&BBBIN&$(BIN)&" < expfit.templ > expfit.sh
  83. chmod +x expfit.sh
  84.  
  85. IDIR=$(HOMEL)/admixinclude
  86. ##ISTR= -I$(HOME)/include -I/opt/nag/libC/include
  87.  
  88.  
  89. $(M1): nicklib $(M1O)
  90. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(M1) $(M1O) $(NLIB) -lm
  91.  
  92. $(M6): nicklib $(M6O)
  93. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(M6) $(M6O) $(NLIB)
  94.  
  95. $(M6B): nicklib $(M6BO)
  96. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(M6B) $(M6BO) $(NLIB) -lm
  97.  
  98. $(M7): nicklib $(M7O)
  99. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(M7) $(M7O) $(NLIB) -lm
  100.  
  101.  
  102. $(T2): nicklib $(T20)
  103. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(T2) $(T20) $(NLIB) -lm
  104.  
  105.  
  106.  
  107. $(M2): nicklib $(M2O)
  108. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(M2) $(M2O) $(NLIB) -lm
  109.  
  110. $(M3): nicklib $(M3O)
  111. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(M3) $(M3O) $(NLIB) -lm
  112.  
  113. $(M4): nicklib $(M4O)
  114. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(M4) $(M4O) $(NLIB) -lm
  115.  
  116. $(M5): nicklib $(M5O)
  117. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(M5) $(M5O) $(NLIB) -lm
  118.  
  119. $(X1): nicklib $(X1O)
  120. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(X1) $(X1O) $(NLIB) -lm
  121.  
  122. $(X2): nicklib $(X2O)
  123. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(X2) $(X2O) $(NLIB) -lm
  124.  
  125. $(X4): nicklib $(X4O)
  126. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(X4) $(X4O) $(NLIB) -lm
  127.  
  128. $(X5): nicklib $(X5O)
  129. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(X5) $(X5O) $(NLIB) -lm
  130.  
  131. $(X6): nicklib $(X6O)
  132. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(X6) $(X6O) $(NLIB) -lm
  133.  
  134.  
  135. $(M8): nicklib $(M8O)
  136. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -l$(BLAS) -fopenmp $(M8O) $(NLIB) -o $(M8) -lgsl -lgslcblas $(QCC)
  137.  
  138. $(M9): nicklib $(M9O)
  139. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -l$(BLAS) -fopenmp $(M9O) $(NLIB) -o $(M9) -lgsl -lgslcblas $(QCC)
  140.  
  141.  
  142.  
  143. PROGS= qp3Pop qpDstat qpF4ratio qpAdm qpWave rolloff convertf dowtjack expfit.sh grabpars qpBound qpGraph
  144. PROGS2 = rexpfit.r wtjack.pl
  145.  
  146. all: nicklib $(PROGS)
  147.  
  148. install: all tables
  149. mkdir -p $(TOP)
  150. cp $(PROGS) $(TOP)
  151. cp $(PROGS2) $(TOP)
  152.  
  153. uninstall:
  154. rm -f $(NLIB) tables
  155. rm -f $(TOP)/*
  156.  
  157.  
  158.  
  159. libnick.a: dirs tables $(OBJ)
  160. ar -r libnick.a $(OBJ)
  161. ranlib libnick.a
  162.  
  163. nicklib: dirs tables libnick.a
  164. cp libnick.a $(NLIB)
  165.  
  166.  
  167. tables:
  168. echo "tables made" > tables
  169. cp twtable $(HOMEL)/admixtables
  170.  
  171. dirs:
  172. mkdir -p $(HOMEL)/admixlib
  173. mkdir -p $(HOMEL)/admixtables
  174. mkdir -p $(HOMEL)/admixinclude
  175. mkdir -p $(BIN)
  176. cp *.h $(IDIR)
  177. cp nicksrc/*.h $(IDIR)
  178.  
  179. clean:
  180. rm -f *.o
  181. rm -f *junk*
  182. rm -f core
  183. rm -f libnick.a
  184. rm -f $(PROGS)
  185. rm -f nicksrc/*.o
  186.  
  187. clobber: clean rmdirs uninstall
  188.  
  189.  
  190. rmdirs:
  191. rm -rf $(HOMEL)/admixlib
  192. rm -rf $(HOMEL)/admixtables
  193. rm -rf $(HOMEL)/admixinclude
  194.  
  195. ISTR= -I$(HOMEL)/admixinclude
  196. CFLAGS= -c -g -p $(ISTR) -Wimplicit-int
  197.  
  198. ## gsl-config may help here
  199.  
  200. M9F2=qpGraph
  201. M9F2O=qpGraph.o gslqp.o qpgsubs.o qpsubs.o mcio.o ldsubs.o admutils.o egsubs.o regsubs.o
  202.  
  203. M9G=qpreroot
  204. M9GO=qpreroot.o qpgsubs.o qpsubs.o mcio.o ldsubs.o admutils.o egsubs.o regsubs.o
  205.  
  206.  
  207. $(M9F2): nicklib $(M9F2O)
  208. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -lopenblas -llapack -o $(M9F2) $(M9F2O) $(NLIB) -lm -lgsl -lgslcblas
  209.  
  210. $(M9G): $(M9GO)
  211. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(M9G) $(M9GO) $(NLIB) -lm
  212.  
  213. $(X3): nicklib $(X3O)
  214. gcc -include math.h -I$(IDIR) $(DEBUG_OPTIONS) -o $(X3) $(X3O) $(NLIB) -lm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement