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.

127 lines
4.0 KiB

  1. diff --git a/Makefile.std b/Makefile.std
  2. index 95b0940..30206be 100644
  3. --- a/Makefile.std
  4. +++ b/Makefile.std
  5. @@ -1,62 +1,22 @@
  6. # General-purpose Makefile for PLINK 1.90
  7. #
  8. -# Compilation options:
  9. -# Do not link to LAPACK NO_LAPACK
  10. -# Leave blank after "=" to disable; put "= 1" to enable
  11. -# (when enabled, "#define NOLAPACK" must be uncommented in plink_common.h)
  12. -NO_LAPACK =
  13. -
  14. -
  15. -# should autodetect system
  16. -SYS = UNIX
  17. -ifdef SystemRoot
  18. - SYS = WIN
  19. -else
  20. - UNAME := $(shell uname)
  21. - ifeq ($(UNAME), Darwin)
  22. - SYS = MAC
  23. - endif
  24. -endif
  25. -
  26. -CFLAGS=-Wall -O2
  27. -BLASFLAGS=-L/usr/lib64/atlas -llapack -lcblas -latlas
  28. -LINKFLAGS=-lm -lpthread
  29. -ZLIB=zlib-1.2.8/libz.so.1.2.8
  30. -
  31. -ifeq ($(SYS), MAC)
  32. - GCC_GTEQ_43 := $(shell expr `g++ -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40300)
  33. - ifeq "$(GCC_GTEQ_43)" "1"
  34. - CFLAGS=-Wall -O2 -flax-vector-conversions
  35. - endif
  36. - BLASFLAGS=-framework Accelerate
  37. - LINKFLAGS=
  38. - ZLIB=zlib-1.2.8/libz.1.2.8.dylib
  39. -endif
  40. -
  41. -ifeq ($(SYS), WIN)
  42. -# Note that, unlike the Linux and Mac build processes, this STATICALLY links
  43. -# LAPACK, since we have not gotten around to trying dynamically-linked LAPACK
  44. -# on Windows.
  45. -# If you don't already have LAPACK built, you'll probably want to turn on
  46. -# NO_LAPACK.
  47. - BLASFLAGS=-L. lapack/liblapack.a -L. lapack/librefblas.a
  48. - LINKFLAGS=-lm -static-libgcc
  49. - ZLIB=zlib-1.2.8/libz.a
  50. -endif
  51. -
  52. -ifdef NO_LAPACK
  53. - BLASFLAGS=
  54. -endif
  55. +# CFLAGS=-Wall -O2
  56. +# BLASFLAGS=-lblas -llapack -latlas
  57. +LINKFLAGS=-lm -lpthread -lopenblas -llapack -latlas -lstdc++
  58. +ZLIB=-lz
  59. SRC = plink.c plink_assoc.c plink_calc.c plink_cluster.c plink_cnv.c plink_common.c plink_data.c plink_dosage.c plink_family.c plink_filter.c plink_glm.c plink_help.c plink_homozyg.c plink_lasso.c plink_ld.c plink_matrix.c plink_misc.c plink_set.c plink_stats.c SFMT.c dcdflib.c pigz.c yarn.c
  60. +OBJ = plink.o plink_assoc.o plink_calc.o plink_cluster.o plink_cnv.o plink_common.o plink_data.o plink_dosage.o plink_family.o plink_filter.o plink_glm.o plink_help.o plink_homozyg.o plink_lasso.o plink_ld.o plink_matrix.o plink_misc.o plink_set.o plink_stats.o SFMT.o dcdflib.o pigz.o yarn.o
  61. +
  62. # In the likely event that you are concurrently using PLINK 1.07, we suggest
  63. # either renaming that binary to "plink1" or this one to "plink2".
  64. -plink: $(SRC)
  65. - g++ $(CFLAGS) $(SRC) -o plink $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB)
  66. +# plink: $(SRC)
  67. +# g++ $(CFLAGS) $(SRC) -o plink $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB)
  68. -plinkw: $(SRC)
  69. +plink: $(SRC)
  70. g++ $(CFLAGS) $(SRC) -c
  71. - gfortran -O2 $(OBJ) -o plink -Wl,-Bstatic $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB)
  72. + gfortran $(OBJ) -o plink2 $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB)
  73. + # gfortran $^ -o plink2 -Wl,-Bstatic $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB)
  74. diff --git a/dose2plink.c b/dose2plink.c
  75. index dc1f33a..ca2d31c 100644
  76. --- a/dose2plink.c
  77. +++ b/dose2plink.c
  78. @@ -96,7 +96,7 @@
  79. #endif
  80. #endif
  81. -#include "zlib-1.2.8/zlib.h"
  82. +#include "zlib.h"
  83. #ifdef __APPLE__
  84. #include <sys/sysctl.h>
  85. diff --git a/pigz.c b/pigz.c
  86. index 6605925..3f4ca54 100644
  87. --- a/pigz.c
  88. +++ b/pigz.c
  89. @@ -303,7 +303,7 @@
  90. #include <stdio.h>
  91. #include <stdlib.h>
  92. #include <windows.h>
  93. -#include "zlib-1.2.8/zlib.h"
  94. +#include "zlib.h"
  95. void pigz_init(uint32_t setprocs) {
  96. return;
  97. @@ -383,7 +383,7 @@ void parallel_compress(char* out_fname, uint32_t do_append, uint32_t(* emitn)(ui
  98. # include <sys/pstat.h>
  99. #endif
  100. -#include "zlib-1.2.8/zlib.h" /* deflateInit2(), deflateReset(), deflate(), */
  101. +#include "zlib.h" /* deflateInit2(), deflateReset(), deflate(), */
  102. /* deflateEnd(), deflateSetDictionary(), crc32(),
  103. inflateBackInit(), inflateBack(), inflateBackEnd(),
  104. Z_DEFAULT_COMPRESSION, Z_DEFAULT_STRATEGY,
  105. diff --git a/plink_common.h b/plink_common.h
  106. index 5dd77e8..4da9371 100644
  107. --- a/plink_common.h
  108. +++ b/plink_common.h
  109. @@ -139,7 +139,7 @@
  110. #endif // __LP64__
  111. -#include "zlib-1.2.8/zlib.h"
  112. +#include "zlib.h"
  113. #include "SFMT.h"
  114. // 64MB of non-workspace memory guaranteed for now